Skip to content

Commit 7c181f4

Browse files
bencaradocdaviesjmberg-intel
authored andcommitted
mac80211: add ieee80211_hw flag for QoS NDP support
Commit 7b6ddea ("mac80211: use QoS NDP for AP probing") added an argument qos_ok to ieee80211_nullfunc_get to support QoS NDP. Despite the claim in the commit log "Change all the drivers to *not* allow QoS NDP for now, even though it looks like most of them should be OK with that", this commit enables QoS NDP in response to beacons (see change to mlme.c:ieee80211_send_nullfunc), causing ath9k_htc to lose IP connectivity. See: https://patchwork.kernel.org/patch/10241109/ https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891060 Introduce a hardware flag to allow such buggy drivers to override the correct default behaviour of mac80211 of sending QoS NDP packets. Signed-off-by: Ben Caradoc-Davies <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
1 parent 5f2fb80 commit 7c181f4

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

include/net/mac80211.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,6 +2063,9 @@ struct ieee80211_txq {
20632063
* @IEEE80211_HW_SUPPORTS_TDLS_BUFFER_STA: Hardware supports buffer STA on
20642064
* TDLS links.
20652065
*
2066+
* @IEEE80211_HW_DOESNT_SUPPORT_QOS_NDP: The driver (or firmware) doesn't
2067+
* support QoS NDP for AP probing - that's most likely a driver bug.
2068+
*
20662069
* @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays
20672070
*/
20682071
enum ieee80211_hw_flags {
@@ -2106,6 +2109,7 @@ enum ieee80211_hw_flags {
21062109
IEEE80211_HW_REPORTS_LOW_ACK,
21072110
IEEE80211_HW_SUPPORTS_TX_FRAG,
21082111
IEEE80211_HW_SUPPORTS_TDLS_BUFFER_STA,
2112+
IEEE80211_HW_DOESNT_SUPPORT_QOS_NDP,
21092113

21102114
/* keep last, obviously */
21112115
NUM_IEEE80211_HW_FLAGS

net/mac80211/debugfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ static const char *hw_flag_names[] = {
212212
FLAG(REPORTS_LOW_ACK),
213213
FLAG(SUPPORTS_TX_FRAG),
214214
FLAG(SUPPORTS_TDLS_BUFFER_STA),
215+
FLAG(DOESNT_SUPPORT_QOS_NDP),
215216
#undef FLAG
216217
};
217218

net/mac80211/mlme.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,8 @@ void ieee80211_send_nullfunc(struct ieee80211_local *local,
896896
struct ieee80211_hdr_3addr *nullfunc;
897897
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
898898

899-
skb = ieee80211_nullfunc_get(&local->hw, &sdata->vif, true);
899+
skb = ieee80211_nullfunc_get(&local->hw, &sdata->vif,
900+
!ieee80211_hw_check(&local->hw, DOESNT_SUPPORT_QOS_NDP));
900901
if (!skb)
901902
return;
902903

0 commit comments

Comments
 (0)