| From 6a2377746a206c981df59c0d486292b4947d82b4 Mon Sep 17 00:00:00 2001 |
| From: Johannes Berg <johannes.berg@intel.com> |
| Date: Tue, 19 Feb 2019 14:22:11 +0100 |
| Subject: iwlwifi: mvm: IBSS: use BE FIFO for multicast |
| |
| [ Upstream commit 192a7e1f731fd9a64216cce35287eb23360437f6 ] |
| |
| Back in commit 4d339989acd7 ("iwlwifi: mvm: support ibss in dqa mode") |
| we changed queue selection for IBSS to be: |
| |
| if (ieee80211_is_probe_resp(fc) || ieee80211_is_auth(fc) || |
| ieee80211_is_deauth(fc)) |
| return IWL_MVM_DQA_AP_PROBE_RESP_QUEUE; |
| if (info->hw_queue == info->control.vif->cab_queue) |
| return info->hw_queue; |
| return IWL_MVM_DQA_AP_PROBE_RESP_QUEUE; |
| |
| Clearly, the thought at the time must've been that mac80211 will |
| select the hw_queue as the cab_queue, so that we'll return and use |
| that, where we store the multicast queue for IBSS. This, however, |
| isn't true because mac80211 doesn't implement powersave for IBSS |
| and thus selects the normal IBSS interface AC queue (best effort). |
| |
| This therefore always used the probe response queue, which maps to |
| the BE FIFO. |
| |
| In commit cfbc6c4c5b91 ("iwlwifi: mvm: support mac80211 TXQs model") |
| we rethought this code, and as a consequence now started mapping the |
| multicast traffic to the multicast hardware queue since we no longer |
| relied on mac80211 selecting the queue, doing it ourselves instead. |
| This queue is mapped to the MCAST FIFO. however, this isn't actually |
| enabled/controlled by the firmware in IBSS mode because we don't |
| implement powersave, and frames from this queue can never go out in |
| this case. |
| |
| Therefore, we got queue hang reports such as |
| https://bugzilla.kernel.org/show_bug.cgi?id=201707 |
| |
| Fix this by mapping the multicast queue to the BE FIFO in IBSS so |
| that all the frames can go out. |
| |
| Fixes: cfbc6c4c5b91 ("iwlwifi: mvm: support mac80211 TXQs model") |
| Signed-off-by: Johannes Berg <johannes.berg@intel.com> |
| Signed-off-by: Luca Coelho <luciano.coelho@intel.com> |
| Signed-off-by: Sasha Levin <sashal@kernel.org> |
| --- |
| drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 3 ++- |
| 1 file changed, 2 insertions(+), 1 deletion(-) |
| |
| diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c |
| index 98d123dd71778..eb452e9dce057 100644 |
| --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c |
| +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c |
| @@ -2277,7 +2277,8 @@ int iwl_mvm_add_mcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) |
| static const u8 _maddr[] = {0x03, 0x00, 0x00, 0x00, 0x00, 0x00}; |
| const u8 *maddr = _maddr; |
| struct iwl_trans_txq_scd_cfg cfg = { |
| - .fifo = IWL_MVM_TX_FIFO_MCAST, |
| + .fifo = vif->type == NL80211_IFTYPE_AP ? |
| + IWL_MVM_TX_FIFO_MCAST : IWL_MVM_TX_FIFO_BE, |
| .sta_id = msta->sta_id, |
| .tid = 0, |
| .aggregate = false, |
| -- |
| 2.20.1 |
| |