mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-22 12:33:40 +00:00
rtl8188eu: Remove typedef statements from include/wlan_bssdef.h
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
8a5e5024c0
commit
851dc8fff5
20 changed files with 259 additions and 414 deletions
|
@ -197,15 +197,15 @@ static void update_BCNTIM(struct adapter *padapter)
|
|||
|
||||
void rtw_add_bcn_ie(struct adapter *padapter, struct wlan_bssid_ex *pnetwork, u8 index, u8 *data, u8 len)
|
||||
{
|
||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
||||
struct ndis_802_11_variable_ies * pIE;
|
||||
u8 bmatch = false;
|
||||
u8 *pie = pnetwork->IEs;
|
||||
u8 *p, *dst_ie, *premainder_ie=NULL, *pbackup_remainder_ie=NULL;
|
||||
u32 i, offset, ielen, ie_offset, remainder_ielen = 0;
|
||||
|
||||
for (i = sizeof(NDIS_802_11_FIXED_IEs); i < pnetwork->IELength;)
|
||||
for (i = sizeof(struct ndis_802_11_fixed_ies); i < pnetwork->IELength;)
|
||||
{
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pnetwork->IEs + i);
|
||||
pIE = (struct ndis_802_11_variable_ies *)(pnetwork->IEs + i);
|
||||
|
||||
if (pIE->ElementID > index)
|
||||
{
|
||||
|
@ -924,7 +924,7 @@ static void start_bss_network(struct adapter *padapter, u8 *pbuf)
|
|||
Switch_DM_Func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true);
|
||||
}
|
||||
/* set channel, bwmode */
|
||||
p = rtw_get_ie((pnetwork->IEs + sizeof(NDIS_802_11_FIXED_IEs)), _HT_ADD_INFO_IE_, &ie_len, (pnetwork->IELength - sizeof(NDIS_802_11_FIXED_IEs)));
|
||||
p = rtw_get_ie((pnetwork->IEs + sizeof(struct ndis_802_11_fixed_ies)), _HT_ADD_INFO_IE_, &ie_len, (pnetwork->IELength - sizeof(struct ndis_802_11_fixed_ies)));
|
||||
if( p && ie_len)
|
||||
{
|
||||
pht_info = (struct HT_info_element *)(p+2);
|
||||
|
@ -1065,7 +1065,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
|||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SSID_IE_, &ie_len, (pbss_network->IELength -_BEACON_IE_OFFSET_));
|
||||
if(p && ie_len>0)
|
||||
{
|
||||
memset(&pbss_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||
memset(&pbss_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||
memcpy(pbss_network->Ssid.Ssid, (p + 2), ie_len);
|
||||
pbss_network->Ssid.SsidLength = ie_len;
|
||||
}
|
||||
|
@ -1107,7 +1107,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
|||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _ERPINFO_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||
if(p && ie_len>0)
|
||||
{
|
||||
ERP_IE_handler(padapter, (PNDIS_802_11_VARIABLE_IEs)p);
|
||||
ERP_IE_handler(padapter, (struct ndis_802_11_variable_ies *)p);
|
||||
}
|
||||
|
||||
/* update privacy/security */
|
||||
|
@ -1287,9 +1287,9 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
|||
pmlmepriv->htpriv.ampdu_enable = true;
|
||||
}
|
||||
|
||||
HT_caps_handler(padapter, (PNDIS_802_11_VARIABLE_IEs)pHT_caps_ie);
|
||||
HT_caps_handler(padapter, (struct ndis_802_11_variable_ies *)pHT_caps_ie);
|
||||
|
||||
HT_info_handler(padapter, (PNDIS_802_11_VARIABLE_IEs)pHT_info_ie);
|
||||
HT_info_handler(padapter, (struct ndis_802_11_variable_ies *)pHT_info_ie);
|
||||
}
|
||||
pbss_network->Length = get_wlan_bssid_ex_sz((struct wlan_bssid_ex *)pbss_network);
|
||||
|
||||
|
@ -1470,7 +1470,7 @@ static void update_bcn_erpinfo_ie(struct adapter *padapter)
|
|||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _ERPINFO_IE_, &len, (pnetwork->IELength - _BEACON_IE_OFFSET_));
|
||||
if(p && len>0)
|
||||
{
|
||||
PNDIS_802_11_VARIABLE_IEs pIE = (PNDIS_802_11_VARIABLE_IEs)p;
|
||||
struct ndis_802_11_variable_ies * pIE = (struct ndis_802_11_variable_ies *)p;
|
||||
|
||||
if (pmlmepriv->num_sta_non_erp == 1)
|
||||
pIE->data[0] |= RTW_ERP_INFO_NON_ERP_PRESENT|RTW_ERP_INFO_USE_PROTECTION;
|
||||
|
|
|
@ -540,7 +540,7 @@ rtw_sitesurvey_cmd(~)
|
|||
### NOTE:#### (!!!!)
|
||||
MUST TAKE CARE THAT BEFORE CALLING THIS FUNC, YOU SHOULD HAVE LOCKED pmlmepriv->lock
|
||||
*/
|
||||
u8 rtw_sitesurvey_cmd(struct adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num,
|
||||
u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid, int ssid_num,
|
||||
struct rtw_ieee80211_channel *ch, int ch_num)
|
||||
{
|
||||
u8 res = _FAIL;
|
||||
|
@ -586,7 +586,7 @@ u8 rtw_sitesurvey_cmd(struct adapter *padapter, NDIS_802_11_SSID *ssid, int ssi
|
|||
int i;
|
||||
for (i=0; i<ssid_num && i< RTW_SSID_SCAN_AMOUNT; i++) {
|
||||
if (ssid[i].SsidLength) {
|
||||
memcpy(&psurveyPara->ssid[i], &ssid[i], sizeof(NDIS_802_11_SSID));
|
||||
memcpy(&psurveyPara->ssid[i], &ssid[i], sizeof(struct ndis_802_11_ssid));
|
||||
psurveyPara->ssid_num++;
|
||||
}
|
||||
}
|
||||
|
@ -981,7 +981,7 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network* pnetwork)
|
|||
struct security_priv *psecuritypriv=&padapter->securitypriv;
|
||||
struct registry_priv *pregistrypriv = &padapter->registrypriv;
|
||||
struct ht_priv *phtpriv = &pmlmepriv->htpriv;
|
||||
NDIS_802_11_NETWORK_INFRASTRUCTURE ndis_network_mode = pnetwork->network.InfrastructureMode;
|
||||
enum NDIS_802_11_NETWORK_INFRASTRUCTURE ndis_network_mode = pnetwork->network.InfrastructureMode;
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
||||
|
@ -1169,7 +1169,7 @@ exit:
|
|||
return res;
|
||||
}
|
||||
|
||||
u8 rtw_setopmode_cmd(struct adapter *padapter, NDIS_802_11_NETWORK_INFRASTRUCTURE networktype, bool enqueue)
|
||||
u8 rtw_setopmode_cmd(struct adapter *padapter, enum NDIS_802_11_NETWORK_INFRASTRUCTURE networktype, bool enqueue)
|
||||
{
|
||||
struct cmd_obj* ph2c;
|
||||
struct setopmode_parm* psetop;
|
||||
|
|
|
@ -1345,14 +1345,14 @@ void dump_wps_ie(u8 *ie, u32 ie_len)
|
|||
*/
|
||||
u32 rtw_get_p2p_merged_ies_len(u8 *in_ie, u32 in_len)
|
||||
{
|
||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
||||
struct ndis_802_11_variable_ies * pIE;
|
||||
u8 OUI[4] = { 0x50, 0x6f, 0x9a, 0x09 };
|
||||
int i=0;
|
||||
int j=0, len=0;
|
||||
|
||||
while( i < in_len)
|
||||
{
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(in_ie+ i);
|
||||
pIE = (struct ndis_802_11_variable_ies *)(in_ie+ i);
|
||||
|
||||
if( pIE->ElementID == _VENDOR_SPECIFIC_IE_ && _rtw_memcmp(pIE->data, OUI, 4) )
|
||||
{
|
||||
|
@ -1374,7 +1374,7 @@ u32 rtw_get_p2p_merged_ies_len(u8 *in_ie, u32 in_len)
|
|||
*/
|
||||
int rtw_p2p_merge_ies(u8 *in_ie, u32 in_len, u8 *merge_ie)
|
||||
{
|
||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
||||
struct ndis_802_11_variable_ies * pIE;
|
||||
u8 len = 0;
|
||||
u8 OUI[4] = { 0x50, 0x6f, 0x9a, 0x09 };
|
||||
u8 ELOUI[6] = { 0xDD, 0x00, 0x50, 0x6f, 0x9a, 0x09 }; /* EID;Len;OUI, Len would copy at the end of function */
|
||||
|
@ -1388,7 +1388,7 @@ int rtw_p2p_merge_ies(u8 *in_ie, u32 in_len, u8 *merge_ie)
|
|||
|
||||
while( i < in_len)
|
||||
{
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(in_ie+ i);
|
||||
pIE = (struct ndis_802_11_variable_ies *)(in_ie+ i);
|
||||
|
||||
/* Take out the rest of P2P OUIs */
|
||||
if( pIE->ElementID == _VENDOR_SPECIFIC_IE_ && _rtw_memcmp(pIE->data, OUI, 4) )
|
||||
|
|
|
@ -51,7 +51,7 @@ u8 rtw_validate_bssid(u8 *bssid)
|
|||
return ret;
|
||||
}
|
||||
|
||||
u8 rtw_validate_ssid(NDIS_802_11_SSID *ssid)
|
||||
u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid)
|
||||
{
|
||||
u8 i;
|
||||
u8 ret=true;
|
||||
|
@ -158,8 +158,8 @@ u8 rtw_do_join(struct adapter * padapter)
|
|||
|
||||
pibss = padapter->registrypriv.dev_network.MacAddress;
|
||||
|
||||
memset(&pdev_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
||||
memset(&pdev_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid));
|
||||
|
||||
rtw_update_registrypriv_dev_network(padapter);
|
||||
|
||||
|
@ -294,7 +294,7 @@ exit:
|
|||
return status;
|
||||
}
|
||||
|
||||
u8 rtw_set_802_11_ssid(struct adapter* padapter, NDIS_802_11_SSID *ssid)
|
||||
u8 rtw_set_802_11_ssid(struct adapter* padapter, struct ndis_802_11_ssid *ssid)
|
||||
{
|
||||
_irqL irqL;
|
||||
u8 status = _SUCCESS;
|
||||
|
@ -387,7 +387,7 @@ handle_tkip_countermeasure:
|
|||
goto release_mlme_lock;
|
||||
}
|
||||
|
||||
memcpy(&pmlmepriv->assoc_ssid, ssid, sizeof(NDIS_802_11_SSID));
|
||||
memcpy(&pmlmepriv->assoc_ssid, ssid, sizeof(struct ndis_802_11_ssid));
|
||||
pmlmepriv->assoc_by_bssid=false;
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
|
||||
|
@ -410,7 +410,7 @@ exit:
|
|||
|
||||
}
|
||||
|
||||
u8 rtw_set_802_11_connect(struct adapter* padapter, u8 *bssid, NDIS_802_11_SSID *ssid)
|
||||
u8 rtw_set_802_11_connect(struct adapter* padapter, u8 *bssid, struct ndis_802_11_ssid *ssid)
|
||||
{
|
||||
_irqL irqL;
|
||||
u8 status = _SUCCESS;
|
||||
|
@ -459,7 +459,7 @@ handle_tkip_countermeasure:
|
|||
}
|
||||
|
||||
if (ssid && ssid_valid)
|
||||
memcpy(&pmlmepriv->assoc_ssid, ssid, sizeof(NDIS_802_11_SSID));
|
||||
memcpy(&pmlmepriv->assoc_ssid, ssid, sizeof(struct ndis_802_11_ssid));
|
||||
|
||||
if (bssid && bssid_valid) {
|
||||
memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN);
|
||||
|
@ -484,12 +484,12 @@ exit:
|
|||
}
|
||||
|
||||
u8 rtw_set_802_11_infrastructure_mode(struct adapter* padapter,
|
||||
NDIS_802_11_NETWORK_INFRASTRUCTURE networktype)
|
||||
enum NDIS_802_11_NETWORK_INFRASTRUCTURE networktype)
|
||||
{
|
||||
_irqL irqL;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct wlan_network *cur_network = &pmlmepriv->cur_network;
|
||||
NDIS_802_11_NETWORK_INFRASTRUCTURE* pold_state = &(cur_network->network.InfrastructureMode);
|
||||
enum NDIS_802_11_NETWORK_INFRASTRUCTURE* pold_state = &(cur_network->network.InfrastructureMode);
|
||||
|
||||
;
|
||||
|
||||
|
@ -588,7 +588,7 @@ u8 rtw_set_802_11_disassociate(struct adapter *padapter)
|
|||
return true;
|
||||
}
|
||||
|
||||
u8 rtw_set_802_11_bssid_list_scan(struct adapter* padapter, NDIS_802_11_SSID *pssid, int ssid_max_num)
|
||||
u8 rtw_set_802_11_bssid_list_scan(struct adapter* padapter, struct ndis_802_11_ssid *pssid, int ssid_max_num)
|
||||
{
|
||||
_irqL irqL;
|
||||
struct mlme_priv *pmlmepriv= &padapter->mlmepriv;
|
||||
|
@ -638,7 +638,7 @@ exit:
|
|||
return res;
|
||||
}
|
||||
|
||||
u8 rtw_set_802_11_authentication_mode(struct adapter* padapter, NDIS_802_11_AUTHENTICATION_MODE authmode)
|
||||
u8 rtw_set_802_11_authentication_mode(struct adapter* padapter, enum NDIS_802_11_AUTHENTICATION_MODE authmode)
|
||||
{
|
||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||
int res;
|
||||
|
@ -663,7 +663,7 @@ u8 rtw_set_802_11_authentication_mode(struct adapter* padapter, NDIS_802_11_AUTH
|
|||
return ret;
|
||||
}
|
||||
|
||||
u8 rtw_set_802_11_add_wep(struct adapter* padapter, NDIS_802_11_WEP *wep){
|
||||
u8 rtw_set_802_11_add_wep(struct adapter* padapter, struct ndis_802_11_wep *wep){
|
||||
|
||||
u8 bdefaultkey;
|
||||
u8 btransmitkey;
|
||||
|
@ -771,7 +771,7 @@ exit:
|
|||
|
||||
}
|
||||
|
||||
u8 rtw_set_802_11_add_key(struct adapter* padapter, NDIS_802_11_KEY *key){
|
||||
u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key){
|
||||
|
||||
uint encryptionalgo;
|
||||
u8 * pbssid;
|
||||
|
@ -963,8 +963,8 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, NDIS_802_11_KEY *key){
|
|||
{
|
||||
u8 ret;
|
||||
u32 keyindex;
|
||||
u32 len = FIELD_OFFSET(NDIS_802_11_KEY, KeyMaterial) + key->KeyLength;
|
||||
NDIS_802_11_WEP *wep = &padapter->securitypriv.ndiswep;
|
||||
u32 len = FIELD_OFFSET(struct ndis_802_11_key, KeyMaterial) + key->KeyLength;
|
||||
struct ndis_802_11_wep *wep = &padapter->securitypriv.ndiswep;
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("OID_802_11_ADD_KEY: +++++ WEP key +++++\n"));
|
||||
|
||||
|
@ -992,12 +992,12 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, NDIS_802_11_KEY *key){
|
|||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("OID_802_11_ADD_KEY: +++++ SetRSC+++++\n"));
|
||||
if(bgroup == true)
|
||||
{
|
||||
NDIS_802_11_KEY_RSC keysrc=key->KeyRSC & 0x00FFFFFFFFFFFFULL;
|
||||
unsigned long long keysrc=key->KeyRSC & 0x00FFFFFFFFFFFFULL;
|
||||
memcpy(&padapter->securitypriv.dot11Grprxpn, &keysrc, 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
NDIS_802_11_KEY_RSC keysrc=key->KeyRSC & 0x00FFFFFFFFFFFFULL;
|
||||
unsigned long long keysrc=key->KeyRSC & 0x00FFFFFFFFFFFFULL;
|
||||
memcpy(&padapter->securitypriv.dot11Grptxpn, &keysrc, 8);
|
||||
}
|
||||
|
||||
|
@ -1133,7 +1133,7 @@ exit:
|
|||
return ret;
|
||||
}
|
||||
|
||||
u8 rtw_set_802_11_remove_key(struct adapter* padapter, NDIS_802_11_REMOVE_KEY *key){
|
||||
u8 rtw_set_802_11_remove_key(struct adapter* padapter, struct ndis_802_11_remove_key *key){
|
||||
|
||||
uint encryptionalgo;
|
||||
u8 * pbssid;
|
||||
|
|
|
@ -65,7 +65,7 @@ sint _rtw_init_mlme_priv (struct adapter* padapter)
|
|||
|
||||
set_scanned_network_val(pmlmepriv, 0);
|
||||
|
||||
memset(&pmlmepriv->assoc_ssid,0,sizeof(NDIS_802_11_SSID));
|
||||
memset(&pmlmepriv->assoc_ssid,0,sizeof(struct ndis_802_11_ssid));
|
||||
|
||||
pbuf = rtw_zvmalloc(MAX_BSS_CNT * (sizeof(struct wlan_network)));
|
||||
|
||||
|
@ -723,7 +723,7 @@ static void update_current_network(struct adapter *adapter, struct wlan_bssid_ex
|
|||
if ( (check_fwstate(pmlmepriv, _FW_LINKED)== true) && (is_same_network(&(pmlmepriv->cur_network.network), pnetwork, 0)))
|
||||
{
|
||||
update_network(&(pmlmepriv->cur_network.network), pnetwork,adapter, true);
|
||||
rtw_update_protection(adapter, (pmlmepriv->cur_network.network.IEs) + sizeof (NDIS_802_11_FIXED_IEs),
|
||||
rtw_update_protection(adapter, (pmlmepriv->cur_network.network.IEs) + sizeof (struct ndis_802_11_fixed_ies),
|
||||
pmlmepriv->cur_network.network.IELength);
|
||||
}
|
||||
|
||||
|
@ -1107,8 +1107,8 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("switching to adhoc master\n"));
|
||||
|
||||
memset(&pdev_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
||||
memset(&pdev_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid));
|
||||
|
||||
rtw_update_registrypriv_dev_network(adapter);
|
||||
rtw_generate_random_ibss(pibss);
|
||||
|
@ -1578,7 +1578,7 @@ static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_net
|
|||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("Invalid network_mode\n"));
|
||||
break;
|
||||
}
|
||||
rtw_update_protection(padapter, (cur_network->network.IEs) + sizeof (NDIS_802_11_FIXED_IEs),
|
||||
rtw_update_protection(padapter, (cur_network->network.IEs) + sizeof (struct ndis_802_11_fixed_ies),
|
||||
(cur_network->network.IELength));
|
||||
rtw_update_ht_cap(padapter, cur_network->network.IEs, cur_network->network.IELength);
|
||||
}
|
||||
|
@ -2018,8 +2018,8 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
memcpy(pdev_network, &tgt_network->network, get_wlan_bssid_ex_sz(&tgt_network->network));
|
||||
|
||||
memset(&pdev_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
||||
memset(&pdev_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid));
|
||||
|
||||
rtw_update_registrypriv_dev_network(adapter);
|
||||
|
||||
|
@ -2724,9 +2724,9 @@ void rtw_init_registrypriv_dev_network( struct adapter* adapter)
|
|||
|
||||
memcpy(pdev_network->MacAddress, myhwaddr, ETH_ALEN);
|
||||
|
||||
memcpy(&pdev_network->Ssid, &pregistrypriv->ssid, sizeof(NDIS_802_11_SSID));
|
||||
memcpy(&pdev_network->Ssid, &pregistrypriv->ssid, sizeof(struct ndis_802_11_ssid));
|
||||
|
||||
pdev_network->Configuration.Length=sizeof(NDIS_802_11_CONFIGURATION);
|
||||
pdev_network->Configuration.Length=sizeof(struct ndis_802_11_configuration);
|
||||
pdev_network->Configuration.BeaconPeriod = 100;
|
||||
pdev_network->Configuration.FHConfig.Length = 0;
|
||||
pdev_network->Configuration.FHConfig.HopPattern = 0;
|
||||
|
@ -2949,7 +2949,7 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len)
|
|||
|
||||
/* check Max Rx A-MPDU Size */
|
||||
len = 0;
|
||||
p = rtw_get_ie(pie+sizeof (NDIS_802_11_FIXED_IEs), _HT_CAPABILITY_IE_, &len, ie_len-sizeof (NDIS_802_11_FIXED_IEs));
|
||||
p = rtw_get_ie(pie+sizeof (struct ndis_802_11_fixed_ies), _HT_CAPABILITY_IE_, &len, ie_len-sizeof (struct ndis_802_11_fixed_ies));
|
||||
if(p && len>0)
|
||||
{
|
||||
pht_capie = (struct rtw_ieee80211_ht_cap *)(p+2);
|
||||
|
@ -2963,7 +2963,7 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len)
|
|||
|
||||
|
||||
len=0;
|
||||
p = rtw_get_ie(pie+sizeof (NDIS_802_11_FIXED_IEs), _HT_ADD_INFO_IE_, &len, ie_len-sizeof (NDIS_802_11_FIXED_IEs));
|
||||
p = rtw_get_ie(pie+sizeof (struct ndis_802_11_fixed_ies), _HT_ADD_INFO_IE_, &len, ie_len-sizeof (struct ndis_802_11_fixed_ies));
|
||||
if(p && len>0)
|
||||
{
|
||||
pht_addtinfo = (struct ieee80211_ht_addt_info *)(p+2);
|
||||
|
@ -3110,7 +3110,7 @@ void _rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network)
|
|||
DBG_871X("roaming from %s("MAC_FMT"), length:%d\n",
|
||||
pnetwork->network.Ssid.Ssid, MAC_ARG(pnetwork->network.MacAddress),
|
||||
pnetwork->network.Ssid.SsidLength);
|
||||
memcpy(&pmlmepriv->assoc_ssid, &pnetwork->network.Ssid, sizeof(NDIS_802_11_SSID));
|
||||
memcpy(&pmlmepriv->assoc_ssid, &pnetwork->network.Ssid, sizeof(struct ndis_802_11_ssid));
|
||||
|
||||
pmlmepriv->assoc_by_bssid = false;
|
||||
|
||||
|
|
|
@ -1889,14 +1889,14 @@ unsigned int OnAssocRsp(struct adapter *padapter, union recv_frame *precv_frame)
|
|||
uint i;
|
||||
int res;
|
||||
unsigned short status;
|
||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
||||
struct ndis_802_11_variable_ies * pIE;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
/* struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network); */
|
||||
u8 *pframe = precv_frame->u.hdr.rx_data;
|
||||
uint pkt_len = precv_frame->u.hdr.len;
|
||||
PNDIS_802_11_VARIABLE_IEs pWapiIE = NULL;
|
||||
struct ndis_802_11_variable_ies * pWapiIE = NULL;
|
||||
|
||||
DBG_871X("%s\n", __FUNCTION__);
|
||||
|
||||
|
@ -1935,7 +1935,7 @@ unsigned int OnAssocRsp(struct adapter *padapter, union recv_frame *precv_frame)
|
|||
/* for not to handle the synchronous IO in the tasklet */
|
||||
for (i = (6 + WLAN_HDR_A3_LEN); i < pkt_len;)
|
||||
{
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pframe + i);
|
||||
pIE = (struct ndis_802_11_variable_ies *)(pframe + i);
|
||||
|
||||
switch (pIE->ElementID)
|
||||
{
|
||||
|
@ -6202,7 +6202,7 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
|
|||
|
||||
}
|
||||
|
||||
static int _issue_probereq(struct adapter *padapter, NDIS_802_11_SSID *pssid, u8 *da, int wait_ack)
|
||||
static int _issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da, int wait_ack)
|
||||
{
|
||||
int ret = _FAIL;
|
||||
struct xmit_frame *pmgntframe;
|
||||
|
@ -6303,12 +6303,12 @@ exit:
|
|||
return ret;
|
||||
}
|
||||
|
||||
inline void issue_probereq(struct adapter *padapter, NDIS_802_11_SSID *pssid, u8 *da)
|
||||
inline void issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da)
|
||||
{
|
||||
_issue_probereq(padapter, pssid, da, false);
|
||||
}
|
||||
|
||||
int issue_probereq_ex(struct adapter *padapter, NDIS_802_11_SSID *pssid, u8 *da,
|
||||
int issue_probereq_ex(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da,
|
||||
int try_cnt, int wait_ms)
|
||||
{
|
||||
int ret;
|
||||
|
@ -6652,7 +6652,7 @@ void issue_assocreq(struct adapter *padapter)
|
|||
__le16 val16;
|
||||
unsigned int i, j, ie_len, index=0;
|
||||
unsigned char rf_type, bssrate[NumRates], sta_bssrate[NumRates];
|
||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
||||
struct ndis_802_11_variable_ies * pIE;
|
||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
|
@ -6785,13 +6785,13 @@ void issue_assocreq(struct adapter *padapter)
|
|||
}
|
||||
|
||||
/* RSN */
|
||||
p = rtw_get_ie((pmlmeinfo->network.IEs + sizeof(NDIS_802_11_FIXED_IEs)), _RSN_IE_2_, &ie_len, (pmlmeinfo->network.IELength - sizeof(NDIS_802_11_FIXED_IEs)));
|
||||
p = rtw_get_ie((pmlmeinfo->network.IEs + sizeof(struct ndis_802_11_fixed_ies)), _RSN_IE_2_, &ie_len, (pmlmeinfo->network.IELength - sizeof(struct ndis_802_11_fixed_ies)));
|
||||
if (p != NULL)
|
||||
pframe = rtw_set_ie(pframe, _RSN_IE_2_, ie_len, (p + 2), &(pattrib->pktlen));
|
||||
|
||||
/* HT caps */
|
||||
if(padapter->mlmepriv.htpriv.ht_option==true) {
|
||||
p = rtw_get_ie((pmlmeinfo->network.IEs + sizeof(NDIS_802_11_FIXED_IEs)), _HT_CAPABILITY_IE_, &ie_len, (pmlmeinfo->network.IELength - sizeof(NDIS_802_11_FIXED_IEs)));
|
||||
p = rtw_get_ie((pmlmeinfo->network.IEs + sizeof(struct ndis_802_11_fixed_ies)), _HT_CAPABILITY_IE_, &ie_len, (pmlmeinfo->network.IELength - sizeof(struct ndis_802_11_fixed_ies)));
|
||||
if (p && (!is_ap_in_tkip(padapter))) {
|
||||
memcpy(&(pmlmeinfo->HT_caps), (p + 2), sizeof(struct HT_caps_element));
|
||||
|
||||
|
@ -6840,9 +6840,9 @@ void issue_assocreq(struct adapter *padapter)
|
|||
}
|
||||
|
||||
/* vendor specific IE, such as WPA, WMM, WPS */
|
||||
for (i = sizeof(NDIS_802_11_FIXED_IEs); i < pmlmeinfo->network.IELength;)
|
||||
for (i = sizeof(struct ndis_802_11_fixed_ies); i < pmlmeinfo->network.IELength;)
|
||||
{
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pmlmeinfo->network.IEs + i);
|
||||
pIE = (struct ndis_802_11_variable_ies *)(pmlmeinfo->network.IEs + i);
|
||||
|
||||
switch (pIE->ElementID)
|
||||
{
|
||||
|
@ -8565,8 +8565,8 @@ void start_clnt_join(struct adapter* padapter)
|
|||
rtw_warn_on(1);
|
||||
return;
|
||||
}
|
||||
if (_rtw_memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(NDIS_802_11_SSID)) == true
|
||||
&& _rtw_memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(NDIS_802_11_MAC_ADDRESS)) == true
|
||||
if (_rtw_memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(struct ndis_802_11_ssid)) == true
|
||||
&& _rtw_memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(ETH_ALEN)) == true
|
||||
) {
|
||||
ie_offset = (scanned->network.Reserved[0] == 2? 0:12);
|
||||
if (rtw_get_p2p_ie(scanned->network.IEs+ie_offset, scanned->network.IELength-ie_offset, NULL, NULL))
|
||||
|
@ -9882,7 +9882,7 @@ u8 createbss_hdl(struct adapter *padapter, u8 *pbuf)
|
|||
u8 join_cmd_hdl(struct adapter *padapter, u8 *pbuf)
|
||||
{
|
||||
u8 join_type;
|
||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
||||
struct ndis_802_11_variable_ies * pIE;
|
||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
@ -9943,9 +9943,9 @@ u8 join_cmd_hdl(struct adapter *padapter, u8 *pbuf)
|
|||
/* Check AP vendor to move rtw_joinbss_cmd() */
|
||||
/* pmlmeinfo->assoc_AP_vendor = check_assoc_AP(pnetwork->IEs, pnetwork->IELength); */
|
||||
|
||||
for (i = sizeof(NDIS_802_11_FIXED_IEs); i < pnetwork->IELength;)
|
||||
for (i = sizeof(struct ndis_802_11_fixed_ies); i < pnetwork->IELength;)
|
||||
{
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pnetwork->IEs + i);
|
||||
pIE = (struct ndis_802_11_variable_ies *)(pnetwork->IEs + i);
|
||||
|
||||
switch (pIE->ElementID)
|
||||
{
|
||||
|
|
|
@ -3135,12 +3135,12 @@ static void find_phase_handler( struct adapter* padapter )
|
|||
{
|
||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
NDIS_802_11_SSID ssid;
|
||||
struct ndis_802_11_ssid ssid;
|
||||
_irqL irqL;
|
||||
u8 _status = 0;
|
||||
|
||||
|
||||
memset((unsigned char*)&ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||
memset((unsigned char*)&ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||
memcpy(ssid.Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN );
|
||||
ssid.SsidLength = P2P_WILDCARD_SSID_LEN;
|
||||
|
||||
|
|
|
@ -623,7 +623,7 @@ u32 rtw_init_bcmc_stainfo(struct adapter* padapter)
|
|||
struct sta_info *psta;
|
||||
struct tx_servq *ptxservq;
|
||||
u32 res=_SUCCESS;
|
||||
NDIS_802_11_MAC_ADDRESS bcast_addr= {0xff,0xff,0xff,0xff,0xff,0xff};
|
||||
u8 bcast_addr[ETH_ALEN] = {0xff,0xff,0xff,0xff,0xff,0xff};
|
||||
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
/* _queue *pstapending = &padapter->xmitpriv.bm_pending; */
|
||||
|
|
|
@ -701,7 +701,7 @@ void flush_all_cam_entry(struct adapter *padapter)
|
|||
}
|
||||
|
||||
#if defined(CONFIG_P2P) && defined(CONFIG_P2P)
|
||||
int WFD_info_handler(struct adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
||||
int WFD_info_handler(struct adapter *padapter, struct ndis_802_11_variable_ies * pIE)
|
||||
{
|
||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
|
@ -736,7 +736,7 @@ int WFD_info_handler(struct adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
|||
}
|
||||
#endif
|
||||
|
||||
int WMM_param_handler(struct adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
||||
int WMM_param_handler(struct adapter *padapter, struct ndis_802_11_variable_ies * pIE)
|
||||
{
|
||||
/* struct registry_priv *pregpriv = &padapter->registrypriv; */
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
|
@ -875,7 +875,7 @@ void WMMOnAssocRsp(struct adapter *padapter)
|
|||
return;
|
||||
}
|
||||
|
||||
static void bwmode_update_check(struct adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
||||
static void bwmode_update_check(struct adapter *padapter, struct ndis_802_11_variable_ies * pIE)
|
||||
{
|
||||
unsigned char new_bwmode;
|
||||
unsigned char new_ch_offset;
|
||||
|
@ -970,7 +970,7 @@ static void bwmode_update_check(struct adapter *padapter, PNDIS_802_11_VARIABLE_
|
|||
}
|
||||
}
|
||||
|
||||
void HT_caps_handler(struct adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
||||
void HT_caps_handler(struct adapter *padapter, struct ndis_802_11_variable_ies * pIE)
|
||||
{
|
||||
unsigned int i;
|
||||
u8 rf_type;
|
||||
|
@ -1037,7 +1037,7 @@ void HT_caps_handler(struct adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
|||
}
|
||||
}
|
||||
|
||||
void HT_info_handler(struct adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
||||
void HT_info_handler(struct adapter *padapter, struct ndis_802_11_variable_ies * pIE)
|
||||
{
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
@ -1091,7 +1091,7 @@ void HTOnAssocRsp(struct adapter *padapter)
|
|||
rtw_hal_set_hwreg(padapter, HW_VAR_AMPDU_FACTOR, (u8 *)(&max_AMPDU_len));
|
||||
}
|
||||
|
||||
void ERP_IE_handler(struct adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
||||
void ERP_IE_handler(struct adapter *padapter, struct ndis_802_11_variable_ies * pIE)
|
||||
{
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
@ -1368,13 +1368,13 @@ void update_beacon_info(struct adapter *padapter, u8 *pframe, uint pkt_len, stru
|
|||
{
|
||||
unsigned int i;
|
||||
unsigned int len;
|
||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
||||
struct ndis_802_11_variable_ies * pIE;
|
||||
|
||||
len = pkt_len - (_BEACON_IE_OFFSET_ + WLAN_HDR_A3_LEN);
|
||||
|
||||
for (i = 0; i < len;)
|
||||
{
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pframe + (_BEACON_IE_OFFSET_ + WLAN_HDR_A3_LEN) + i);
|
||||
pIE = (struct ndis_802_11_variable_ies *)(pframe + (_BEACON_IE_OFFSET_ + WLAN_HDR_A3_LEN) + i);
|
||||
|
||||
switch (pIE->ElementID) {
|
||||
case _HT_EXTRA_INFO_IE_: /* HT info */
|
||||
|
@ -1399,14 +1399,14 @@ void process_csa_ie(struct adapter *padapter, u8 *pframe, uint pkt_len)
|
|||
{
|
||||
unsigned int i;
|
||||
unsigned int len;
|
||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
||||
struct ndis_802_11_variable_ies * pIE;
|
||||
u8 new_ch_no = 0;
|
||||
|
||||
len = pkt_len - (_BEACON_IE_OFFSET_ + WLAN_HDR_A3_LEN);
|
||||
|
||||
for (i = 0; i < len;)
|
||||
{
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pframe + (_BEACON_IE_OFFSET_ + WLAN_HDR_A3_LEN) + i);
|
||||
pIE = (struct ndis_802_11_variable_ies *)(pframe + (_BEACON_IE_OFFSET_ + WLAN_HDR_A3_LEN) + i);
|
||||
|
||||
switch (pIE->ElementID)
|
||||
{
|
||||
|
@ -1427,16 +1427,16 @@ void process_csa_ie(struct adapter *padapter, u8 *pframe, uint pkt_len)
|
|||
unsigned int is_ap_in_tkip(struct adapter *padapter)
|
||||
{
|
||||
u32 i;
|
||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
||||
struct ndis_802_11_variable_ies * pIE;
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network);
|
||||
|
||||
if (rtw_get_capability((struct wlan_bssid_ex *)cur_network) & WLAN_CAPABILITY_PRIVACY)
|
||||
{
|
||||
for (i = sizeof(NDIS_802_11_FIXED_IEs); i < pmlmeinfo->network.IELength;)
|
||||
for (i = sizeof(struct ndis_802_11_fixed_ies); i < pmlmeinfo->network.IELength;)
|
||||
{
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pmlmeinfo->network.IEs + i);
|
||||
pIE = (struct ndis_802_11_variable_ies *)(pmlmeinfo->network.IEs + i);
|
||||
|
||||
switch (pIE->ElementID)
|
||||
{
|
||||
|
@ -1472,15 +1472,15 @@ unsigned int is_ap_in_tkip(struct adapter *padapter)
|
|||
unsigned int should_forbid_n_rate(struct adapter * padapter)
|
||||
{
|
||||
u32 i;
|
||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
||||
struct ndis_802_11_variable_ies * pIE;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct wlan_bssid_ex *cur_network = &pmlmepriv->cur_network.network;
|
||||
|
||||
if (rtw_get_capability((struct wlan_bssid_ex *)cur_network) & WLAN_CAPABILITY_PRIVACY)
|
||||
{
|
||||
for (i = sizeof(NDIS_802_11_FIXED_IEs); i < cur_network->IELength;)
|
||||
for (i = sizeof(struct ndis_802_11_fixed_ies); i < cur_network->IELength;)
|
||||
{
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(cur_network->IEs + i);
|
||||
pIE = (struct ndis_802_11_variable_ies *)(cur_network->IEs + i);
|
||||
|
||||
switch (pIE->ElementID)
|
||||
{
|
||||
|
@ -1508,16 +1508,16 @@ unsigned int should_forbid_n_rate(struct adapter * padapter)
|
|||
unsigned int is_ap_in_wep(struct adapter *padapter)
|
||||
{
|
||||
u32 i;
|
||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
||||
struct ndis_802_11_variable_ies * pIE;
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network);
|
||||
|
||||
if (rtw_get_capability((struct wlan_bssid_ex *)cur_network) & WLAN_CAPABILITY_PRIVACY)
|
||||
{
|
||||
for (i = sizeof(NDIS_802_11_FIXED_IEs); i < pmlmeinfo->network.IELength;)
|
||||
for (i = sizeof(struct ndis_802_11_fixed_ies); i < pmlmeinfo->network.IELength;)
|
||||
{
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pmlmeinfo->network.IEs + i);
|
||||
pIE = (struct ndis_802_11_variable_ies *)(pmlmeinfo->network.IEs + i);
|
||||
|
||||
switch (pIE->ElementID)
|
||||
{
|
||||
|
@ -1720,7 +1720,7 @@ void set_sta_rate(struct adapter *padapter, struct sta_info *psta)
|
|||
/* Update RRSR and Rate for USERATE */
|
||||
void update_tx_basic_rate(struct adapter *padapter, u8 wirelessmode)
|
||||
{
|
||||
NDIS_802_11_RATES_EX supported_rates;
|
||||
u8 supported_rates[NDIS_802_11_LENGTH_RATES_EX];
|
||||
#ifdef CONFIG_P2P
|
||||
struct wifidirect_info* pwdinfo = &padapter->wdinfo;
|
||||
|
||||
|
@ -1751,15 +1751,15 @@ void update_tx_basic_rate(struct adapter *padapter, u8 wirelessmode)
|
|||
unsigned char check_assoc_AP(u8 *pframe, uint len)
|
||||
{
|
||||
unsigned int i;
|
||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
||||
struct ndis_802_11_variable_ies * pIE;
|
||||
u8 epigram_vendor_flag;
|
||||
u8 ralink_vendor_flag;
|
||||
epigram_vendor_flag = 0;
|
||||
ralink_vendor_flag = 0;
|
||||
|
||||
for (i = sizeof(NDIS_802_11_FIXED_IEs); i < len;)
|
||||
for (i = sizeof(struct ndis_802_11_fixed_ies); i < len;)
|
||||
{
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pframe + i);
|
||||
pIE = (struct ndis_802_11_variable_ies *)(pframe + i);
|
||||
|
||||
switch (pIE->ElementID)
|
||||
{
|
||||
|
@ -2018,12 +2018,12 @@ void update_bmc_sta_support_rate(struct adapter *padapter, u32 mac_id)
|
|||
int update_sta_support_rate(struct adapter *padapter, u8* pvar_ie, uint var_ie_len, int cam_idx)
|
||||
{
|
||||
unsigned int ie_len;
|
||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
||||
struct ndis_802_11_variable_ies * pIE;
|
||||
int supportRateNum = 0;
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)rtw_get_ie(pvar_ie, _SUPPORTEDRATES_IE_, &ie_len, var_ie_len);
|
||||
pIE = (struct ndis_802_11_variable_ies *)rtw_get_ie(pvar_ie, _SUPPORTEDRATES_IE_, &ie_len, var_ie_len);
|
||||
if (pIE == NULL)
|
||||
{
|
||||
return _FAIL;
|
||||
|
@ -2032,7 +2032,7 @@ int update_sta_support_rate(struct adapter *padapter, u8* pvar_ie, uint var_ie_l
|
|||
memcpy(pmlmeinfo->FW_sta_info[cam_idx].SupportedRates, pIE->data, ie_len);
|
||||
supportRateNum = ie_len;
|
||||
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)rtw_get_ie(pvar_ie, _EXT_SUPPORTEDRATES_IE_, &ie_len, var_ie_len);
|
||||
pIE = (struct ndis_802_11_variable_ies *)rtw_get_ie(pvar_ie, _EXT_SUPPORTEDRATES_IE_, &ie_len, var_ie_len);
|
||||
if (pIE)
|
||||
{
|
||||
memcpy((pmlmeinfo->FW_sta_info[cam_idx].SupportedRates + supportRateNum), pIE->data, ie_len);
|
||||
|
|
|
@ -379,8 +379,8 @@ static void ConstructBeacon(struct adapter *padapter, u8 *pframe, u32 *pLength)
|
|||
if( (pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE)
|
||||
{
|
||||
/* DBG_871X("ie len=%d\n", cur_network->IELength); */
|
||||
pktlen += cur_network->IELength - sizeof(NDIS_802_11_FIXED_IEs);
|
||||
memcpy(pframe, cur_network->IEs+sizeof(NDIS_802_11_FIXED_IEs), pktlen);
|
||||
pktlen += cur_network->IELength - sizeof(struct ndis_802_11_fixed_ies);
|
||||
memcpy(pframe, cur_network->IEs+sizeof(struct ndis_802_11_fixed_ies), pktlen);
|
||||
|
||||
goto _ConstructBeacon;
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ struct registry_priv {
|
|||
u8 rfintfs;
|
||||
u8 lbkmode;
|
||||
u8 hci;
|
||||
NDIS_802_11_SSID ssid;
|
||||
struct ndis_802_11_ssid ssid;
|
||||
u8 network_mode; //infra, ad-hoc, auto
|
||||
u8 channel;//ad-hoc support requirement
|
||||
u8 wireless_mode;//A, B, G, auto
|
||||
|
|
|
@ -258,7 +258,7 @@ struct sitesurvey_parm {
|
|||
/* sint bsslimit; // 1 ~ 48 */
|
||||
u8 ssid_num;
|
||||
u8 ch_num;
|
||||
NDIS_802_11_SSID ssid[RTW_SSID_SCAN_AMOUNT];
|
||||
struct ndis_802_11_ssid ssid[RTW_SSID_SCAN_AMOUNT];
|
||||
struct rtw_ieee80211_channel ch[RTW_CHANNEL_SCAN_AMOUNT];
|
||||
};
|
||||
|
||||
|
@ -898,7 +898,7 @@ Result:
|
|||
|
||||
u8 rtw_setassocsta_cmd(struct adapter *padapter, u8 *mac_addr);
|
||||
u8 rtw_setstandby_cmd(struct adapter *padapter, uint action);
|
||||
u8 rtw_sitesurvey_cmd(struct adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num, struct rtw_ieee80211_channel *ch, int ch_num);
|
||||
u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid, int ssid_num, struct rtw_ieee80211_channel *ch, int ch_num);
|
||||
u8 rtw_createbss_cmd(struct adapter *padapter);
|
||||
u8 rtw_createbss_cmd_ex(struct adapter *padapter, unsigned char *pbss, unsigned int sz);
|
||||
u8 rtw_setphy_cmd(struct adapter *padapter, u8 modem, u8 ch);
|
||||
|
@ -906,7 +906,7 @@ u8 rtw_setstakey_cmd(struct adapter *padapter, u8 *psta, u8 unicast_key, bool e
|
|||
u8 rtw_clearstakey_cmd(struct adapter *padapter, u8 *psta, u8 entry, u8 enqueue);
|
||||
u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network* pnetwork);
|
||||
u8 rtw_disassoc_cmd(struct adapter *padapter, u32 deauth_timeout_ms, bool enqueue);
|
||||
u8 rtw_setopmode_cmd(struct adapter *padapter, NDIS_802_11_NETWORK_INFRASTRUCTURE networktype, bool enqueue);
|
||||
u8 rtw_setopmode_cmd(struct adapter *padapter, enum NDIS_802_11_NETWORK_INFRASTRUCTURE networktype, bool enqueue);
|
||||
u8 rtw_setdatarate_cmd(struct adapter *padapter, u8 *rateset);
|
||||
u8 rtw_setbasicrate_cmd(struct adapter *padapter, u8 *rateset);
|
||||
u8 rtw_setbbreg_cmd(struct adapter * padapter, u8 offset, u8 val);
|
||||
|
|
|
@ -27,25 +27,25 @@
|
|||
typedef u8 NDIS_802_11_PMKID_VALUE[16];
|
||||
|
||||
typedef struct _BSSIDInfo {
|
||||
NDIS_802_11_MAC_ADDRESS BSSID;
|
||||
u8 BSSID[ETH_ALEN];
|
||||
NDIS_802_11_PMKID_VALUE PMKID;
|
||||
} BSSIDInfo, *PBSSIDInfo;
|
||||
|
||||
|
||||
u8 rtw_set_802_11_add_key(struct adapter * padapter, NDIS_802_11_KEY * key);
|
||||
u8 rtw_set_802_11_authentication_mode(struct adapter *pdapter, NDIS_802_11_AUTHENTICATION_MODE authmode);
|
||||
u8 rtw_set_802_11_add_key(struct adapter * padapter, struct ndis_802_11_key * key);
|
||||
u8 rtw_set_802_11_authentication_mode(struct adapter *pdapter, enum NDIS_802_11_AUTHENTICATION_MODE authmode);
|
||||
u8 rtw_set_802_11_bssid(struct adapter* padapter, u8 *bssid);
|
||||
u8 rtw_set_802_11_add_wep(struct adapter * padapter, NDIS_802_11_WEP * wep);
|
||||
u8 rtw_set_802_11_add_wep(struct adapter * padapter, struct ndis_802_11_wep * wep);
|
||||
u8 rtw_set_802_11_disassociate(struct adapter * padapter);
|
||||
u8 rtw_set_802_11_bssid_list_scan(struct adapter* padapter, NDIS_802_11_SSID *pssid, int ssid_max_num);
|
||||
u8 rtw_set_802_11_infrastructure_mode(struct adapter * padapter, NDIS_802_11_NETWORK_INFRASTRUCTURE networktype);
|
||||
u8 rtw_set_802_11_bssid_list_scan(struct adapter* padapter, struct ndis_802_11_ssid *pssid, int ssid_max_num);
|
||||
u8 rtw_set_802_11_infrastructure_mode(struct adapter * padapter, enum NDIS_802_11_NETWORK_INFRASTRUCTURE networktype);
|
||||
u8 rtw_set_802_11_remove_wep(struct adapter * padapter, u32 keyindex);
|
||||
u8 rtw_set_802_11_ssid(struct adapter * padapter, NDIS_802_11_SSID * ssid);
|
||||
u8 rtw_set_802_11_connect(struct adapter* padapter, u8 *bssid, NDIS_802_11_SSID *ssid);
|
||||
u8 rtw_set_802_11_remove_key(struct adapter * padapter, NDIS_802_11_REMOVE_KEY * key);
|
||||
u8 rtw_set_802_11_ssid(struct adapter * padapter, struct ndis_802_11_ssid * ssid);
|
||||
u8 rtw_set_802_11_connect(struct adapter* padapter, u8 *bssid, struct ndis_802_11_ssid *ssid);
|
||||
u8 rtw_set_802_11_remove_key(struct adapter * padapter, struct ndis_802_11_remove_key * key);
|
||||
|
||||
u8 rtw_validate_bssid(u8 *bssid);
|
||||
u8 rtw_validate_ssid(NDIS_802_11_SSID *ssid);
|
||||
u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid);
|
||||
|
||||
u16 rtw_get_cur_max_rate(struct adapter *adapter);
|
||||
int rtw_set_scan_mode(struct adapter *adapter, RT_SCAN_TYPE scan_mode);
|
||||
|
|
|
@ -216,7 +216,7 @@ struct wifi_display_info{
|
|||
struct tx_provdisc_req_info{
|
||||
u16 wps_config_method_request; // Used when sending the provisioning request frame
|
||||
u16 peer_channel_num[2]; // The channel number which the receiver stands.
|
||||
NDIS_802_11_SSID ssid;
|
||||
struct ndis_802_11_ssid ssid;
|
||||
u8 peerDevAddr[ ETH_ALEN ]; // Peer device address
|
||||
u8 peerIFAddr[ ETH_ALEN ]; // Peer interface address
|
||||
u8 benable; // This provision discovery request frame is trigger to send or not
|
||||
|
@ -392,7 +392,7 @@ struct mlme_priv {
|
|||
u8 *free_bss_buf;
|
||||
u32 num_of_scanned;
|
||||
|
||||
NDIS_802_11_SSID assoc_ssid;
|
||||
struct ndis_802_11_ssid assoc_ssid;
|
||||
u8 assoc_bssid[6];
|
||||
|
||||
struct wlan_network cur_network;
|
||||
|
|
|
@ -287,7 +287,7 @@ struct ss_res
|
|||
int scan_mode;
|
||||
u8 ssid_num;
|
||||
u8 ch_num;
|
||||
NDIS_802_11_SSID ssid[RTW_SSID_SCAN_AMOUNT];
|
||||
struct ndis_802_11_ssid ssid[RTW_SSID_SCAN_AMOUNT];
|
||||
struct rtw_ieee80211_channel ch[RTW_CHANNEL_SCAN_AMOUNT];
|
||||
};
|
||||
|
||||
|
@ -311,7 +311,7 @@ struct FW_Sta_Info
|
|||
u32 status;
|
||||
u32 rx_pkt;
|
||||
u32 retry;
|
||||
NDIS_802_11_RATES_EX SupportedRates;
|
||||
u8 SupportedRates[NDIS_802_11_LENGTH_RATES_EX];
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -544,17 +544,17 @@ int is_IBSS_empty(struct adapter *padapter);
|
|||
|
||||
unsigned char check_assoc_AP(u8 *pframe, uint len);
|
||||
|
||||
int WMM_param_handler(struct adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE);
|
||||
int WMM_param_handler(struct adapter *padapter, struct ndis_802_11_variable_ies * pIE);
|
||||
#ifdef CONFIG_P2P
|
||||
int WFD_info_handler(struct adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE);
|
||||
int WFD_info_handler(struct adapter *padapter, struct ndis_802_11_variable_ies * pIE);
|
||||
#endif
|
||||
void WMMOnAssocRsp(struct adapter *padapter);
|
||||
|
||||
void HT_caps_handler(struct adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE);
|
||||
void HT_info_handler(struct adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE);
|
||||
void HT_caps_handler(struct adapter *padapter, struct ndis_802_11_variable_ies * pIE);
|
||||
void HT_info_handler(struct adapter *padapter, struct ndis_802_11_variable_ies * pIE);
|
||||
void HTOnAssocRsp(struct adapter *padapter);
|
||||
|
||||
void ERP_IE_handler(struct adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE);
|
||||
void ERP_IE_handler(struct adapter *padapter, struct ndis_802_11_variable_ies * pIE);
|
||||
void VCS_update(struct adapter *padapter, struct sta_info *psta);
|
||||
|
||||
void update_beacon_info(struct adapter *padapter, u8 *pframe, uint len, struct sta_info *psta);
|
||||
|
@ -614,8 +614,8 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
|
|||
void issue_assocreq(struct adapter *padapter);
|
||||
void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_info *pstat, int pkt_type);
|
||||
void issue_auth(struct adapter *padapter, struct sta_info *psta, unsigned short status);
|
||||
void issue_probereq(struct adapter *padapter, NDIS_802_11_SSID *pssid, u8 *da);
|
||||
s32 issue_probereq_ex(struct adapter *padapter, NDIS_802_11_SSID *pssid, u8* da, int try_cnt, int wait_ms);
|
||||
void issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da);
|
||||
s32 issue_probereq_ex(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8* da, int try_cnt, int wait_ms);
|
||||
int issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned int power_mode, int try_cnt, int wait_ms);
|
||||
int issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16 tid, int try_cnt, int wait_ms);
|
||||
int issue_deauth(struct adapter *padapter, unsigned char *da, unsigned short reason);
|
||||
|
|
|
@ -333,27 +333,18 @@ struct mp_priv {
|
|||
u8 txpoweridx_b;
|
||||
u8 rateidx;
|
||||
u32 preamble;
|
||||
// u8 modem;
|
||||
u32 CrystalCap;
|
||||
// u32 curr_crystalcap;
|
||||
|
||||
u16 antenna_tx;
|
||||
u16 antenna_rx;
|
||||
// u8 curr_rfpath;
|
||||
|
||||
u8 check_mp_pkt;
|
||||
|
||||
u8 bSetTxPower;
|
||||
// uint ForcedDataRate;
|
||||
|
||||
struct wlan_network mp_network;
|
||||
NDIS_802_11_MAC_ADDRESS network_macaddr;
|
||||
u8 network_macaddr[ETH_ALEN];
|
||||
|
||||
u8 *pallocated_mp_xmitframe_buf;
|
||||
u8 *pmp_xmtframe_buf;
|
||||
_queue free_mp_xmitqueue;
|
||||
u32 free_mp_xmitframe_cnt;
|
||||
|
||||
MPT_CONTEXT MptCtx;
|
||||
};
|
||||
|
||||
|
|
|
@ -171,12 +171,12 @@ struct security_priv
|
|||
|
||||
|
||||
//keeps the auth_type & enc_status from upper layer ioctl(wpa_supplicant or wzc)
|
||||
u32 ndisauthtype; // NDIS_802_11_AUTHENTICATION_MODE
|
||||
u32 ndisauthtype; // enum NDIS_802_11_AUTHENTICATION_MODE
|
||||
u32 ndisencryptstatus; // NDIS_802_11_ENCRYPTION_STATUS
|
||||
|
||||
struct wlan_bssid_ex sec_bss; //for joinbss (h2c buffer) usage
|
||||
|
||||
NDIS_802_11_WEP ndiswep;
|
||||
struct ndis_802_11_wep ndiswep;
|
||||
|
||||
u8 assoc_info[600];
|
||||
u8 szofcapability[256]; //for wpa2 usage
|
||||
|
|
|
@ -26,102 +26,73 @@
|
|||
#define NDIS_802_11_LENGTH_RATES 8
|
||||
#define NDIS_802_11_LENGTH_RATES_EX 16
|
||||
|
||||
typedef unsigned char NDIS_802_11_MAC_ADDRESS[6];
|
||||
typedef long NDIS_802_11_RSSI; // in dBm
|
||||
typedef unsigned char NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; // Set of 8 data rates
|
||||
typedef unsigned char NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; // Set of 16 data rates
|
||||
struct ndis_802_11_ssid {
|
||||
ULONG SsidLength;
|
||||
u8 Ssid[32];
|
||||
};
|
||||
|
||||
enum NDIS_802_11_NETWORK_TYPE {
|
||||
Ndis802_11FH,
|
||||
Ndis802_11DS,
|
||||
Ndis802_11OFDM5,
|
||||
Ndis802_11OFDM24,
|
||||
Ndis802_11NetworkTypeMax // not a real type, defined as an upper bound
|
||||
};
|
||||
|
||||
typedef ULONG NDIS_802_11_KEY_INDEX;
|
||||
typedef unsigned long long NDIS_802_11_KEY_RSC;
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_SSID
|
||||
{
|
||||
ULONG SsidLength;
|
||||
u8 Ssid[32];
|
||||
} NDIS_802_11_SSID, *PNDIS_802_11_SSID;
|
||||
|
||||
typedef enum _NDIS_802_11_NETWORK_TYPE
|
||||
{
|
||||
Ndis802_11FH,
|
||||
Ndis802_11DS,
|
||||
Ndis802_11OFDM5,
|
||||
Ndis802_11OFDM24,
|
||||
Ndis802_11NetworkTypeMax // not a real type, defined as an upper bound
|
||||
} NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE;
|
||||
|
||||
typedef struct _NDIS_802_11_CONFIGURATION_FH
|
||||
{
|
||||
ULONG Length; // Length of structure
|
||||
ULONG HopPattern; // As defined by 802.11, MSB set
|
||||
ULONG HopSet; // to one if non-802.11
|
||||
ULONG DwellTime; // units are Kusec
|
||||
} NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH;
|
||||
|
||||
struct ndis_802_11_configuration_fh {
|
||||
ULONG Length; // Length of structure
|
||||
ULONG HopPattern; // As defined by 802.11, MSB set
|
||||
ULONG HopSet; // to one if non-802.11
|
||||
ULONG DwellTime; // units are Kusec
|
||||
};
|
||||
|
||||
/*
|
||||
FW will only save the channel number in DSConfig.
|
||||
ODI Handler will convert the channel number to freq. number.
|
||||
*/
|
||||
typedef struct _NDIS_802_11_CONFIGURATION
|
||||
{
|
||||
struct ndis_802_11_configuration {
|
||||
ULONG Length; // Length of structure
|
||||
ULONG BeaconPeriod; // units are Kusec
|
||||
ULONG ATIMWindow; // units are Kusec
|
||||
ULONG DSConfig; // Frequency, units are kHz
|
||||
NDIS_802_11_CONFIGURATION_FH FHConfig;
|
||||
} NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION;
|
||||
struct ndis_802_11_configuration_fh FHConfig;
|
||||
};
|
||||
// struct ndis_802_11_configuration, *Pstruct ndis_802_11_configuration;
|
||||
|
||||
|
||||
|
||||
typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE
|
||||
{
|
||||
Ndis802_11IBSS,
|
||||
Ndis802_11Infrastructure,
|
||||
Ndis802_11AutoUnknown,
|
||||
Ndis802_11InfrastructureMax, // Not a real value, defined as upper bound
|
||||
Ndis802_11APMode
|
||||
} NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_FIXED_IEs
|
||||
{
|
||||
u8 Timestamp[8];
|
||||
u16 BeaconInterval;
|
||||
u16 Capabilities;
|
||||
} NDIS_802_11_FIXED_IEs, *PNDIS_802_11_FIXED_IEs;
|
||||
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_VARIABLE_IEs
|
||||
{
|
||||
u8 ElementID;
|
||||
u8 Length;
|
||||
u8 data[1];
|
||||
} NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs;
|
||||
enum NDIS_802_11_NETWORK_INFRASTRUCTURE {
|
||||
Ndis802_11IBSS,
|
||||
Ndis802_11Infrastructure,
|
||||
Ndis802_11AutoUnknown,
|
||||
Ndis802_11InfrastructureMax, // Not a real value, defined as upper bound
|
||||
Ndis802_11APMode
|
||||
};
|
||||
|
||||
struct ndis_802_11_fixed_ies {
|
||||
u8 Timestamp[8];
|
||||
u16 BeaconInterval;
|
||||
u16 Capabilities;
|
||||
};
|
||||
|
||||
struct ndis_802_11_variable_ies {
|
||||
u8 ElementID;
|
||||
u8 Length;
|
||||
u8 data[1];
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
|
||||
|
||||
Length is the 4 bytes multiples of the sume of
|
||||
sizeof (NDIS_802_11_MAC_ADDRESS) + 2 + sizeof (NDIS_802_11_SSID) + sizeof (ULONG)
|
||||
+ sizeof (NDIS_802_11_RSSI) + sizeof (NDIS_802_11_NETWORK_TYPE) + sizeof (NDIS_802_11_CONFIGURATION)
|
||||
+ sizeof (NDIS_802_11_RATES_EX) + IELength
|
||||
sizeof (6) + 2 + sizeof (struct ndis_802_11_ssid) + sizeof (ULONG)
|
||||
+ sizeof (long) + sizeof (enum NDIS_802_11_NETWORK_TYPE) + sizeof (struct ndis_802_11_configuration)
|
||||
+ sizeof (NDIS_802_11_LENGTH_RATES_EX) + IELength
|
||||
|
||||
Except the IELength, all other fields are fixed length. Therefore, we can define a marco to present the
|
||||
partial sum.
|
||||
|
||||
*/
|
||||
|
||||
typedef enum _NDIS_802_11_AUTHENTICATION_MODE
|
||||
{
|
||||
enum NDIS_802_11_AUTHENTICATION_MODE {
|
||||
Ndis802_11AuthModeOpen,
|
||||
Ndis802_11AuthModeShared,
|
||||
Ndis802_11AuthModeAutoSwitch,
|
||||
|
@ -130,10 +101,9 @@ typedef enum _NDIS_802_11_AUTHENTICATION_MODE
|
|||
Ndis802_11AuthModeWPANone,
|
||||
Ndis802_11AuthModeWAPI,
|
||||
Ndis802_11AuthModeMax // Not a real mode, defined as upper bound
|
||||
} NDIS_802_11_AUTHENTICATION_MODE, *PNDIS_802_11_AUTHENTICATION_MODE;
|
||||
};
|
||||
|
||||
typedef enum _NDIS_802_11_WEP_STATUS
|
||||
{
|
||||
enum NDIS_802_11_WEP_STATUS {
|
||||
Ndis802_11WEPEnabled,
|
||||
Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
|
||||
Ndis802_11WEPDisabled,
|
||||
|
@ -147,8 +117,7 @@ typedef enum _NDIS_802_11_WEP_STATUS
|
|||
Ndis802_11Encryption3Enabled,
|
||||
Ndis802_11Encryption3KeyAbsent,
|
||||
Ndis802_11_EncrypteionWAPI
|
||||
} NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS,
|
||||
NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS;
|
||||
};
|
||||
|
||||
|
||||
#define NDIS_802_11_AI_REQFI_CAPABILITIES 1
|
||||
|
@ -159,84 +128,45 @@ typedef enum _NDIS_802_11_WEP_STATUS
|
|||
#define NDIS_802_11_AI_RESFI_STATUSCODE 2
|
||||
#define NDIS_802_11_AI_RESFI_ASSOCIATIONID 4
|
||||
|
||||
typedef struct _NDIS_802_11_AI_REQFI
|
||||
{
|
||||
u16 Capabilities;
|
||||
u16 ListenInterval;
|
||||
NDIS_802_11_MAC_ADDRESS CurrentAPAddress;
|
||||
} NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI;
|
||||
|
||||
typedef struct _NDIS_802_11_AI_RESFI
|
||||
{
|
||||
u16 Capabilities;
|
||||
u16 StatusCode;
|
||||
u16 AssociationId;
|
||||
} NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI;
|
||||
|
||||
typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION
|
||||
{
|
||||
ULONG Length;
|
||||
u16 AvailableRequestFixedIEs;
|
||||
NDIS_802_11_AI_REQFI RequestFixedIEs;
|
||||
ULONG RequestIELength;
|
||||
ULONG OffsetRequestIEs;
|
||||
u16 AvailableResponseFixedIEs;
|
||||
NDIS_802_11_AI_RESFI ResponseFixedIEs;
|
||||
ULONG ResponseIELength;
|
||||
ULONG OffsetResponseIEs;
|
||||
} NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION;
|
||||
|
||||
typedef enum _NDIS_802_11_RELOAD_DEFAULTS
|
||||
{
|
||||
Ndis802_11ReloadWEPKeys
|
||||
} NDIS_802_11_RELOAD_DEFAULTS, *PNDIS_802_11_RELOAD_DEFAULTS;
|
||||
|
||||
|
||||
// Key mapping keys require a BSSID
|
||||
typedef struct _NDIS_802_11_KEY
|
||||
{
|
||||
/* Key mapping keys require a BSSID */
|
||||
struct ndis_802_11_key {
|
||||
ULONG Length; // Length of this structure
|
||||
ULONG KeyIndex;
|
||||
ULONG KeyLength; // length of key in bytes
|
||||
NDIS_802_11_MAC_ADDRESS BSSID;
|
||||
NDIS_802_11_KEY_RSC KeyRSC;
|
||||
u8 BSSID[ETH_ALEN];
|
||||
unsigned long long KeyRSC;
|
||||
u8 KeyMaterial[32]; // variable length depending on above field
|
||||
} NDIS_802_11_KEY, *PNDIS_802_11_KEY;
|
||||
};
|
||||
|
||||
typedef struct _NDIS_802_11_REMOVE_KEY
|
||||
{
|
||||
struct ndis_802_11_remove_key {
|
||||
ULONG Length; // Length of this structure
|
||||
ULONG KeyIndex;
|
||||
NDIS_802_11_MAC_ADDRESS BSSID;
|
||||
} NDIS_802_11_REMOVE_KEY, *PNDIS_802_11_REMOVE_KEY;
|
||||
u8 BSSID[ETH_ALEN];
|
||||
};
|
||||
|
||||
typedef struct _NDIS_802_11_WEP
|
||||
{
|
||||
struct ndis_802_11_wep {
|
||||
ULONG Length; // Length of this structure
|
||||
ULONG KeyIndex; // 0 is the per-client key, 1-N are the global keys
|
||||
ULONG KeyLength; // length of key in bytes
|
||||
u8 KeyMaterial[16];// variable length depending on above field
|
||||
} NDIS_802_11_WEP, *PNDIS_802_11_WEP;
|
||||
};
|
||||
|
||||
typedef struct _NDIS_802_11_AUTHENTICATION_REQUEST
|
||||
{
|
||||
struct ndis_802_11_authentication_request {
|
||||
ULONG Length; // Length of structure
|
||||
NDIS_802_11_MAC_ADDRESS Bssid;
|
||||
u8 Bssid[ETH_ALEN];
|
||||
ULONG Flags;
|
||||
} NDIS_802_11_AUTHENTICATION_REQUEST, *PNDIS_802_11_AUTHENTICATION_REQUEST;
|
||||
};
|
||||
|
||||
typedef enum _NDIS_802_11_STATUS_TYPE
|
||||
{
|
||||
enum NDIS_802_11_STATUS_TYPE {
|
||||
Ndis802_11StatusType_Authentication,
|
||||
Ndis802_11StatusType_MediaStreamMode,
|
||||
Ndis802_11StatusType_PMKID_CandidateList,
|
||||
Ndis802_11StatusTypeMax // not a real type, defined as an upper bound
|
||||
} NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;
|
||||
};
|
||||
|
||||
typedef struct _NDIS_802_11_STATUS_INDICATION
|
||||
{
|
||||
NDIS_802_11_STATUS_TYPE StatusType;
|
||||
} NDIS_802_11_STATUS_INDICATION, *PNDIS_802_11_STATUS_INDICATION;
|
||||
struct ndis_802_11_status_indication {
|
||||
enum NDIS_802_11_STATUS_TYPE StatusType;
|
||||
};
|
||||
|
||||
// mask for authentication/integrity fields
|
||||
#define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f
|
||||
|
@ -248,37 +178,23 @@ typedef struct _NDIS_802_11_STATUS_INDICATION
|
|||
// MIC check time, 60 seconds.
|
||||
#define MIC_CHECK_TIME 60000000
|
||||
|
||||
typedef struct _NDIS_802_11_AUTHENTICATION_EVENT
|
||||
{
|
||||
NDIS_802_11_STATUS_INDICATION Status;
|
||||
NDIS_802_11_AUTHENTICATION_REQUEST Request[1];
|
||||
} NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT;
|
||||
|
||||
typedef struct _NDIS_802_11_TEST
|
||||
{
|
||||
ULONG Length;
|
||||
ULONG Type;
|
||||
union
|
||||
{
|
||||
NDIS_802_11_AUTHENTICATION_EVENT AuthenticationEvent;
|
||||
NDIS_802_11_RSSI RssiTrigger;
|
||||
}tt;
|
||||
} NDIS_802_11_TEST, *PNDIS_802_11_TEST;
|
||||
struct ndis_802_11_authentication_event {
|
||||
struct ndis_802_11_status_indication Status;
|
||||
struct ndis_802_11_authentication_request Request[1];
|
||||
};
|
||||
|
||||
#ifndef Ndis802_11APMode
|
||||
#define Ndis802_11APMode (Ndis802_11InfrastructureMax+1)
|
||||
#endif
|
||||
|
||||
typedef struct _WLAN_PHY_INFO
|
||||
{
|
||||
struct wlan_phy_info {
|
||||
u8 SignalStrength;//(in percentage)
|
||||
u8 SignalQuality;//(in percentage)
|
||||
u8 Optimum_antenna; //for Antenna diversity
|
||||
u8 Reserved_0;
|
||||
}WLAN_PHY_INFO,*PWLAN_PHY_INFO;
|
||||
};
|
||||
|
||||
typedef struct _WLAN_BCN_INFO
|
||||
{
|
||||
struct wlan_bcn_info {
|
||||
/* these infor get from rtw_get_encrypt_info when
|
||||
* * translate scan to UI */
|
||||
u8 encryp_protocol;//ENCRYP_PROTOCOL_E: OPEN/WEP/WPA/WPA2/WAPI
|
||||
|
@ -289,25 +205,25 @@ typedef struct _WLAN_BCN_INFO
|
|||
/* bwmode 20/40 and ch_offset UP/LOW */
|
||||
unsigned short ht_cap_info;
|
||||
unsigned char ht_info_infos_0;
|
||||
}WLAN_BCN_INFO,*PWLAN_BCN_INFO;
|
||||
};
|
||||
|
||||
/* temporally add #pragma pack for structure alignment issue of
|
||||
* struct wlan_bssid_ex and get_wlan_bssid_ex_sz()
|
||||
*/
|
||||
struct wlan_bssid_ex {
|
||||
ULONG Length;
|
||||
NDIS_802_11_MAC_ADDRESS MacAddress;
|
||||
u8 Reserved[2];//[0]: IS beacon frame
|
||||
NDIS_802_11_SSID Ssid;
|
||||
ULONG Privacy;
|
||||
NDIS_802_11_RSSI Rssi;//(in dBM,raw data ,get from PHY)
|
||||
NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
|
||||
NDIS_802_11_CONFIGURATION Configuration;
|
||||
NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
|
||||
NDIS_802_11_RATES_EX SupportedRates;
|
||||
WLAN_PHY_INFO PhyInfo;
|
||||
ULONG IELength;
|
||||
u8 IEs[MAX_IE_SZ]; //(timestamp, beacon interval, and capability information)
|
||||
ULONG Length;
|
||||
u8 MacAddress[ETH_ALEN];
|
||||
u8 Reserved[2];//[0]: IS beacon frame
|
||||
struct ndis_802_11_ssid Ssid;
|
||||
ULONG Privacy;
|
||||
long Rssi;//(in dBM,raw data ,get from PHY)
|
||||
enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
|
||||
struct ndis_802_11_configuration Configuration;
|
||||
enum NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
|
||||
u8 SupportedRates[NDIS_802_11_LENGTH_RATES_EX];
|
||||
struct wlan_phy_info PhyInfo;
|
||||
ULONG IELength;
|
||||
u8 IEs[MAX_IE_SZ]; //(timestamp, beacon interval, and capability information)
|
||||
} __packed;
|
||||
|
||||
__inline static uint get_wlan_bssid_ex_sz(struct wlan_bssid_ex *bss)
|
||||
|
@ -323,43 +239,34 @@ struct wlan_network {
|
|||
int aid; //will only be valid when a BSS is joinned.
|
||||
int join_res;
|
||||
struct wlan_bssid_ex network; //must be the last item
|
||||
WLAN_BCN_INFO BcnInfo;
|
||||
struct wlan_bcn_info BcnInfo;
|
||||
};
|
||||
|
||||
enum VRTL_CARRIER_SENSE
|
||||
{
|
||||
enum VRTL_CARRIER_SENSE {
|
||||
DISABLE_VCS,
|
||||
ENABLE_VCS,
|
||||
AUTO_VCS
|
||||
};
|
||||
|
||||
enum VCS_TYPE
|
||||
{
|
||||
enum VCS_TYPE {
|
||||
NONE_VCS,
|
||||
RTS_CTS,
|
||||
CTS_TO_SELF
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#define PWR_CAM 0
|
||||
#define PWR_MINPS 1
|
||||
#define PWR_MAXPS 2
|
||||
#define PWR_UAPSD 3
|
||||
#define PWR_VOIP 4
|
||||
|
||||
|
||||
enum UAPSD_MAX_SP
|
||||
{
|
||||
enum UAPSD_MAX_SP {
|
||||
NO_LIMIT,
|
||||
TWO_MSDU,
|
||||
FOUR_MSDU,
|
||||
SIX_MSDU
|
||||
};
|
||||
|
||||
|
||||
//john
|
||||
#define NUM_PRE_AUTH_KEY 16
|
||||
#define NUM_PMKID_CACHE NUM_PRE_AUTH_KEY
|
||||
|
||||
|
@ -367,38 +274,6 @@ enum UAPSD_MAX_SP
|
|||
* WPA2
|
||||
*/
|
||||
|
||||
#ifndef PLATFORM_OS_CE
|
||||
typedef struct _PMKID_CANDIDATE {
|
||||
NDIS_802_11_MAC_ADDRESS BSSID;
|
||||
ULONG Flags;
|
||||
} PMKID_CANDIDATE, *PPMKID_CANDIDATE;
|
||||
|
||||
typedef struct _NDIS_802_11_PMKID_CANDIDATE_LIST
|
||||
{
|
||||
ULONG Version; // Version of the structure
|
||||
ULONG NumCandidates; // No. of pmkid candidates
|
||||
PMKID_CANDIDATE CandidateList[1];
|
||||
} NDIS_802_11_PMKID_CANDIDATE_LIST, *PNDIS_802_11_PMKID_CANDIDATE_LIST;
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_AUTHENTICATION_ENCRYPTION
|
||||
{
|
||||
NDIS_802_11_AUTHENTICATION_MODE AuthModeSupported;
|
||||
NDIS_802_11_ENCRYPTION_STATUS EncryptStatusSupported;
|
||||
|
||||
} NDIS_802_11_AUTHENTICATION_ENCRYPTION, *PNDIS_802_11_AUTHENTICATION_ENCRYPTION;
|
||||
|
||||
typedef struct _NDIS_802_11_CAPABILITY
|
||||
{
|
||||
ULONG Length;
|
||||
ULONG Version;
|
||||
ULONG NoOfPMKIDs;
|
||||
ULONG NoOfAuthEncryptPairsSupported;
|
||||
NDIS_802_11_AUTHENTICATION_ENCRYPTION AuthenticationEncryptionSupported[1];
|
||||
|
||||
} NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY;
|
||||
#endif
|
||||
u8 convert_ip_addr(u8 hch, u8 mch, u8 lch);
|
||||
|
||||
|
||||
#endif //#ifndef WLAN_BSSDEF_H_
|
||||
|
|
|
@ -351,7 +351,7 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wl
|
|||
if(wdev_to_priv(wdev)->scan_request != NULL)
|
||||
{
|
||||
u8 *psr=NULL, sr = 0;
|
||||
NDIS_802_11_SSID *pssid = &pnetwork->network.Ssid;
|
||||
struct ndis_802_11_ssid *pssid = &pnetwork->network.Ssid;
|
||||
struct cfg80211_scan_request *request = wdev_to_priv(wdev)->scan_request;
|
||||
struct cfg80211_ssid *ssids = request->ssids;
|
||||
u32 wpsielen=0;
|
||||
|
@ -564,8 +564,8 @@ void rtw_cfg80211_ibss_indicate_connect(struct adapter *padapter)
|
|||
return;
|
||||
}
|
||||
|
||||
if (_rtw_memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(NDIS_802_11_SSID)) == true
|
||||
&& _rtw_memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(NDIS_802_11_MAC_ADDRESS)) == true
|
||||
if (_rtw_memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(struct ndis_802_11_ssid)) == true
|
||||
&& _rtw_memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(ETH_ALEN)) == true
|
||||
) {
|
||||
if (!rtw_cfg80211_inform_bss(padapter,scanned)) {
|
||||
DBG_871X(FUNC_ADPT_FMT" inform fail !!\n", FUNC_ADPT_ARG(padapter));
|
||||
|
@ -640,8 +640,8 @@ void rtw_cfg80211_indicate_connect(struct adapter *padapter)
|
|||
goto check_bss;
|
||||
}
|
||||
|
||||
if (_rtw_memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(NDIS_802_11_MAC_ADDRESS)) == true
|
||||
&& _rtw_memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(NDIS_802_11_SSID)) == true
|
||||
if (_rtw_memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(ETH_ALEN)) == true
|
||||
&& _rtw_memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(struct ndis_802_11_ssid)) == true
|
||||
) {
|
||||
if (!rtw_cfg80211_inform_bss(padapter,scanned)) {
|
||||
DBG_871X(FUNC_ADPT_FMT" inform fail !!\n", FUNC_ADPT_ARG(padapter));
|
||||
|
@ -1640,7 +1640,7 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
|||
struct vif_params *params)
|
||||
{
|
||||
enum nl80211_iftype old_type;
|
||||
NDIS_802_11_NETWORK_INFRASTRUCTURE networkType ;
|
||||
enum NDIS_802_11_NETWORK_INFRASTRUCTURE networkType ;
|
||||
struct adapter *padapter = wiphy_to_adapter(wiphy);
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
struct wireless_dev *rtw_wdev = wiphy_to_wdev(wiphy);
|
||||
|
@ -1954,7 +1954,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
|
|||
int ret = 0;
|
||||
struct adapter *padapter = wiphy_to_adapter(wiphy);
|
||||
struct mlme_priv *pmlmepriv= &padapter->mlmepriv;
|
||||
NDIS_802_11_SSID ssid[RTW_SSID_SCAN_AMOUNT];
|
||||
struct ndis_802_11_ssid ssid[RTW_SSID_SCAN_AMOUNT];
|
||||
struct rtw_ieee80211_channel ch[RTW_CHANNEL_SCAN_AMOUNT];
|
||||
_irqL irqL;
|
||||
u8 *wps_ie=NULL;
|
||||
|
@ -2067,7 +2067,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
|
|||
}
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
memset(ssid, 0, sizeof(NDIS_802_11_SSID)*RTW_SSID_SCAN_AMOUNT);
|
||||
memset(ssid, 0, sizeof(struct ndis_802_11_ssid)*RTW_SSID_SCAN_AMOUNT);
|
||||
/* parsing request ssids, n_ssids */
|
||||
for (i = 0; i < request->n_ssids && i < RTW_SSID_SCAN_AMOUNT; i++) {
|
||||
#ifdef CONFIG_DEBUG_CFG80211
|
||||
|
@ -2460,7 +2460,7 @@ static int cfg80211_rtw_join_ibss(struct wiphy *wiphy, struct net_device *ndev,
|
|||
struct cfg80211_ibss_params *params)
|
||||
{
|
||||
struct adapter *padapter = wiphy_to_adapter(wiphy);
|
||||
NDIS_802_11_SSID ndis_ssid;
|
||||
struct ndis_802_11_ssid ndis_ssid;
|
||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
int ret=0;
|
||||
|
@ -2487,7 +2487,7 @@ static int cfg80211_rtw_join_ibss(struct wiphy *wiphy, struct net_device *ndev,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
memset(&ndis_ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||
memset(&ndis_ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||
ndis_ssid.SsidLength = params->ssid_len;
|
||||
memcpy(ndis_ssid.Ssid, (void *)params->ssid, params->ssid_len);
|
||||
|
||||
|
@ -2525,8 +2525,8 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
|||
_irqL irqL;
|
||||
_list *phead;
|
||||
struct wlan_network *pnetwork = NULL;
|
||||
NDIS_802_11_AUTHENTICATION_MODE authmode;
|
||||
NDIS_802_11_SSID ndis_ssid;
|
||||
enum NDIS_802_11_AUTHENTICATION_MODE authmode;
|
||||
struct ndis_802_11_ssid ndis_ssid;
|
||||
u8 *dst_ssid, *src_ssid;
|
||||
u8 *dst_bssid, *src_bssid;
|
||||
/* u8 matched_by_bssid=false; */
|
||||
|
@ -2573,7 +2573,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
memset(&ndis_ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||
memset(&ndis_ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||
ndis_ssid.SsidLength = sme->ssid_len;
|
||||
memcpy(ndis_ssid.Ssid, (void *)sme->ssid, sme->ssid_len);
|
||||
|
||||
|
@ -2626,7 +2626,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
|||
)
|
||||
{
|
||||
u32 wep_key_idx, wep_key_len,wep_total_len;
|
||||
NDIS_802_11_WEP *pwep = NULL;
|
||||
struct ndis_802_11_wep *pwep = NULL;
|
||||
DBG_871X("%s(): Shared/Auto WEP\n",__FUNCTION__);
|
||||
|
||||
wep_key_idx = sme->key_idx;
|
||||
|
@ -2640,8 +2640,8 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
|||
if (wep_key_len > 0)
|
||||
{
|
||||
wep_key_len = wep_key_len <= 5 ? 5 : 13;
|
||||
wep_total_len = wep_key_len + FIELD_OFFSET(NDIS_802_11_WEP, KeyMaterial);
|
||||
pwep =(NDIS_802_11_WEP *) rtw_malloc(wep_total_len);
|
||||
wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial);
|
||||
pwep =(struct ndis_802_11_wep *) rtw_malloc(wep_total_len);
|
||||
if(pwep == NULL){
|
||||
DBG_871X(" wpa_set_encryption: pwep allocate fail !!!\n");
|
||||
ret = -ENOMEM;
|
||||
|
|
|
@ -622,7 +622,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
|
|||
{
|
||||
int ret = 0;
|
||||
u32 wep_key_idx, wep_key_len,wep_total_len;
|
||||
NDIS_802_11_WEP *pwep = NULL;
|
||||
struct ndis_802_11_wep *pwep = NULL;
|
||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||
|
@ -682,8 +682,8 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
|
|||
if (wep_key_len > 0)
|
||||
{
|
||||
wep_key_len = wep_key_len <= 5 ? 5 : 13;
|
||||
wep_total_len = wep_key_len + FIELD_OFFSET(NDIS_802_11_WEP, KeyMaterial);
|
||||
pwep =(NDIS_802_11_WEP *) rtw_malloc(wep_total_len);
|
||||
wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial);
|
||||
pwep =(struct ndis_802_11_wep *) rtw_malloc(wep_total_len);
|
||||
if(pwep == NULL){
|
||||
RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_err_,(" wpa_set_encryption: pwep allocate fail !!!\n"));
|
||||
goto exit;
|
||||
|
@ -1017,64 +1017,43 @@ static int rtw_wx_get_name(struct net_device *dev,
|
|||
u8 ht_cap=false;
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
struct wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network;
|
||||
NDIS_802_11_RATES_EX* prates = NULL;
|
||||
u8 *prates;
|
||||
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("cmd_code=%x\n", info->cmd));
|
||||
|
||||
;
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE) == true)
|
||||
{
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE)) {
|
||||
/* parsing HT_CAP_IE */
|
||||
p = rtw_get_ie(&pcur_bss->IEs[12], _HT_CAPABILITY_IE_, &ht_ielen, pcur_bss->IELength-12);
|
||||
if(p && ht_ielen>0)
|
||||
{
|
||||
ht_cap = true;
|
||||
}
|
||||
|
||||
prates = &pcur_bss->SupportedRates;
|
||||
prates = pcur_bss->SupportedRates;
|
||||
|
||||
if (rtw_is_cckratesonly_included((u8*)prates) == true)
|
||||
{
|
||||
if (rtw_is_cckratesonly_included((u8*)prates)) {
|
||||
if(ht_cap == true)
|
||||
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11bn");
|
||||
else
|
||||
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11b");
|
||||
}
|
||||
else if ((rtw_is_cckrates_included((u8*)prates)) == true)
|
||||
{
|
||||
} else if ((rtw_is_cckrates_included((u8*)prates))) {
|
||||
if(ht_cap == true)
|
||||
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11bgn");
|
||||
else
|
||||
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11bg");
|
||||
}
|
||||
else
|
||||
{
|
||||
if(pcur_bss->Configuration.DSConfig > 14)
|
||||
{
|
||||
} else {
|
||||
if(pcur_bss->Configuration.DSConfig > 14) {
|
||||
if(ht_cap == true)
|
||||
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11an");
|
||||
else
|
||||
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11a");
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
if(ht_cap == true)
|
||||
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11gn");
|
||||
else
|
||||
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11g");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* prates = &padapter->registrypriv.dev_network.SupportedRates; */
|
||||
/* snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11g"); */
|
||||
} else {
|
||||
snprintf(wrqu->name, IFNAMSIZ, "unassociated");
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1120,7 +1099,7 @@ static int rtw_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
|
|||
union iwreq_data *wrqu, char *b)
|
||||
{
|
||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||
NDIS_802_11_NETWORK_INFRASTRUCTURE networkType ;
|
||||
enum NDIS_802_11_NETWORK_INFRASTRUCTURE networkType ;
|
||||
int ret = 0;
|
||||
|
||||
;
|
||||
|
@ -1407,7 +1386,7 @@ static int rtw_wx_set_wap(struct net_device *dev,
|
|||
u8 *dst_bssid, *src_bssid;
|
||||
_queue *queue = &(pmlmepriv->scanned_queue);
|
||||
struct wlan_network *pnetwork = NULL;
|
||||
NDIS_802_11_AUTHENTICATION_MODE authmode;
|
||||
enum NDIS_802_11_AUTHENTICATION_MODE authmode;
|
||||
|
||||
if(_FAIL == rtw_pwr_wakeup(padapter))
|
||||
{
|
||||
|
@ -1550,7 +1529,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
|
|||
int ret = 0;
|
||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||
struct mlme_priv *pmlmepriv= &padapter->mlmepriv;
|
||||
NDIS_802_11_SSID ssid[RTW_SSID_SCAN_AMOUNT];
|
||||
struct ndis_802_11_ssid ssid[RTW_SSID_SCAN_AMOUNT];
|
||||
_irqL irqL;
|
||||
#ifdef CONFIG_P2P
|
||||
struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
|
||||
|
@ -1630,7 +1609,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
|
|||
}
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
memset(ssid, 0, sizeof(NDIS_802_11_SSID)*RTW_SSID_SCAN_AMOUNT);
|
||||
memset(ssid, 0, sizeof(struct ndis_802_11_ssid)*RTW_SSID_SCAN_AMOUNT);
|
||||
|
||||
#if WIRELESS_EXT >= 17
|
||||
if (wrqu->data.length == sizeof(struct iw_scan_req))
|
||||
|
@ -1861,8 +1840,8 @@ static int rtw_wx_set_essid(struct net_device *dev,
|
|||
_list *phead;
|
||||
s8 status = true;
|
||||
struct wlan_network *pnetwork = NULL;
|
||||
NDIS_802_11_AUTHENTICATION_MODE authmode;
|
||||
NDIS_802_11_SSID ndis_ssid;
|
||||
enum NDIS_802_11_AUTHENTICATION_MODE authmode;
|
||||
struct ndis_802_11_ssid ndis_ssid;
|
||||
u8 *dst_ssid, *src_ssid;
|
||||
|
||||
uint ret = 0, len;
|
||||
|
@ -1921,7 +1900,7 @@ static int rtw_wx_set_essid(struct net_device *dev,
|
|||
if( wrqu->essid.length != 33 )
|
||||
DBG_871X("ssid=%s, len=%d\n", extra, wrqu->essid.length);
|
||||
|
||||
memset(&ndis_ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||
memset(&ndis_ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||
ndis_ssid.SsidLength = len;
|
||||
memcpy(ndis_ssid.Ssid, extra, len);
|
||||
src_ssid = ndis_ssid.Ssid;
|
||||
|
@ -2233,15 +2212,15 @@ static int rtw_wx_set_enc(struct net_device *dev,
|
|||
{
|
||||
u32 key, ret = 0;
|
||||
u32 keyindex_provided;
|
||||
NDIS_802_11_WEP wep;
|
||||
NDIS_802_11_AUTHENTICATION_MODE authmode;
|
||||
struct ndis_802_11_wep wep;
|
||||
enum NDIS_802_11_AUTHENTICATION_MODE authmode;
|
||||
|
||||
struct iw_point *erq = &(wrqu->encoding);
|
||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
||||
DBG_871X("+rtw_wx_set_enc, flags=0x%x\n", erq->flags);
|
||||
|
||||
memset(&wep, 0, sizeof(NDIS_802_11_WEP));
|
||||
memset(&wep, 0, sizeof(struct ndis_802_11_wep));
|
||||
|
||||
key = erq->flags & IW_ENCODE_INDEX;
|
||||
|
||||
|
@ -2304,7 +2283,7 @@ static int rtw_wx_set_enc(struct net_device *dev,
|
|||
if (erq->length > 0) {
|
||||
wep.KeyLength = erq->length <= 5 ? 5 : 13;
|
||||
|
||||
wep.Length = wep.KeyLength + FIELD_OFFSET(NDIS_802_11_WEP, KeyMaterial);
|
||||
wep.Length = wep.KeyLength + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial);
|
||||
} else {
|
||||
wep.KeyLength = 0 ;
|
||||
|
||||
|
@ -4922,7 +4901,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
|
|||
/* Reset the content of struct tx_provdisc_req_info excluded the wps_config_method_request. */
|
||||
memset( pwdinfo->tx_prov_disc_info.peerDevAddr, 0x00, ETH_ALEN );
|
||||
memset( pwdinfo->tx_prov_disc_info.peerIFAddr, 0x00, ETH_ALEN );
|
||||
memset( &pwdinfo->tx_prov_disc_info.ssid, 0x00, sizeof( NDIS_802_11_SSID ) );
|
||||
memset( &pwdinfo->tx_prov_disc_info.ssid, 0x00, sizeof( struct ndis_802_11_ssid ) );
|
||||
pwdinfo->tx_prov_disc_info.peer_channel_num[ 0 ] = 0;
|
||||
pwdinfo->tx_prov_disc_info.peer_channel_num[ 1 ] = 0;
|
||||
pwdinfo->tx_prov_disc_info.benable = false;
|
||||
|
@ -5062,7 +5041,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
|
|||
|
||||
if(rtw_p2p_chk_role(pwdinfo, P2P_ROLE_CLIENT))
|
||||
{
|
||||
memcpy( &pwdinfo->tx_prov_disc_info.ssid, &pnetwork->network.Ssid, sizeof( NDIS_802_11_SSID ) );
|
||||
memcpy( &pwdinfo->tx_prov_disc_info.ssid, &pnetwork->network.Ssid, sizeof( struct ndis_802_11_ssid ) );
|
||||
}
|
||||
else if(rtw_p2p_chk_role(pwdinfo, P2P_ROLE_DEVICE) || rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO))
|
||||
{
|
||||
|
@ -6470,7 +6449,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param,
|
|||
{
|
||||
int ret = 0;
|
||||
u32 wep_key_idx, wep_key_len,wep_total_len;
|
||||
NDIS_802_11_WEP *pwep = NULL;
|
||||
struct ndis_802_11_wep *pwep = NULL;
|
||||
struct sta_info *psta = NULL, *pbcmc_sta = NULL;
|
||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
@ -6540,8 +6519,8 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param,
|
|||
if (wep_key_len > 0)
|
||||
{
|
||||
wep_key_len = wep_key_len <= 5 ? 5 : 13;
|
||||
wep_total_len = wep_key_len + FIELD_OFFSET(NDIS_802_11_WEP, KeyMaterial);
|
||||
pwep =(NDIS_802_11_WEP *)rtw_malloc(wep_total_len);
|
||||
wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial);
|
||||
pwep =(struct ndis_802_11_wep *)rtw_malloc(wep_total_len);
|
||||
if(pwep == NULL){
|
||||
DBG_871X(" r871x_set_encryption: pwep allocate fail !!!\n");
|
||||
goto exit;
|
||||
|
@ -8744,7 +8723,7 @@ static void freeLoopback(struct adapter *padapter)
|
|||
|
||||
static s32 initpseudoadhoc(struct adapter *padapter)
|
||||
{
|
||||
NDIS_802_11_NETWORK_INFRASTRUCTURE networkType;
|
||||
enum NDIS_802_11_NETWORK_INFRASTRUCTURE networkType;
|
||||
s32 err;
|
||||
|
||||
networkType = Ndis802_11IBSS;
|
||||
|
@ -8759,9 +8738,9 @@ static s32 initpseudoadhoc(struct adapter *padapter)
|
|||
|
||||
static s32 createpseudoadhoc(struct adapter *padapter)
|
||||
{
|
||||
NDIS_802_11_AUTHENTICATION_MODE authmode;
|
||||
enum NDIS_802_11_AUTHENTICATION_MODE authmode;
|
||||
struct mlme_priv *pmlmepriv;
|
||||
NDIS_802_11_SSID *passoc_ssid;
|
||||
struct ndis_802_11_ssid *passoc_ssid;
|
||||
struct wlan_bssid_ex *pdev_network;
|
||||
u8 *pibss;
|
||||
u8 ssid[] = "pseduo_ad-hoc";
|
||||
|
@ -8776,13 +8755,13 @@ static s32 createpseudoadhoc(struct adapter *padapter)
|
|||
if (err == false) return _FAIL;
|
||||
|
||||
passoc_ssid = &pmlmepriv->assoc_ssid;
|
||||
memset(passoc_ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||
memset(passoc_ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||
passoc_ssid->SsidLength = sizeof(ssid) - 1;
|
||||
memcpy(passoc_ssid->Ssid, ssid, passoc_ssid->SsidLength);
|
||||
|
||||
pdev_network = &padapter->registrypriv.dev_network;
|
||||
pibss = padapter->registrypriv.dev_network.MacAddress;
|
||||
memcpy(&pdev_network->Ssid, passoc_ssid, sizeof(NDIS_802_11_SSID));
|
||||
memcpy(&pdev_network->Ssid, passoc_ssid, sizeof(struct ndis_802_11_ssid));
|
||||
|
||||
rtw_update_registrypriv_dev_network(padapter);
|
||||
rtw_generate_random_ibss(pibss);
|
||||
|
|
Loading…
Reference in a new issue