Skip to content

Commit 45bd4e4

Browse files
lucacoelhogregkh
authored andcommitted
iwlwifi: mvm: use IWL_HCMD_NOCOPY for MCAST_FILTER_CMD
commit 97bce57bd7f96e1218751996f549a6e61f18cc8c upstream. The MCAST_FILTER_CMD can get quite large when we have many mcast addresses to set (we support up to 255). So the command should be send as NOCOPY to prevent a warning caused by too-long commands: WARNING: CPU: 0 PID: 9700 at /root/iwlwifi/stack-dev/drivers/net/wireless/intel/iwlwifi/pcie/tx.c:1550 iwl_pcie_enqueue_hcmd+0x8c7/0xb40 [iwlwifi] Command MCAST_FILTER_CMD (0x1d0) is too large (328 bytes) This fixes: https://bugzilla.kernel.org/show_bug.cgi?id=196743 Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 6a6c61d commit 45bd4e4

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

drivers/net/wireless/iwlwifi/mvm/mac80211.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1906,6 +1906,11 @@ static void iwl_mvm_mc_iface_iterator(void *_data, u8 *mac,
19061906
struct iwl_mvm_mc_iter_data *data = _data;
19071907
struct iwl_mvm *mvm = data->mvm;
19081908
struct iwl_mcast_filter_cmd *cmd = mvm->mcast_filter_cmd;
1909+
struct iwl_host_cmd hcmd = {
1910+
.id = MCAST_FILTER_CMD,
1911+
.flags = CMD_ASYNC,
1912+
.dataflags[0] = IWL_HCMD_DFL_NOCOPY,
1913+
};
19091914
int ret, len;
19101915

19111916
/* if we don't have free ports, mcast frames will be dropped */
@@ -1920,7 +1925,10 @@ static void iwl_mvm_mc_iface_iterator(void *_data, u8 *mac,
19201925
memcpy(cmd->bssid, vif->bss_conf.bssid, ETH_ALEN);
19211926
len = roundup(sizeof(*cmd) + cmd->count * ETH_ALEN, 4);
19221927

1923-
ret = iwl_mvm_send_cmd_pdu(mvm, MCAST_FILTER_CMD, CMD_ASYNC, len, cmd);
1928+
hcmd.len[0] = len;
1929+
hcmd.data[0] = cmd;
1930+
1931+
ret = iwl_mvm_send_cmd(mvm, &hcmd);
19241932
if (ret)
19251933
IWL_ERR(mvm, "mcast filter cmd error. ret=%d\n", ret);
19261934
}

0 commit comments

Comments
 (0)