mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-14 00:59:37 +00:00
rtl8188eu: Remove "all" possibility of setting AD-HOC mode
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
6c3f0ced60
commit
5c3302ab2e
4 changed files with 15 additions and 14 deletions
|
@ -1174,7 +1174,7 @@ static u8 rtw_createbss_cmd(_adapter *adapter, int flags, bool adhoc,
|
|||
* Disable the setting of parm->adhoc as it seems to screw up
|
||||
AP operations.
|
||||
*/
|
||||
parm->adhoc = 0;
|
||||
parm->adhoc = false;
|
||||
parm->req_ch = req_ch;
|
||||
parm->req_bw = req_bw;
|
||||
parm->req_offset = req_offset;
|
||||
|
@ -1218,8 +1218,9 @@ exit:
|
|||
inline u8 rtw_create_ibss_cmd(_adapter *adapter, int flags)
|
||||
{
|
||||
/* for now, adhoc doesn't support ch,bw,offset request */
|
||||
return rtw_createbss_cmd(adapter, flags, true,
|
||||
0, -1, -1);
|
||||
// return rtw_createbss_cmd(adapter, flags, true,
|
||||
// 0, -1, -1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline u8 rtw_startbss_cmd(_adapter *adapter, int flags)
|
||||
|
@ -1269,7 +1270,7 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
|
|||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_ADHOC_STATE) != true) {
|
||||
switch (ndis_network_mode) {
|
||||
case Ndis802_11IBSS:
|
||||
set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
|
||||
// set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
|
||||
break;
|
||||
case Ndis802_11Infrastructure:
|
||||
set_fwstate(pmlmepriv, WIFI_STATION_STATE);
|
||||
|
|
|
@ -196,7 +196,7 @@ u8 rtw_set_802_11_bssid(_adapter *padapter, u8 *bssid)
|
|||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) )) {
|
||||
_clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
|
||||
set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
|
||||
// set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ u8 rtw_set_802_11_ssid(_adapter *padapter, NDIS_802_11_SSID *ssid)
|
|||
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) ) {
|
||||
_clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
|
||||
set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
|
||||
// set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
|
||||
}
|
||||
} else {
|
||||
goto release_mlme_lock;/* it means driver is in WIFI_ADHOC_MASTER_STATE, we needn't create bss again. */
|
||||
|
@ -287,7 +287,7 @@ u8 rtw_set_802_11_ssid(_adapter *padapter, NDIS_802_11_SSID *ssid)
|
|||
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) ) {
|
||||
_clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
|
||||
set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
|
||||
// set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -429,7 +429,7 @@ u8 rtw_set_802_11_infrastructure_mode(_adapter *padapter,
|
|||
|
||||
switch (networktype) {
|
||||
case Ndis802_11IBSS:
|
||||
set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
|
||||
// set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
|
||||
break;
|
||||
|
||||
case Ndis802_11Infrastructure:
|
||||
|
|
|
@ -1178,7 +1178,7 @@ void rtw_surveydone_event_callback(_adapter *adapter, u8 *pbuf)
|
|||
rtw_generate_random_ibss(pibss);
|
||||
|
||||
/*pmlmepriv->fw_state = WIFI_ADHOC_MASTER_STATE;*/
|
||||
init_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
|
||||
// init_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
|
||||
|
||||
if (rtw_create_ibss_cmd(adapter, 0) != _SUCCESS)
|
||||
RTW_ERR("rtw_create_ibss_cmd FAIL\n");
|
||||
|
@ -2480,7 +2480,7 @@ void rtw_stadel_event_callback(_adapter *adapter, u8 *pbuf)
|
|||
rtw_generate_random_ibss(pibss);
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {
|
||||
set_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
|
||||
// set_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
|
||||
_clr_fwstate_(pmlmepriv, WIFI_ADHOC_STATE);
|
||||
}
|
||||
|
||||
|
|
8
rtw_mp.c
8
rtw_mp.c
|
@ -573,10 +573,10 @@ u32 mp_join(PADAPTER padapter, u8 mode)
|
|||
res = _FAIL;
|
||||
goto end_of_mp_start_test;
|
||||
}
|
||||
if (mode == WIFI_FW_ADHOC_STATE)
|
||||
set_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
|
||||
else
|
||||
set_fwstate(pmlmepriv, WIFI_STATION_STATE);
|
||||
// if (mode == WIFI_FW_ADHOC_STATE)
|
||||
// set_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
|
||||
// else
|
||||
// set_fwstate(pmlmepriv, WIFI_STATION_STATE);
|
||||
/* 3 3. join psudo AdHoc */
|
||||
tgt_network->join_res = 1;
|
||||
tgt_network->aid = psta->aid = 1;
|
||||
|
|
Loading…
Reference in a new issue