mirror of
https://github.com/chinawrj/rtl8812au
synced 2024-11-15 02:16:08 +00:00
Hostapd/WPS support added
This commit is contained in:
parent
8eec8cd4a3
commit
f431b12c58
@ -5039,6 +5039,19 @@ static int cfg80211_rtw_start_ap(struct wiphy *wiphy, struct net_device *ndev,
|
|||||||
ret = rtw_add_beacon(adapter, settings->beacon.head, settings->beacon.head_len,
|
ret = rtw_add_beacon(adapter, settings->beacon.head, settings->beacon.head_len,
|
||||||
settings->beacon.tail, settings->beacon.tail_len);
|
settings->beacon.tail, settings->beacon.tail_len);
|
||||||
|
|
||||||
|
|
||||||
|
// In cases like WPS, the proberesp and assocresp IEs vary from the beacon, and need to be explicitly set
|
||||||
|
if(ret == 0) {
|
||||||
|
if(settings->beacon.proberesp_ies && settings->beacon.proberesp_ies_len > 0) {
|
||||||
|
rtw_cfg80211_set_mgnt_wpsp2pie(ndev, (char *)settings->beacon.proberesp_ies,
|
||||||
|
settings->beacon.proberesp_ies_len, 0x2/*PROBE_RESP*/);
|
||||||
|
}
|
||||||
|
if(settings->beacon.assocresp_ies && settings->beacon.assocresp_ies_len < 0) {
|
||||||
|
rtw_cfg80211_set_mgnt_wpsp2pie(ndev, (char *)settings->beacon.assocresp_ies,
|
||||||
|
settings->beacon.assocresp_ies_len, 0x4/*ASSOC_RESP*/);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
adapter->mlmeextpriv.mlmext_info.hidden_ssid_mode = settings->hidden_ssid;
|
adapter->mlmeextpriv.mlmext_info.hidden_ssid_mode = settings->hidden_ssid;
|
||||||
|
|
||||||
if (settings->ssid && settings->ssid_len) {
|
if (settings->ssid && settings->ssid_len) {
|
||||||
@ -5075,6 +5088,18 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd
|
|||||||
|
|
||||||
ret = rtw_add_beacon(adapter, info->head, info->head_len, info->tail, info->tail_len);
|
ret = rtw_add_beacon(adapter, info->head, info->head_len, info->tail, info->tail_len);
|
||||||
|
|
||||||
|
// In cases like WPS, the proberesp and assocresp IEs vary from the beacon, and need to be explicitly set
|
||||||
|
if(ret == 0) {
|
||||||
|
if(info->proberesp_ies && info->proberesp_ies_len > 0) {
|
||||||
|
rtw_cfg80211_set_mgnt_wpsp2pie(ndev, (char *)info->proberesp_ies,
|
||||||
|
info->proberesp_ies_len, 0x2/*PROBE_RESP*/);
|
||||||
|
}
|
||||||
|
if(info->assocresp_ies && info->assocresp_ies_len > 0) {
|
||||||
|
rtw_cfg80211_set_mgnt_wpsp2pie(ndev, (char *)info->assocresp_ies,
|
||||||
|
info->assocresp_ies_len, 0x4/*ASSOC_RESP*/);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user