summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorIlan Peer <ilan.peer@intel.com>2015-06-24 09:23:01 +0300
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-08-04 10:11:48 +0300
commitd0ab08d05e5ae84edda5bf86797cbc2daee75db2 (patch)
treeda39d2cca10176243f65bfad048ce2cd141d21b8 /drivers/net/wireless/iwlwifi
parentd576cd9d599604b9b712939c2ddea0db90463126 (diff)
downloadop-kernel-dev-d0ab08d05e5ae84edda5bf86797cbc2daee75db2.zip
op-kernel-dev-d0ab08d05e5ae84edda5bf86797cbc2daee75db2.tar.gz
iwlwifi: mvm: Use the AP station for non_sta transmit
In iwl_mvm_tx_skb_non_sta(), in case of managed interface, use the AP station for multicast frames instead of the auxiliary station as otherwise the frames can be sent to an absent P2P GO as the FW does not block transmissions for the auxiliary station since it is not associated with the station MAC context. Note that this is not possible for unicast frames, as a TDLS discovery response is sent without a station entry, and in this case the P2P GO NoA should not block transmission to the peer. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/tx.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c
index abde484..fa3eaf9 100644
--- a/drivers/net/wireless/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/iwlwifi/mvm/tx.c
@@ -366,18 +366,29 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb)
IEEE80211_SKB_CB(skb)->hw_queue = mvm->aux_queue;
/*
- * If the interface on which frame is sent is the P2P_DEVICE
+ * If the interface on which the frame is sent is the P2P_DEVICE
* or an AP/GO interface use the broadcast station associated
- * with it; otherwise use the AUX station.
+ * with it; otherwise if the interface is a managed interface
+ * use the AP station associated with it for multicast traffic
+ * (this is not possible for unicast packets as a TLDS discovery
+ * response are sent without a station entry); otherwise use the
+ * AUX station.
*/
- if (info->control.vif &&
- (info->control.vif->type == NL80211_IFTYPE_P2P_DEVICE ||
- info->control.vif->type == NL80211_IFTYPE_AP)) {
+ sta_id = mvm->aux_sta.sta_id;
+ if (info->control.vif) {
struct iwl_mvm_vif *mvmvif =
iwl_mvm_vif_from_mac80211(info->control.vif);
- sta_id = mvmvif->bcast_sta.sta_id;
- } else {
- sta_id = mvm->aux_sta.sta_id;
+
+ if (info->control.vif->type == NL80211_IFTYPE_P2P_DEVICE ||
+ info->control.vif->type == NL80211_IFTYPE_AP)
+ sta_id = mvmvif->bcast_sta.sta_id;
+ else if (info->control.vif->type == NL80211_IFTYPE_STATION &&
+ is_multicast_ether_addr(hdr->addr1)) {
+ u8 ap_sta_id = ACCESS_ONCE(mvmvif->ap_sta_id);
+
+ if (ap_sta_id != IWL_MVM_STATION_COUNT)
+ sta_id = ap_sta_id;
+ }
}
IWL_DEBUG_TX(mvm, "station Id %d, queue=%d\n", sta_id, info->hw_queue);
OpenPOWER on IntegriCloud