aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/receive.c
diff options
context:
space:
mode:
Diffstat (limited to 'hostapd/receive.c')
-rw-r--r--hostapd/receive.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/hostapd/receive.c b/hostapd/receive.c
index e07bedb..934a0c4 100644
--- a/hostapd/receive.c
+++ b/hostapd/receive.c
@@ -115,6 +115,8 @@ static void handle_tx_callback(hostapd *hapd, char *buf, size_t len, int ok)
{
struct ieee80211_hdr *hdr;
u16 fc, type, stype;
+ struct sta_info *sta;
+
hdr = (struct ieee80211_hdr *) buf;
fc = le_to_host16(hdr->frame_control);
@@ -134,10 +136,15 @@ static void handle_tx_callback(hostapd *hapd, char *buf, size_t len, int ok)
case WLAN_FC_TYPE_DATA:
HOSTAPD_DEBUG(HOSTAPD_DEBUG_MINIMAL,
"DATA (TX callback) %s\n", ok ? "ACK" : "fail");
- /* TODO: could replace TXExc counter hack with kernel driver
- * in data polling for inactivity check with the new TX
- * callback.. */
- /* handle_data_cb(hapd, buf, len, stype, ok); */
+ sta = ap_get_sta(hapd, hdr->addr1);
+ if (sta && sta->flags & WLAN_STA_PENDING_POLL) {
+ HOSTAPD_DEBUG(HOSTAPD_DEBUG_MINIMAL, "STA " MACSTR
+ " %s pending activity poll\n",
+ MAC2STR(sta->addr),
+ ok ? "ACKed" : "did not ACK");
+ if (ok)
+ sta->flags &= ~WLAN_STA_PENDING_POLL;
+ }
break;
default:
printf("unknown TX callback frame type %d\n", type);