aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2003-06-25 05:10:40 (GMT)
committerJouni Malinen <j@w1.fi>2003-06-25 05:10:40 (GMT)
commit53de6653d6269ab10175b762a56bb12591175cc1 (patch)
treeddfd68f02e930636c025c30fbdadc98747fb6c03
parentc69aeb5cf881c0d2a4842b3dcb4a09ffba1fbc82 (diff)
downloadhostap-history-53de6653d6269ab10175b762a56bb12591175cc1.zip
hostap-history-53de6653d6269ab10175b762a56bb12591175cc1.tar.gz
hostap-history-53de6653d6269ab10175b762a56bb12591175cc1.tar.bz2
Fixed TX using wlan#ap (i.e., from hostapd) to buffer (other than auth/
(re)assoc) frames to power saving stations. This fixes inactivity polling from hostapd and IEEE 802.1X when STA is using power saving.
-rw-r--r--driver/modules/hostap_hw.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/driver/modules/hostap_hw.c b/driver/modules/hostap_hw.c
index 7df37ea..cb24ec6 100644
--- a/driver/modules/hostap_hw.c
+++ b/driver/modules/hostap_hw.c
@@ -2084,6 +2084,25 @@ static int prism2_tx_80211(struct sk_buff *skb, struct net_device *dev)
txdesc.data_len = __cpu_to_le16(data_len);
txdesc.len = __cpu_to_be16(data_len);
+ /* We do not need to care about frame authorization etc. here since
+ * hostapd has full knowledge of auth/assoc status. However, we need to
+ * buffer the frame is the destination STA is in power saving mode.
+ *
+ * Wi-Fi 802.11b test plan suggests that AP should ignore power save
+ * bit in authentication and (re)association frames and assume tha
+ * STA remains awake for the response. */
+ if (hostap_handle_sta_tx(local, skb, &txdesc, 0, 0, NULL, NULL) ==
+ AP_TX_BUFFERED &&
+ (WLAN_FC_GET_TYPE(fc) != WLAN_FC_TYPE_MGMT ||
+ (WLAN_FC_GET_STYPE(fc) != WLAN_FC_STYPE_AUTH &&
+ WLAN_FC_GET_STYPE(fc) != WLAN_FC_STYPE_ASSOC_RESP &&
+ WLAN_FC_GET_STYPE(fc) != WLAN_FC_STYPE_REASSOC_RESP))) {
+ /* do not free skb here, it will be freed when the
+ * buffered frame is sent/timed out */
+ ret = 0;
+ goto tx_exit;
+ }
+
idx = prism2_get_txfid_idx(local);
if (idx < 0) {
local->apdevstats.tx_dropped++;
@@ -2119,7 +2138,7 @@ static int prism2_tx_80211(struct sk_buff *skb, struct net_device *dev)
fail:
if (!ret)
dev_kfree_skb(skb);
-
+ tx_exit:
return ret;
}