Move hostap driver specific workaround into the driver wrapper
This commit is contained in:
parent
dff99f8ec1
commit
4d379f1243
2 changed files with 13 additions and 11 deletions
|
@ -324,6 +324,7 @@ static int hostapd_setup_encryption(char *iface, struct hostapd_data *hapd)
|
||||||
static int hostapd_flush_old_stations(struct hostapd_data *hapd)
|
static int hostapd_flush_old_stations(struct hostapd_data *hapd)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
u8 addr[ETH_ALEN];
|
||||||
|
|
||||||
if (hostapd_drv_none(hapd) || hapd->drv_priv == NULL)
|
if (hostapd_drv_none(hapd) || hapd->drv_priv == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -334,17 +335,8 @@ static int hostapd_flush_old_stations(struct hostapd_data *hapd)
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
wpa_printf(MSG_DEBUG, "Deauthenticate all stations");
|
wpa_printf(MSG_DEBUG, "Deauthenticate all stations");
|
||||||
|
os_memset(addr, 0xff, ETH_ALEN);
|
||||||
/* New Prism2.5/3 STA firmware versions seem to have issues with this
|
hostapd_drv_sta_deauth(hapd, addr, WLAN_REASON_PREV_AUTH_NOT_VALID);
|
||||||
* broadcast deauth frame. This gets the firmware in odd state where
|
|
||||||
* nothing works correctly, so let's skip sending this for the hostap
|
|
||||||
* driver. */
|
|
||||||
if (hapd->driver && os_strcmp(hapd->driver->name, "hostap") != 0) {
|
|
||||||
u8 addr[ETH_ALEN];
|
|
||||||
os_memset(addr, 0xff, ETH_ALEN);
|
|
||||||
hostapd_drv_sta_deauth(hapd, addr,
|
|
||||||
WLAN_REASON_PREV_AUTH_NOT_VALID);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1035,6 +1035,16 @@ static int hostap_sta_deauth(void *priv, const u8 *own_addr, const u8 *addr,
|
||||||
struct hostap_driver_data *drv = priv;
|
struct hostap_driver_data *drv = priv;
|
||||||
struct ieee80211_mgmt mgmt;
|
struct ieee80211_mgmt mgmt;
|
||||||
|
|
||||||
|
if (is_broadcast_ether_addr(addr)) {
|
||||||
|
/*
|
||||||
|
* New Prism2.5/3 STA firmware versions seem to have issues
|
||||||
|
* with this broadcast deauth frame. This gets the firmware in
|
||||||
|
* odd state where nothing works correctly, so let's skip
|
||||||
|
* sending this for the hostap driver.
|
||||||
|
*/
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
memset(&mgmt, 0, sizeof(mgmt));
|
memset(&mgmt, 0, sizeof(mgmt));
|
||||||
mgmt.frame_control = IEEE80211_FC(WLAN_FC_TYPE_MGMT,
|
mgmt.frame_control = IEEE80211_FC(WLAN_FC_TYPE_MGMT,
|
||||||
WLAN_FC_STYPE_DEAUTH);
|
WLAN_FC_STYPE_DEAUTH);
|
||||||
|
|
Loading…
Add table
Reference in a new issue