Search Linux Wireless

[PATCH] mac80211: Disable U-APSD if connected to a SISO AP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Avri Altman <avri.altman@xxxxxxxxx>

This concerns a bugy behavior of some APs, that advertise themselves
falsely as supporting U-APSD, but they don't which affects throughput.
It was detected in iPhones, but recently also with some Netgear models.
Those devices also advertise their capabilities as SISO, so use that
and disable U-APSD if connected to a SISO AP.

Signed-off-by: Avri Altman <avri.altman@xxxxxxxxx>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@xxxxxxxxx>
---
 net/mac80211/scan.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 7bb6a93..400ff62 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -42,6 +42,7 @@ void ieee80211_rx_bss_put(struct ieee80211_local *local,
 static bool is_uapsd_supported(struct ieee802_11_elems *elems)
 {
 	u8 qos_info;
+	int i;
 
 	if (elems->wmm_info && elems->wmm_info_len == 7
 	    && elems->wmm_info[5] == 1)
@@ -53,6 +54,22 @@ static bool is_uapsd_supported(struct ieee802_11_elems *elems)
 		/* no valid wmm information or parameter element found */
 		return false;
 
+	/*
+	 * if the AP does not advertise MIMO capabilities -
+	 * disable U-APSD. iPhones, among others, advertise themselves
+	 * as U-APSD capable when they aren't. Avoid connecting to
+	 * those devices in U-APSD enabled.
+	 */
+	if (elems->parse_error || !elems->ht_cap_elem)
+		goto mimo;
+
+	for (i = 1; i < 4; i++) {
+		if (elems->ht_cap_elem->mcs.rx_mask[i])
+			goto mimo;
+	}
+	return false;
+
+mimo:
 	return qos_info & IEEE80211_WMM_IE_AP_QOSINFO_UAPSD;
 }
 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux