implement station inactivity timeout
After the max station inactivity has expired, a probe request (a data null frame) is sent to the station. It the station does not ACK this frame, it is removed from the WTP. Note: inactivity timeout is not the same as the CAPWAP Idle Timeout. The CAPWAP Idle Timeout would remove a station due to inactivity even when it is still reachable from the WTP. In contrast, the inactivity timeout probes whether the station is still present and only removes it when not.
This commit is contained in:
@ -764,3 +764,27 @@ int ieee80211_create_deauthentication(uint8_t* buffer, int length, struct ieee80
|
||||
|
||||
return (int)((uint8_t*)&header->deauthetication.ie[0] - (uint8_t*)header);
|
||||
}
|
||||
|
||||
/* */
|
||||
int ieee80211_create_disassociation(uint8_t* buffer, int length,
|
||||
struct ieee80211_disassociation_params* params)
|
||||
{
|
||||
struct ieee80211_header_mgmt* header;
|
||||
|
||||
ASSERT(buffer != NULL);
|
||||
|
||||
/* */
|
||||
header = (struct ieee80211_header_mgmt*)buffer;
|
||||
|
||||
/* Management header frame */
|
||||
header->framecontrol = IEEE80211_FRAME_CONTROL(IEEE80211_FRAMECONTROL_TYPE_MGMT,
|
||||
IEEE80211_FRAMECONTROL_MGMT_SUBTYPE_DISASSOCIATION);
|
||||
header->durationid = __cpu_to_le16(0);
|
||||
memcpy(header->da, params->station, ETH_ALEN);
|
||||
memcpy(header->sa, params->bssid, ETH_ALEN);
|
||||
memcpy(header->bssid, params->bssid, ETH_ALEN);
|
||||
header->sequencecontrol = __cpu_to_le16(0);
|
||||
header->disassociation.reasoncode = __cpu_to_le16(params->reasoncode);
|
||||
|
||||
return (int)((uint8_t*)&header->disassociation.ie[0] - (uint8_t*)header);
|
||||
}
|
||||
|
Reference in New Issue
Block a user