aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/scan.c
diff options
context:
space:
mode:
authorKalle Valo <kalle.valo@nokia.com>2010-01-12 03:42:31 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-01-12 14:20:58 -0500
commitab13315af97919fae0e014748105fdc2e30afb2d (patch)
treebefa549272ecff20b2839bd6671e4cccbce448f9 /net/mac80211/scan.c
parent2d46d7c121436f1dafe91b0a8d9b99e534cfa5f8 (diff)
mac80211: add U-APSD client support
Add Unscheduled Automatic Power-Save Delivery (U-APSD) client support. The idea is that the data frames from the client trigger AP to send the buffered frames with ACs which have U-APSD enabled. This decreases latency and makes it possible to save even more power. Driver needs to use IEEE80211_HW_UAPSD to enable the feature. The current implementation assumes that firmware takes care of the wakeup and hardware needing IEEE80211_HW_PS_NULLFUNC_STACK is not yet supported. Tested with wl1251 on a Nokia N900 and Cisco Aironet 1231G AP and running various test traffic with ping. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/scan.c')
-rw-r--r--net/mac80211/scan.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 30cb62bb45b3..9afe2f9885dc 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -54,6 +54,23 @@ void ieee80211_rx_bss_put(struct ieee80211_local *local,
54 cfg80211_put_bss(container_of((void *)bss, struct cfg80211_bss, priv)); 54 cfg80211_put_bss(container_of((void *)bss, struct cfg80211_bss, priv));
55} 55}
56 56
57static bool is_uapsd_supported(struct ieee802_11_elems *elems)
58{
59 u8 qos_info;
60
61 if (elems->wmm_info && elems->wmm_info_len == 7
62 && elems->wmm_info[5] == 1)
63 qos_info = elems->wmm_info[6];
64 else if (elems->wmm_param && elems->wmm_param_len == 24
65 && elems->wmm_param[5] == 1)
66 qos_info = elems->wmm_param[6];
67 else
68 /* no valid wmm information or parameter element found */
69 return false;
70
71 return qos_info & IEEE80211_WMM_IE_AP_QOSINFO_UAPSD;
72}
73
57struct ieee80211_bss * 74struct ieee80211_bss *
58ieee80211_bss_info_update(struct ieee80211_local *local, 75ieee80211_bss_info_update(struct ieee80211_local *local,
59 struct ieee80211_rx_status *rx_status, 76 struct ieee80211_rx_status *rx_status,
@@ -117,6 +134,7 @@ ieee80211_bss_info_update(struct ieee80211_local *local,
117 } 134 }
118 135
119 bss->wmm_used = elems->wmm_param || elems->wmm_info; 136 bss->wmm_used = elems->wmm_param || elems->wmm_info;
137 bss->uapsd_supported = is_uapsd_supported(elems);
120 138
121 if (!beacon) 139 if (!beacon)
122 bss->last_probe_resp = jiffies; 140 bss->last_probe_resp = jiffies;