aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Coelho <luciano.coelho@intel.com>2017-09-01 10:59:15 -0400
committerLuca Coelho <luciano.coelho@intel.com>2017-09-08 04:44:39 -0400
commit97bce57bd7f96e1218751996f549a6e61f18cc8c (patch)
tree03416010fab653e6f381bbfcd71187dd07eca50c
parent8458e48ac7ad86a5ab7f3d1a8cacd9205a9a97ce (diff)
iwlwifi: mvm: use IWL_HCMD_NOCOPY for MCAST_FILTER_CMD
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 Cc: stable@vger.kernel.org Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index 3a6ce4222ff5..635db63f972e 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -1546,6 +1546,11 @@ static void iwl_mvm_mc_iface_iterator(void *_data, u8 *mac,
1546 struct iwl_mvm_mc_iter_data *data = _data; 1546 struct iwl_mvm_mc_iter_data *data = _data;
1547 struct iwl_mvm *mvm = data->mvm; 1547 struct iwl_mvm *mvm = data->mvm;
1548 struct iwl_mcast_filter_cmd *cmd = mvm->mcast_filter_cmd; 1548 struct iwl_mcast_filter_cmd *cmd = mvm->mcast_filter_cmd;
1549 struct iwl_host_cmd hcmd = {
1550 .id = MCAST_FILTER_CMD,
1551 .flags = CMD_ASYNC,
1552 .dataflags[0] = IWL_HCMD_DFL_NOCOPY,
1553 };
1549 int ret, len; 1554 int ret, len;
1550 1555
1551 /* if we don't have free ports, mcast frames will be dropped */ 1556 /* if we don't have free ports, mcast frames will be dropped */
@@ -1560,7 +1565,10 @@ static void iwl_mvm_mc_iface_iterator(void *_data, u8 *mac,
1560 memcpy(cmd->bssid, vif->bss_conf.bssid, ETH_ALEN); 1565 memcpy(cmd->bssid, vif->bss_conf.bssid, ETH_ALEN);
1561 len = roundup(sizeof(*cmd) + cmd->count * ETH_ALEN, 4); 1566 len = roundup(sizeof(*cmd) + cmd->count * ETH_ALEN, 4);
1562 1567
1563 ret = iwl_mvm_send_cmd_pdu(mvm, MCAST_FILTER_CMD, CMD_ASYNC, len, cmd); 1568 hcmd.len[0] = len;
1569 hcmd.data[0] = cmd;
1570
1571 ret = iwl_mvm_send_cmd(mvm, &hcmd);
1564 if (ret) 1572 if (ret)
1565 IWL_ERR(mvm, "mcast filter cmd error. ret=%d\n", ret); 1573 IWL_ERR(mvm, "mcast filter cmd error. ret=%d\n", ret);
1566} 1574}