rtl8188eu: Replace typedef for WLAN_BSSID_EX

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2015-03-06 18:26:23 -06:00
parent 5d615fab61
commit 4bf02bb7d8
24 changed files with 138 additions and 141 deletions

View file

@ -84,7 +84,7 @@ static void update_BCNTIM(struct adapter *padapter)
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *pnetwork_mlmeext = &(pmlmeinfo->network); struct wlan_bssid_ex *pnetwork_mlmeext = &(pmlmeinfo->network);
unsigned char *pie = pnetwork_mlmeext->IEs; unsigned char *pie = pnetwork_mlmeext->IEs;
/* DBG_871X("%s\n", __FUNCTION__); */ /* DBG_871X("%s\n", __FUNCTION__); */
@ -195,7 +195,7 @@ static void update_BCNTIM(struct adapter *padapter)
set_tx_beacon_cmd(padapter); set_tx_beacon_cmd(padapter);
} }
void rtw_add_bcn_ie(struct adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *data, u8 len) 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; PNDIS_802_11_VARIABLE_IEs pIE;
u8 bmatch = false; u8 bmatch = false;
@ -265,7 +265,7 @@ void rtw_add_bcn_ie(struct adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index,
pnetwork->IELength = offset + remainder_ielen; pnetwork->IELength = offset + remainder_ielen;
} }
void rtw_remove_bcn_ie(struct adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index) void rtw_remove_bcn_ie(struct adapter *padapter, struct wlan_bssid_ex *pnetwork, u8 index)
{ {
u8 *p, *dst_ie, *premainder_ie=NULL, *pbackup_remainder_ie=NULL; u8 *p, *dst_ie, *premainder_ie=NULL, *pbackup_remainder_ie=NULL;
uint offset, ielen, ie_offset, remainder_ielen = 0; uint offset, ielen, ie_offset, remainder_ielen = 0;
@ -517,7 +517,7 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
unsigned int tx_ra_bitmap=0; unsigned int tx_ra_bitmap=0;
struct ht_priv *psta_ht = NULL; struct ht_priv *psta_ht = NULL;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
WLAN_BSSID_EX *pcur_network = (WLAN_BSSID_EX *)&pmlmepriv->cur_network.network; struct wlan_bssid_ex *pcur_network = (struct wlan_bssid_ex *)&pmlmepriv->cur_network.network;
if(psta) if(psta)
psta_ht = &psta->htpriv; psta_ht = &psta->htpriv;
@ -621,7 +621,7 @@ void update_bmc_sta(struct adapter *padapter)
int i, supportRateNum = 0; int i, supportRateNum = 0;
unsigned int tx_ra_bitmap=0; unsigned int tx_ra_bitmap=0;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
WLAN_BSSID_EX *pcur_network = (WLAN_BSSID_EX *)&pmlmepriv->cur_network.network; struct wlan_bssid_ex *pcur_network = (struct wlan_bssid_ex *)&pmlmepriv->cur_network.network;
struct sta_info *psta = rtw_get_bcmc_stainfo(padapter); struct sta_info *psta = rtw_get_bcmc_stainfo(padapter);
if(psta) if(psta)
@ -844,10 +844,10 @@ static void start_bss_network(struct adapter *padapter, u8 *pbuf)
struct registry_priv *pregpriv = &padapter->registrypriv; struct registry_priv *pregpriv = &padapter->registrypriv;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
struct security_priv* psecuritypriv=&(padapter->securitypriv); struct security_priv* psecuritypriv=&(padapter->securitypriv);
WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX *)&pmlmepriv->cur_network.network; struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex *)&pmlmepriv->cur_network.network;
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *pnetwork_mlmeext = &(pmlmeinfo->network); struct wlan_bssid_ex *pnetwork_mlmeext = &(pmlmeinfo->network);
struct HT_info_element *pht_info=NULL; struct HT_info_element *pht_info=NULL;
#ifdef CONFIG_P2P #ifdef CONFIG_P2P
struct wifidirect_info *pwdinfo = &(padapter->wdinfo); struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
@ -974,7 +974,7 @@ static void start_bss_network(struct adapter *padapter, u8 *pbuf)
update_wireless_mode(padapter); update_wireless_mode(padapter);
/* udpate capability after cur_wireless_mode updated */ /* udpate capability after cur_wireless_mode updated */
update_capinfo(padapter, rtw_get_capability((WLAN_BSSID_EX *)pnetwork)); update_capinfo(padapter, rtw_get_capability((struct wlan_bssid_ex *)pnetwork));
#ifdef CONFIG_P2P #ifdef CONFIG_P2P
memcpy(pwdinfo->p2p_group_ssid, pnetwork->Ssid.Ssid, pnetwork->Ssid.SsidLength); memcpy(pwdinfo->p2p_group_ssid, pnetwork->Ssid.Ssid, pnetwork->Ssid.SsidLength);
@ -1012,7 +1012,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
struct registry_priv *pregistrypriv = &padapter->registrypriv; struct registry_priv *pregistrypriv = &padapter->registrypriv;
struct security_priv *psecuritypriv = &padapter->securitypriv; struct security_priv *psecuritypriv = &padapter->securitypriv;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
WLAN_BSSID_EX *pbss_network = (WLAN_BSSID_EX *)&pmlmepriv->cur_network.network; struct wlan_bssid_ex *pbss_network = (struct wlan_bssid_ex *)&pmlmepriv->cur_network.network;
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
u8 *ie = pbss_network->IEs; u8 *ie = pbss_network->IEs;
@ -1291,7 +1291,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
HT_info_handler(padapter, (PNDIS_802_11_VARIABLE_IEs)pHT_info_ie); HT_info_handler(padapter, (PNDIS_802_11_VARIABLE_IEs)pHT_info_ie);
} }
pbss_network->Length = get_wlan_bssid_ex_sz((WLAN_BSSID_EX *)pbss_network); pbss_network->Length = get_wlan_bssid_ex_sz((struct wlan_bssid_ex *)pbss_network);
/* issue beacon to start bss network */ /* issue beacon to start bss network */
start_bss_network(padapter, (u8*)pbss_network); start_bss_network(padapter, (u8*)pbss_network);
@ -1457,7 +1457,7 @@ static void update_bcn_erpinfo_ie(struct adapter *padapter)
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *pnetwork = &(pmlmeinfo->network); struct wlan_bssid_ex *pnetwork = &(pmlmeinfo->network);
unsigned char *p, *ie = pnetwork->IEs; unsigned char *p, *ie = pnetwork->IEs;
u32 len = 0; u32 len = 0;
@ -1524,7 +1524,7 @@ static void update_bcn_wps_ie(struct adapter *padapter)
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *pnetwork = &(pmlmeinfo->network); struct wlan_bssid_ex *pnetwork = &(pmlmeinfo->network);
unsigned char *ie = pnetwork->IEs; unsigned char *ie = pnetwork->IEs;
u32 ielen = pnetwork->IELength; u32 ielen = pnetwork->IELength;

View file

@ -1030,7 +1030,7 @@ u8 rtw_createbss_cmd(struct adapter *padapter)
struct cmd_obj* pcmd; struct cmd_obj* pcmd;
struct cmd_priv *pcmdpriv=&padapter->cmdpriv; struct cmd_priv *pcmdpriv=&padapter->cmdpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
WLAN_BSSID_EX *pdev_network = &padapter->registrypriv.dev_network; struct wlan_bssid_ex *pdev_network = &padapter->registrypriv.dev_network;
u8 res=_SUCCESS; u8 res=_SUCCESS;
; ;
@ -1052,7 +1052,7 @@ u8 rtw_createbss_cmd(struct adapter *padapter)
_rtw_init_listhead(&pcmd->list); _rtw_init_listhead(&pcmd->list);
pcmd->cmdcode = _CreateBss_CMD_; pcmd->cmdcode = _CreateBss_CMD_;
pcmd->parmbuf = (unsigned char *)pdev_network; pcmd->parmbuf = (unsigned char *)pdev_network;
pcmd->cmdsz = get_wlan_bssid_ex_sz((WLAN_BSSID_EX*)pdev_network); pcmd->cmdsz = get_wlan_bssid_ex_sz((struct wlan_bssid_ex*)pdev_network);
pcmd->rsp = NULL; pcmd->rsp = NULL;
pcmd->rspsz = 0; pcmd->rspsz = 0;
@ -1101,7 +1101,7 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network* pnetwork)
{ {
u8 *auth, res = _SUCCESS; u8 *auth, res = _SUCCESS;
uint t_len = 0; uint t_len = 0;
WLAN_BSSID_EX *psecnetwork; struct wlan_bssid_ex *psecnetwork;
struct cmd_obj *pcmd; struct cmd_obj *pcmd;
struct cmd_priv *pcmdpriv=&padapter->cmdpriv; struct cmd_priv *pcmdpriv=&padapter->cmdpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@ -1130,7 +1130,7 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network* pnetwork)
goto exit; goto exit;
} }
/* for IEs is fix buf size */ /* for IEs is fix buf size */
t_len = sizeof(WLAN_BSSID_EX); t_len = sizeof(struct wlan_bssid_ex);
/* for hidden ap to set fw_state here */ /* for hidden ap to set fw_state here */
@ -1154,7 +1154,7 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network* pnetwork)
} }
} }
psecnetwork=(WLAN_BSSID_EX *)&psecuritypriv->sec_bss; psecnetwork=(struct wlan_bssid_ex *)&psecuritypriv->sec_bss;
if(psecnetwork==NULL) if(psecnetwork==NULL)
{ {
if(pcmd !=NULL) if(pcmd !=NULL)
@ -2815,7 +2815,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
struct sta_info *psta = NULL; struct sta_info *psta = NULL;
struct wlan_network *pwlan = NULL; struct wlan_network *pwlan = NULL;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX *)pcmd->parmbuf; struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex *)pcmd->parmbuf;
struct wlan_network *tgt_network = &(pmlmepriv->cur_network); struct wlan_network *tgt_network = &(pmlmepriv->cur_network);
; ;

View file

@ -407,7 +407,7 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv)
{ {
u8 wireless_mode; u8 wireless_mode;
int sz = 0, rateLen; int sz = 0, rateLen;
WLAN_BSSID_EX* pdev_network = &pregistrypriv->dev_network; struct wlan_bssid_ex* pdev_network = &pregistrypriv->dev_network;
u8* ie = pdev_network->IEs; u8* ie = pdev_network->IEs;
; ;
@ -1653,7 +1653,7 @@ static uint rtw_p2p_attr_remove(u8 *ie, uint ielen_ori, u8 attr_id)
return ielen; return ielen;
} }
void rtw_WLAN_BSSID_EX_remove_p2p_attr(WLAN_BSSID_EX *bss_ex, u8 attr_id) void rtw_wlan_bssid_ex_remove_p2p_attr(struct wlan_bssid_ex *bss_ex, u8 attr_id)
{ {
u8 *p2p_ie; u8 *p2p_ie;
uint p2p_ielen, p2p_ielen_ori; uint p2p_ielen, p2p_ielen_ori;

View file

@ -152,7 +152,7 @@ u8 rtw_do_join(struct adapter * padapter)
/* submit createbss_cmd to change to a ADHOC_MASTER */ /* submit createbss_cmd to change to a ADHOC_MASTER */
/* pmlmepriv->lock has been acquired by caller... */ /* pmlmepriv->lock has been acquired by caller... */
WLAN_BSSID_EX *pdev_network = &(padapter->registrypriv.dev_network); struct wlan_bssid_ex *pdev_network = &(padapter->registrypriv.dev_network);
pmlmepriv->fw_state = WIFI_ADHOC_MASTER_STATE; pmlmepriv->fw_state = WIFI_ADHOC_MASTER_STATE;
@ -1203,7 +1203,7 @@ u16 rtw_get_cur_max_rate(struct adapter *adapter)
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
struct registry_priv *pregistrypriv = &adapter->registrypriv; struct registry_priv *pregistrypriv = &adapter->registrypriv;
struct mlme_priv *pmlmepriv = &adapter->mlmepriv; struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
WLAN_BSSID_EX *pcur_bss = &pmlmepriv->cur_network.network; struct wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network;
struct rtw_ieee80211_ht_cap *pht_capie; struct rtw_ieee80211_ht_cap *pht_capie;
u8 rf_type = 0; u8 rf_type = 0;
u8 bw_40MHz=0, short_GI_20=0, short_GI_40=0; u8 bw_40MHz=0, short_GI_20=0, short_GI_40=0;

View file

@ -442,7 +442,7 @@ u8 *rtw_get_capability_from_ie(u8 *ie)
} }
u16 rtw_get_capability(WLAN_BSSID_EX *bss) u16 rtw_get_capability(struct wlan_bssid_ex *bss)
{ {
__le16 val; __le16 val;
@ -570,7 +570,7 @@ int rtw_is_same_ibss(struct adapter *adapter, struct wlan_network *pnetwork)
} }
inline int is_same_ess(WLAN_BSSID_EX *a, WLAN_BSSID_EX *b) inline int is_same_ess(struct wlan_bssid_ex *a, struct wlan_bssid_ex *b)
{ {
/* RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("(%s,%d)(%s,%d)\n", */ /* RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("(%s,%d)(%s,%d)\n", */
/* a->Ssid.Ssid,a->Ssid.SsidLength,b->Ssid.Ssid,b->Ssid.SsidLength)); */ /* a->Ssid.Ssid,a->Ssid.SsidLength,b->Ssid.Ssid,b->Ssid.SsidLength)); */
@ -578,7 +578,7 @@ inline int is_same_ess(WLAN_BSSID_EX *a, WLAN_BSSID_EX *b)
&& _rtw_memcmp(a->Ssid.Ssid, b->Ssid.Ssid, a->Ssid.SsidLength)==true; && _rtw_memcmp(a->Ssid.Ssid, b->Ssid.Ssid, a->Ssid.SsidLength)==true;
} }
int is_same_network(WLAN_BSSID_EX *src, WLAN_BSSID_EX *dst, u8 feature) int is_same_network(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst, u8 feature)
{ {
__le16 ls_cap, ld_cap; __le16 ls_cap, ld_cap;
u16 s_cap, d_cap; u16 s_cap, d_cap;
@ -642,7 +642,7 @@ struct wlan_network * rtw_get_oldest_wlan_network(_queue *scanned_queue)
} }
void update_network(WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src, void update_network(struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src,
struct adapter * padapter, bool update_ie) struct adapter * padapter, bool update_ie)
{ {
u8 ss_ori = dst->PhyInfo.SignalStrength; u8 ss_ori = dst->PhyInfo.SignalStrength;
@ -714,7 +714,7 @@ void update_network(WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src,
#endif #endif
} }
static void update_current_network(struct adapter *adapter, WLAN_BSSID_EX *pnetwork) static void update_current_network(struct adapter *adapter, struct wlan_bssid_ex *pnetwork)
{ {
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
@ -738,7 +738,7 @@ Caller must hold pmlmepriv->lock first.
*/ */
void rtw_update_scanned_network(struct adapter *adapter, WLAN_BSSID_EX *target) void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *target)
{ {
_irqL irqL; _irqL irqL;
_list *plist, *phead; _list *plist, *phead;
@ -870,8 +870,8 @@ exit:
; ;
} }
void rtw_add_network(struct adapter *adapter, WLAN_BSSID_EX *pnetwork); void rtw_add_network(struct adapter *adapter, struct wlan_bssid_ex *pnetwork);
void rtw_add_network(struct adapter *adapter, WLAN_BSSID_EX *pnetwork) void rtw_add_network(struct adapter *adapter, struct wlan_bssid_ex *pnetwork)
{ {
_irqL irqL; _irqL irqL;
struct mlme_priv *pmlmepriv = &(((struct adapter *)adapter)->mlmepriv); struct mlme_priv *pmlmepriv = &(((struct adapter *)adapter)->mlmepriv);
@ -882,7 +882,7 @@ void rtw_add_network(struct adapter *adapter, WLAN_BSSID_EX *pnetwork)
/* spin_lock_bh(&queue->lock); */ /* spin_lock_bh(&queue->lock); */
#if defined(CONFIG_P2P) && defined(CONFIG_P2P) #if defined(CONFIG_P2P) && defined(CONFIG_P2P)
rtw_WLAN_BSSID_EX_remove_p2p_attr(pnetwork, P2P_ATTR_GROUP_INFO); rtw_wlan_bssid_ex_remove_p2p_attr(pnetwork, P2P_ATTR_GROUP_INFO);
#endif #endif
update_current_network(adapter, pnetwork); update_current_network(adapter, pnetwork);
@ -976,17 +976,17 @@ void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf)
{ {
_irqL irqL; _irqL irqL;
u32 len; u32 len;
WLAN_BSSID_EX *pnetwork; struct wlan_bssid_ex *pnetwork;
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
; ;
pnetwork = (WLAN_BSSID_EX *)pbuf; pnetwork = (struct wlan_bssid_ex *)pbuf;
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_survey_event_callback, ssid=%s\n", pnetwork->Ssid.Ssid)); RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_survey_event_callback, ssid=%s\n", pnetwork->Ssid.Ssid));
len = get_wlan_bssid_ex_sz(pnetwork); len = get_wlan_bssid_ex_sz(pnetwork);
if(len > (sizeof(WLAN_BSSID_EX))) if(len > (sizeof(struct wlan_bssid_ex)))
{ {
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("\n ****rtw_survey_event_callback: return a wrong bss ***\n")); RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("\n ****rtw_survey_event_callback: return a wrong bss ***\n"));
return; return;
@ -1100,7 +1100,7 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
} }
else else
{ {
WLAN_BSSID_EX *pdev_network = &(adapter->registrypriv.dev_network); struct wlan_bssid_ex *pdev_network = &(adapter->registrypriv.dev_network);
u8 *pibss = adapter->registrypriv.dev_network.MacAddress; u8 *pibss = adapter->registrypriv.dev_network.MacAddress;
_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY); _clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY);
@ -1359,7 +1359,7 @@ void rtw_indicate_disconnect( struct adapter *padapter )
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network);
struct sta_info *psta; struct sta_info *psta;
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
@ -1631,7 +1631,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
the_same_macaddr = _rtw_memcmp(pnetwork->network.MacAddress, cur_network->network.MacAddress, ETH_ALEN); the_same_macaddr = _rtw_memcmp(pnetwork->network.MacAddress, cur_network->network.MacAddress, ETH_ALEN);
pnetwork->network.Length = get_wlan_bssid_ex_sz(&pnetwork->network); pnetwork->network.Length = get_wlan_bssid_ex_sz(&pnetwork->network);
if(pnetwork->network.Length > sizeof(WLAN_BSSID_EX)) { if(pnetwork->network.Length > sizeof(struct wlan_bssid_ex)) {
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("\n\n ***joinbss_evt_callback return a wrong bss ***\n\n")); RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("\n\n ***joinbss_evt_callback return a wrong bss ***\n\n"));
goto ignore_joinbss_callback; goto ignore_joinbss_callback;
} }
@ -1945,7 +1945,7 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
int mac_id=-1; int mac_id=-1;
struct sta_info *psta; struct sta_info *psta;
struct wlan_network* pwlan = NULL; struct wlan_network* pwlan = NULL;
WLAN_BSSID_EX *pdev_network=NULL; struct wlan_bssid_ex *pdev_network=NULL;
u8* pibss = NULL; u8* pibss = NULL;
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
struct stadel_event *pstadel = (struct stadel_event*)pbuf; struct stadel_event *pstadel = (struct stadel_event*)pbuf;
@ -2741,7 +2741,7 @@ void rtw_init_registrypriv_dev_network( struct adapter* adapter)
{ {
struct registry_priv* pregistrypriv = &adapter->registrypriv; struct registry_priv* pregistrypriv = &adapter->registrypriv;
struct eeprom_priv* peepriv = &adapter->eeprompriv; struct eeprom_priv* peepriv = &adapter->eeprompriv;
WLAN_BSSID_EX *pdev_network = &pregistrypriv->dev_network; struct wlan_bssid_ex *pdev_network = &pregistrypriv->dev_network;
u8 *myhwaddr = myid(peepriv); u8 *myhwaddr = myid(peepriv);
; ;
@ -2766,7 +2766,7 @@ void rtw_update_registrypriv_dev_network(struct adapter* adapter)
{ {
int sz=0; int sz=0;
struct registry_priv* pregistrypriv = &adapter->registrypriv; struct registry_priv* pregistrypriv = &adapter->registrypriv;
WLAN_BSSID_EX *pdev_network = &pregistrypriv->dev_network; struct wlan_bssid_ex *pdev_network = &pregistrypriv->dev_network;
struct security_priv* psecuritypriv = &adapter->securitypriv; struct security_priv* psecuritypriv = &adapter->securitypriv;
struct wlan_network *cur_network = &adapter->mlmepriv.cur_network; struct wlan_network *cur_network = &adapter->mlmepriv.cur_network;
/* struct xmit_priv *pxmitpriv = &adapter->xmitpriv; */ /* struct xmit_priv *pxmitpriv = &adapter->xmitpriv; */
@ -2818,7 +2818,7 @@ void rtw_update_registrypriv_dev_network(struct adapter* adapter)
pdev_network->IELength = sz; pdev_network->IELength = sz;
pdev_network->Length = get_wlan_bssid_ex_sz((WLAN_BSSID_EX *)pdev_network); pdev_network->Length = get_wlan_bssid_ex_sz((struct wlan_bssid_ex *)pdev_network);
} }
void rtw_get_encrypt_decrypt_from_registrypriv(struct adapter* adapter) void rtw_get_encrypt_decrypt_from_registrypriv(struct adapter* adapter)

View file

@ -740,7 +740,7 @@ unsigned int OnProbeReq(struct adapter *padapter, union recv_frame *precv_frame)
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *cur = &(pmlmeinfo->network); struct wlan_bssid_ex *cur = &(pmlmeinfo->network);
u8 *pframe = precv_frame->u.hdr.rx_data; u8 *pframe = precv_frame->u.hdr.rx_data;
uint len = precv_frame->u.hdr.len; uint len = precv_frame->u.hdr.len;
u8 is_valid_p2p_probereq = false; u8 is_valid_p2p_probereq = false;
@ -911,7 +911,7 @@ unsigned int OnBeacon(struct adapter *padapter, union recv_frame *precv_frame)
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
u8 *pframe = precv_frame->u.hdr.rx_data; u8 *pframe = precv_frame->u.hdr.rx_data;
uint len = precv_frame->u.hdr.len; uint len = precv_frame->u.hdr.len;
WLAN_BSSID_EX *pbss; struct wlan_bssid_ex *pbss;
int ret = _SUCCESS; int ret = _SUCCESS;
u8 *p = NULL; u8 *p = NULL;
u32 ielen = 0; u32 ielen = 0;
@ -940,13 +940,13 @@ unsigned int OnBeacon(struct adapter *padapter, union recv_frame *precv_frame)
if (_rtw_memcmp(GetAddr3Ptr(pframe), get_my_bssid(&pmlmeinfo->network), ETH_ALEN)) { if (_rtw_memcmp(GetAddr3Ptr(pframe), get_my_bssid(&pmlmeinfo->network), ETH_ALEN)) {
if (pmlmeinfo->state & WIFI_FW_AUTH_NULL) { if (pmlmeinfo->state & WIFI_FW_AUTH_NULL) {
/* we should update current network before auth, or some IE is wrong */ /* we should update current network before auth, or some IE is wrong */
pbss = (WLAN_BSSID_EX*)rtw_malloc(sizeof(WLAN_BSSID_EX)); pbss = (struct wlan_bssid_ex*)rtw_malloc(sizeof(struct wlan_bssid_ex));
if (pbss) { if (pbss) {
if (collect_bss_info(padapter, precv_frame, pbss) == _SUCCESS) { if (collect_bss_info(padapter, precv_frame, pbss) == _SUCCESS) {
update_network(&(pmlmepriv->cur_network.network), pbss, padapter, true); update_network(&(pmlmepriv->cur_network.network), pbss, padapter, true);
rtw_get_bcn_info(&(pmlmepriv->cur_network)); rtw_get_bcn_info(&(pmlmepriv->cur_network));
} }
rtw_mfree((u8*)pbss, sizeof(WLAN_BSSID_EX)); rtw_mfree((u8*)pbss, sizeof(struct wlan_bssid_ex));
} }
/* check the vendor of the assoc AP */ /* check the vendor of the assoc AP */
@ -1369,7 +1369,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
struct security_priv *psecuritypriv = &padapter->securitypriv; struct security_priv *psecuritypriv = &padapter->securitypriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *cur = &(pmlmeinfo->network); struct wlan_bssid_ex *cur = &(pmlmeinfo->network);
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
u8 *pframe = precv_frame->u.hdr.rx_data; u8 *pframe = precv_frame->u.hdr.rx_data;
uint pkt_len = precv_frame->u.hdr.len; uint pkt_len = precv_frame->u.hdr.len;
@ -1926,7 +1926,7 @@ unsigned int OnAssocRsp(struct adapter *padapter, union recv_frame *precv_frame)
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
/* WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); */ /* struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network); */
u8 *pframe = precv_frame->u.hdr.rx_data; u8 *pframe = precv_frame->u.hdr.rx_data;
uint pkt_len = precv_frame->u.hdr.len; uint pkt_len = precv_frame->u.hdr.len;
PNDIS_802_11_VARIABLE_IEs pWapiIE = NULL; PNDIS_802_11_VARIABLE_IEs pWapiIE = NULL;
@ -4155,7 +4155,7 @@ void issue_probersp_p2p(struct adapter *padapter, unsigned char *da)
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
/* WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); */ /* struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network); */
u16 beacon_interval = 100; u16 beacon_interval = 100;
u16 capInfo = 0; u16 capInfo = 0;
struct wifidirect_info *pwdinfo = &(padapter->wdinfo); struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
@ -5704,7 +5704,7 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
#endif /* if defined (CONFIG_AP_MODE) */ #endif /* if defined (CONFIG_AP_MODE) */
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network);
u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#ifdef CONFIG_P2P #ifdef CONFIG_P2P
struct wifidirect_info *pwdinfo = &(padapter->wdinfo); struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
@ -6005,7 +6005,7 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
#endif /* if defined (CONFIG_AP_MODE) */ #endif /* if defined (CONFIG_AP_MODE) */
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network);
unsigned int rate_len; unsigned int rate_len;
#ifdef CONFIG_P2P #ifdef CONFIG_P2P
struct wifidirect_info *pwdinfo = &(padapter->wdinfo); struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
@ -6528,7 +6528,7 @@ void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_i
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *pnetwork = &(pmlmeinfo->network); struct wlan_bssid_ex *pnetwork = &(pmlmeinfo->network);
u8 *ie = pnetwork->IEs; u8 *ie = pnetwork->IEs;
__le16 lestatus, leval; __le16 lestatus, leval;
#ifdef CONFIG_P2P #ifdef CONFIG_P2P
@ -7882,7 +7882,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
{ {
int len; int len;
u8 *p; u8 *p;
WLAN_BSSID_EX *pbss_network; struct wlan_bssid_ex *pbss_network;
if (rtw_end_of_queue_search(phead,plist)== true) if (rtw_end_of_queue_search(phead,plist)== true)
break; break;
@ -7891,7 +7891,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
plist = get_next(plist); plist = get_next(plist);
pbss_network = (WLAN_BSSID_EX *)&pnetwork->network; pbss_network = (struct wlan_bssid_ex *)&pnetwork->network;
p = rtw_get_ie(pbss_network->IEs + _FIXED_IE_LENGTH_, _HT_CAPABILITY_IE_, &len, pbss_network->IELength - _FIXED_IE_LENGTH_); p = rtw_get_ie(pbss_network->IEs + _FIXED_IE_LENGTH_, _HT_CAPABILITY_IE_, &len, pbss_network->IELength - _FIXED_IE_LENGTH_);
if((p==NULL) || (len==0))/* non-HT */ if((p==NULL) || (len==0))/* non-HT */
@ -8316,7 +8316,7 @@ void site_survey(struct adapter *padapter)
} }
/* collect bss info from Beacon and Probe request/response frames. */ /* collect bss info from Beacon and Probe request/response frames. */
u8 collect_bss_info(struct adapter *padapter, union recv_frame *precv_frame, WLAN_BSSID_EX *bssid) u8 collect_bss_info(struct adapter *padapter, union recv_frame *precv_frame, struct wlan_bssid_ex *bssid)
{ {
int i; int i;
u32 len; u32 len;
@ -8338,7 +8338,7 @@ u8 collect_bss_info(struct adapter *padapter, union recv_frame *precv_frame, WLA
return _FAIL; return _FAIL;
} }
memset(bssid, 0, sizeof(WLAN_BSSID_EX)); memset(bssid, 0, sizeof(struct wlan_bssid_ex));
subtype = GetFrameSubType(pframe); subtype = GetFrameSubType(pframe);
@ -8359,7 +8359,7 @@ u8 collect_bss_info(struct adapter *padapter, union recv_frame *precv_frame, WLA
} }
} }
bssid->Length = sizeof(WLAN_BSSID_EX) - MAX_IE_SZ + len; bssid->Length = sizeof(struct wlan_bssid_ex) - MAX_IE_SZ + len;
/* below is to copy the information element */ /* below is to copy the information element */
bssid->IELength = len; bssid->IELength = len;
@ -8479,7 +8479,7 @@ u8 collect_bss_info(struct adapter *padapter, union recv_frame *precv_frame, WLA
memcpy(&le_tmp, rtw_get_beacon_interval_from_ie(bssid->IEs), 2); memcpy(&le_tmp, rtw_get_beacon_interval_from_ie(bssid->IEs), 2);
bssid->Configuration.BeaconPeriod = le32_to_cpu(le_tmp); bssid->Configuration.BeaconPeriod = le32_to_cpu(le_tmp);
val16 = rtw_get_capability((WLAN_BSSID_EX *)bssid); val16 = rtw_get_capability((struct wlan_bssid_ex *)bssid);
if (val16 & BIT(0)) { if (val16 & BIT(0)) {
bssid->InfrastructureMode = Ndis802_11Infrastructure; bssid->InfrastructureMode = Ndis802_11Infrastructure;
@ -8538,7 +8538,7 @@ void start_create_ibss(struct adapter* padapter)
u8 join_type; u8 join_type;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network)); struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex*)(&(pmlmeinfo->network));
pmlmeext->cur_channel = (u8)pnetwork->Configuration.DSConfig; pmlmeext->cur_channel = (u8)pnetwork->Configuration.DSConfig;
pmlmeinfo->bcn_interval = get_beacon_interval(pnetwork); pmlmeinfo->bcn_interval = get_beacon_interval(pnetwork);
@ -8546,7 +8546,7 @@ void start_create_ibss(struct adapter* padapter)
update_wireless_mode(padapter); update_wireless_mode(padapter);
/* udpate capability */ /* udpate capability */
caps = rtw_get_capability((WLAN_BSSID_EX *)pnetwork); caps = rtw_get_capability((struct wlan_bssid_ex *)pnetwork);
update_capinfo(padapter, caps); update_capinfo(padapter, caps);
if(caps&cap_IBSS)/* adhoc master */ if(caps&cap_IBSS)/* adhoc master */
{ {
@ -8598,14 +8598,14 @@ void start_clnt_join(struct adapter* padapter)
u8 val8; u8 val8;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network)); struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex*)(&(pmlmeinfo->network));
int beacon_timeout; int beacon_timeout;
/* update wireless mode */ /* update wireless mode */
update_wireless_mode(padapter); update_wireless_mode(padapter);
/* udpate capability */ /* udpate capability */
caps = rtw_get_capability((WLAN_BSSID_EX *)pnetwork); caps = rtw_get_capability((struct wlan_bssid_ex *)pnetwork);
update_capinfo(padapter, caps); update_capinfo(padapter, caps);
if (caps&cap_ESS) if (caps&cap_ESS)
{ {
@ -8764,7 +8764,7 @@ unsigned int receive_disconnect(struct adapter *padapter, unsigned char *MacAddr
} }
#ifdef CONFIG_80211D #ifdef CONFIG_80211D
static void process_80211d(struct adapter *padapter, WLAN_BSSID_EX *bssid) static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid)
{ {
struct registry_priv *pregistrypriv; struct registry_priv *pregistrypriv;
struct mlme_ext_priv *pmlmeext; struct mlme_ext_priv *pmlmeext;
@ -9083,7 +9083,7 @@ void report_survey_event(struct adapter *padapter, union recv_frame *precv_frame
psurvey_evt = (struct survey_event*)(pevtcmd + sizeof(struct C2HEvent_Header)); psurvey_evt = (struct survey_event*)(pevtcmd + sizeof(struct C2HEvent_Header));
if (collect_bss_info(padapter, precv_frame, (WLAN_BSSID_EX *)&psurvey_evt->bss) == _FAIL) if (collect_bss_info(padapter, precv_frame, (struct wlan_bssid_ex *)&psurvey_evt->bss) == _FAIL)
{ {
rtw_mfree((u8 *)pcmd_obj, sizeof(struct cmd_obj)); rtw_mfree((u8 *)pcmd_obj, sizeof(struct cmd_obj));
rtw_mfree((u8 *)pevtcmd, cmdsz); rtw_mfree((u8 *)pevtcmd, cmdsz);
@ -9187,7 +9187,7 @@ void report_join_res(struct adapter *padapter, int res)
pc2h_evt_hdr->seq = ATOMIC_INC_RETURN(&pmlmeext->event_seq); pc2h_evt_hdr->seq = ATOMIC_INC_RETURN(&pmlmeext->event_seq);
pjoinbss_evt = (struct joinbss_event*)(pevtcmd + sizeof(struct C2HEvent_Header)); pjoinbss_evt = (struct joinbss_event*)(pevtcmd + sizeof(struct C2HEvent_Header));
memcpy((unsigned char *)(&(pjoinbss_evt->network.network)), &(pmlmeinfo->network), sizeof(WLAN_BSSID_EX)); memcpy((unsigned char *)(&(pjoinbss_evt->network.network)), &(pmlmeinfo->network), sizeof(struct wlan_bssid_ex));
pjoinbss_evt->network.join_res = pjoinbss_evt->network.aid = res; pjoinbss_evt->network.join_res = pjoinbss_evt->network.aid = res;
DBG_871X("report_join_res(%d)\n", res); DBG_871X("report_join_res(%d)\n", res);
@ -9367,7 +9367,7 @@ void mlmeext_joinbss_event_callback(struct adapter *padapter, int join_res)
struct sta_info *psta, *psta_bmc; struct sta_info *psta, *psta_bmc;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network);
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
u8 join_type; u8 join_type;
u16 media_status; u16 media_status;
@ -9934,7 +9934,7 @@ u8 createbss_hdl(struct adapter *padapter, u8 *pbuf)
{ {
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network)); struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex*)(&(pmlmeinfo->network));
struct joinbss_parm *pparm = (struct joinbss_parm *)pbuf; struct joinbss_parm *pparm = (struct joinbss_parm *)pbuf;
/* u32 initialgain; */ /* u32 initialgain; */
@ -9980,13 +9980,13 @@ u8 createbss_hdl(struct adapter *padapter, u8 *pbuf)
/* clear CAM */ /* clear CAM */
flush_all_cam_entry(padapter); flush_all_cam_entry(padapter);
memcpy(pnetwork, pbuf, FIELD_OFFSET(WLAN_BSSID_EX, IELength)); memcpy(pnetwork, pbuf, FIELD_OFFSET(struct wlan_bssid_ex, IELength));
pnetwork->IELength = ((WLAN_BSSID_EX *)pbuf)->IELength; pnetwork->IELength = ((struct wlan_bssid_ex *)pbuf)->IELength;
if(pnetwork->IELength>MAX_IE_SZ)/* Check pbuf->IELength */ if(pnetwork->IELength>MAX_IE_SZ)/* Check pbuf->IELength */
return H2C_PARAMETERS_ERROR; return H2C_PARAMETERS_ERROR;
memcpy(pnetwork->IEs, ((WLAN_BSSID_EX *)pbuf)->IEs, pnetwork->IELength); memcpy(pnetwork->IEs, ((struct wlan_bssid_ex *)pbuf)->IEs, pnetwork->IELength);
start_create_ibss(padapter); start_create_ibss(padapter);
@ -10003,7 +10003,7 @@ u8 join_cmd_hdl(struct adapter *padapter, u8 *pbuf)
struct registry_priv *pregpriv = &padapter->registrypriv; struct registry_priv *pregpriv = &padapter->registrypriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network)); struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex*)(&(pmlmeinfo->network));
struct joinbss_parm *pparm = (struct joinbss_parm *)pbuf; struct joinbss_parm *pparm = (struct joinbss_parm *)pbuf;
u32 i; u32 i;
/* u32 initialgain; */ /* u32 initialgain; */
@ -10046,13 +10046,13 @@ u8 join_cmd_hdl(struct adapter *padapter, u8 *pbuf)
pmlmeinfo->bwmode_updated = false; pmlmeinfo->bwmode_updated = false;
/* pmlmeinfo->assoc_AP_vendor = HT_IOT_PEER_MAX; */ /* pmlmeinfo->assoc_AP_vendor = HT_IOT_PEER_MAX; */
memcpy(pnetwork, pbuf, FIELD_OFFSET(WLAN_BSSID_EX, IELength)); memcpy(pnetwork, pbuf, FIELD_OFFSET(struct wlan_bssid_ex, IELength));
pnetwork->IELength = ((WLAN_BSSID_EX *)pbuf)->IELength; pnetwork->IELength = ((struct wlan_bssid_ex *)pbuf)->IELength;
if(pnetwork->IELength>MAX_IE_SZ)/* Check pbuf->IELength */ if(pnetwork->IELength>MAX_IE_SZ)/* Check pbuf->IELength */
return H2C_PARAMETERS_ERROR; return H2C_PARAMETERS_ERROR;
memcpy(pnetwork->IEs, ((WLAN_BSSID_EX *)pbuf)->IEs, pnetwork->IELength); memcpy(pnetwork->IEs, ((struct wlan_bssid_ex *)pbuf)->IEs, pnetwork->IELength);
pmlmeext->cur_channel = (u8)pnetwork->Configuration.DSConfig; pmlmeext->cur_channel = (u8)pnetwork->Configuration.DSConfig;
pmlmeinfo->bcn_interval = get_beacon_interval(pnetwork); pmlmeinfo->bcn_interval = get_beacon_interval(pnetwork);
@ -10148,7 +10148,7 @@ u8 disconnect_hdl(struct adapter *padapter, unsigned char *pbuf)
struct disconnect_parm *param = (struct disconnect_parm *)pbuf; struct disconnect_parm *param = (struct disconnect_parm *)pbuf;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network)); struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex*)(&(pmlmeinfo->network));
u8 val8; u8 val8;
if (is_client_associated_to_ap(padapter)) if (is_client_associated_to_ap(padapter))
@ -10527,7 +10527,7 @@ u8 set_tx_beacon_cmd(struct adapter* padapter)
goto exit; goto exit;
} }
memcpy(&(ptxBeacon_parm->network), &(pmlmeinfo->network), sizeof(WLAN_BSSID_EX)); memcpy(&(ptxBeacon_parm->network), &(pmlmeinfo->network), sizeof(struct wlan_bssid_ex));
len_diff = update_hidden_ssid( len_diff = update_hidden_ssid(
ptxBeacon_parm->network.IEs+_BEACON_IE_OFFSET_ ptxBeacon_parm->network.IEs+_BEACON_IE_OFFSET_

View file

@ -524,12 +524,12 @@ int get_bsstype(unsigned short capability)
} }
} }
__inline u8 *get_my_bssid(WLAN_BSSID_EX *pnetwork) __inline u8 *get_my_bssid(struct wlan_bssid_ex *pnetwork)
{ {
return (pnetwork->MacAddress); return (pnetwork->MacAddress);
} }
u16 get_beacon_interval(WLAN_BSSID_EX *bss) u16 get_beacon_interval(struct wlan_bssid_ex *bss)
{ {
__le16 le_val; __le16 le_val;
@ -945,7 +945,7 @@ static void bwmode_update_check(struct adapter *padapter, PNDIS_802_11_VARIABLE_
if(true == pmlmeinfo->bwmode_updated) if(true == pmlmeinfo->bwmode_updated)
{ {
struct sta_info *psta; struct sta_info *psta;
WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network);
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
/* set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); */ /* set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); */
@ -1175,7 +1175,7 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
/* u8 wpa_ie[255],rsn_ie[255]; */ /* u8 wpa_ie[255],rsn_ie[255]; */
u16 wpa_len=0,rsn_len=0; u16 wpa_len=0,rsn_len=0;
u8 encryp_protocol = 0; u8 encryp_protocol = 0;
WLAN_BSSID_EX *bssid; struct wlan_bssid_ex *bssid;
int group_cipher = 0, pairwise_cipher = 0, is_8021x = 0; int group_cipher = 0, pairwise_cipher = 0, is_8021x = 0;
unsigned char *pbuf; unsigned char *pbuf;
u32 wpa_ielen = 0; u32 wpa_ielen = 0;
@ -1204,7 +1204,7 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
return true; return true;
} }
bssid = (WLAN_BSSID_EX *)rtw_zmalloc(sizeof(WLAN_BSSID_EX)); bssid = (struct wlan_bssid_ex *)rtw_zmalloc(sizeof(struct wlan_bssid_ex));
if (!bssid) if (!bssid)
return _FAIL; return _FAIL;
@ -1213,7 +1213,7 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
if(subtype==WIFI_BEACON) if(subtype==WIFI_BEACON)
bssid->Reserved[0] = 1; bssid->Reserved[0] = 1;
bssid->Length = sizeof(WLAN_BSSID_EX) - MAX_IE_SZ + len; bssid->Length = sizeof(struct wlan_bssid_ex) - MAX_IE_SZ + len;
/* below is to copy the information element */ /* below is to copy the information element */
bssid->IELength = len; bssid->IELength = len;
@ -1301,7 +1301,7 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
} }
/* check encryption info */ /* check encryption info */
val16 = rtw_get_capability((WLAN_BSSID_EX *)bssid); val16 = rtw_get_capability((struct wlan_bssid_ex *)bssid);
if (val16 & BIT(4)) if (val16 & BIT(4))
bssid->Privacy = 1; bssid->Privacy = 1;
@ -1367,11 +1367,11 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
} }
} }
rtw_mfree((u8 *)bssid, sizeof(WLAN_BSSID_EX)); rtw_mfree((u8 *)bssid, sizeof(struct wlan_bssid_ex));
return _SUCCESS; return _SUCCESS;
_mismatch: _mismatch:
rtw_mfree((u8 *)bssid, sizeof(WLAN_BSSID_EX)); rtw_mfree((u8 *)bssid, sizeof(struct wlan_bssid_ex));
return _FAIL; return _FAIL;
; ;
@ -1443,9 +1443,9 @@ unsigned int is_ap_in_tkip(struct adapter *padapter)
PNDIS_802_11_VARIABLE_IEs pIE; PNDIS_802_11_VARIABLE_IEs pIE;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network);
if (rtw_get_capability((WLAN_BSSID_EX *)cur_network) & WLAN_CAPABILITY_PRIVACY) 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(NDIS_802_11_FIXED_IEs); i < pmlmeinfo->network.IELength;)
{ {
@ -1487,9 +1487,9 @@ unsigned int should_forbid_n_rate(struct adapter * padapter)
u32 i; u32 i;
PNDIS_802_11_VARIABLE_IEs pIE; PNDIS_802_11_VARIABLE_IEs pIE;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
WLAN_BSSID_EX *cur_network = &pmlmepriv->cur_network.network; struct wlan_bssid_ex *cur_network = &pmlmepriv->cur_network.network;
if (rtw_get_capability((WLAN_BSSID_EX *)cur_network) & WLAN_CAPABILITY_PRIVACY) 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(NDIS_802_11_FIXED_IEs); i < cur_network->IELength;)
{ {
@ -1532,9 +1532,9 @@ unsigned int is_ap_in_wep(struct adapter *padapter)
PNDIS_802_11_VARIABLE_IEs pIE; PNDIS_802_11_VARIABLE_IEs pIE;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network);
if (rtw_get_capability((WLAN_BSSID_EX *)cur_network) & WLAN_CAPABILITY_PRIVACY) 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(NDIS_802_11_FIXED_IEs); i < pmlmeinfo->network.IELength;)
{ {
@ -1968,7 +1968,7 @@ void update_wireless_mode(struct adapter *padapter)
u32 SIFS_Timer; u32 SIFS_Timer;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network);
unsigned char *rate = cur_network->SupportedRates; unsigned char *rate = cur_network->SupportedRates;
ratelen = rtw_get_rateset_len(cur_network->SupportedRates); ratelen = rtw_get_rateset_len(cur_network->SupportedRates);

View file

@ -429,7 +429,7 @@ u8 rtw_hal_antdiv_before_linked(struct adapter *padapter)
return padapter->HalFunc.AntDivBeforeLinkHandler(padapter); return padapter->HalFunc.AntDivBeforeLinkHandler(padapter);
return false; return false;
} }
void rtw_hal_antdiv_rssi_compared(struct adapter *padapter, WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src) void rtw_hal_antdiv_rssi_compared(struct adapter *padapter, struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src)
{ {
if(padapter->HalFunc.AntDivCompareHandler) if(padapter->HalFunc.AntDivCompareHandler)
padapter->HalFunc.AntDivCompareHandler(padapter, dst, src); padapter->HalFunc.AntDivCompareHandler(padapter, dst, src);

View file

@ -338,7 +338,7 @@ static void ConstructBeacon(struct adapter *padapter, u8 *pframe, u32 *pLength)
u32 rate_len, pktlen; u32 rate_len, pktlen;
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network);
u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};

View file

@ -376,7 +376,7 @@ void rtl8188e_deinit_dm_priv(IN struct adapter *Adapter)
/* Add new function to reset the state of antenna diversity before link. */ /* Add new function to reset the state of antenna diversity before link. */
/* */ /* */
/* Compare RSSI for deciding antenna */ /* Compare RSSI for deciding antenna */
void AntDivCompare8188E(struct adapter *Adapter, WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src) void AntDivCompare8188E(struct adapter *Adapter, struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src)
{ {
/* struct adapter *Adapter = pDM_Odm->Adapter ; */ /* struct adapter *Adapter = pDM_Odm->Adapter ; */

View file

@ -3210,7 +3210,7 @@ static void UpdateHalRAMask8188EUsb(struct adapter *padapter, u32 mac_id, u8 rss
/* struct dm_priv *pdmpriv = &pHalData->dmpriv; */ /* struct dm_priv *pdmpriv = &pHalData->dmpriv; */
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network);
if (mac_id >= NUM_STA) /* CAM_SIZE */ if (mac_id >= NUM_STA) /* CAM_SIZE */
{ {

View file

@ -131,7 +131,7 @@ struct registry_priv
u8 uapsd_acvi_en; u8 uapsd_acvi_en;
u8 uapsd_acvo_en; u8 uapsd_acvo_en;
WLAN_BSSID_EX dev_network; struct wlan_bssid_ex dev_network;
u8 ht_enable; u8 ht_enable;
u8 cbw40_enable; u8 cbw40_enable;
@ -192,8 +192,8 @@ struct registry_priv
//For registry parameters //For registry parameters
#define RGTRY_OFT(field) ((ULONG)FIELD_OFFSET(struct registry_priv,field)) #define RGTRY_OFT(field) ((ULONG)FIELD_OFFSET(struct registry_priv,field))
#define RGTRY_SZ(field) sizeof(((struct registry_priv*) 0)->field) #define RGTRY_SZ(field) sizeof(((struct registry_priv*) 0)->field)
#define BSSID_OFT(field) ((ULONG)FIELD_OFFSET(WLAN_BSSID_EX,field)) #define BSSID_OFT(field) ((ULONG)FIELD_OFFSET(struct wlan_bssid_ex,field))
#define BSSID_SZ(field) sizeof(((PWLAN_BSSID_EX) 0)->field) #define BSSID_SZ(field) sizeof(((struct wlan_bssid_ex *) 0)->field)
#define is_primary_adapter(adapter) (1) #define is_primary_adapter(adapter) (1)
#define GET_PRIMARY_ADAPTER(padapter) (((struct adapter *)padapter)->dvobj->if1) #define GET_PRIMARY_ADAPTER(padapter) (((struct adapter *)padapter)->dvobj->if1)

View file

@ -209,7 +209,7 @@ struct hal_ops {
void (*cancel_thread)(struct adapter *padapter); void (*cancel_thread)(struct adapter *padapter);
u8 (*AntDivBeforeLinkHandler)(struct adapter *padapter); u8 (*AntDivBeforeLinkHandler)(struct adapter *padapter);
void (*AntDivCompareHandler)(struct adapter *padapter, WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src); void (*AntDivCompareHandler)(struct adapter *padapter, struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src);
u8 (*interface_ps_func)(struct adapter *padapter,HAL_INTF_PS_FUNC efunc_id, u8* val); u8 (*interface_ps_func)(struct adapter *padapter,HAL_INTF_PS_FUNC efunc_id, u8* val);
s32 (*hal_xmit)(struct adapter *padapter, struct xmit_frame *pxmitframe); s32 (*hal_xmit)(struct adapter *padapter, struct xmit_frame *pxmitframe);
@ -402,7 +402,7 @@ void rtw_hal_set_chan(struct adapter *padapter, u8 channel);
void rtw_hal_dm_watchdog(struct adapter *padapter); void rtw_hal_dm_watchdog(struct adapter *padapter);
u8 rtw_hal_antdiv_before_linked(struct adapter *padapter); u8 rtw_hal_antdiv_before_linked(struct adapter *padapter);
void rtw_hal_antdiv_rssi_compared(struct adapter *padapter, WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src); void rtw_hal_antdiv_rssi_compared(struct adapter *padapter, struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src);
#ifdef CONFIG_HOSTAPD_MLME #ifdef CONFIG_HOSTAPD_MLME
s32 rtw_hal_hostap_mgnt_xmit_entry(struct adapter *padapter, _pkt *pkt); s32 rtw_hal_hostap_mgnt_xmit_entry(struct adapter *padapter, _pkt *pkt);

View file

@ -1279,7 +1279,7 @@ u8 *rtw_get_p2p_ie_from_scan_queue(u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_
u8 *rtw_get_p2p_attr(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id ,u8 *buf_attr, u32 *len_attr); u8 *rtw_get_p2p_attr(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id ,u8 *buf_attr, u32 *len_attr);
u8 *rtw_get_p2p_attr_content(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id ,u8 *buf_content, uint *len_content); u8 *rtw_get_p2p_attr_content(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id ,u8 *buf_content, uint *len_content);
u32 rtw_set_p2p_attr_content(u8 *pbuf, u8 attr_id, u16 attr_len, u8 *pdata_attr); u32 rtw_set_p2p_attr_content(u8 *pbuf, u8 attr_id, u16 attr_len, u8 *pdata_attr);
void rtw_WLAN_BSSID_EX_remove_p2p_attr(WLAN_BSSID_EX *bss_ex, u8 attr_id); void rtw_wlan_bssid_ex_remove_p2p_attr(struct wlan_bssid_ex *bss_ex, u8 attr_id);
#endif #endif
#ifdef CONFIG_P2P #ifdef CONFIG_P2P

View file

@ -59,7 +59,7 @@ void rtl8188e_deinit_dm_priv(IN struct adapter *Adapter);
void rtl8188e_InitHalDm(IN struct adapter *Adapter); void rtl8188e_InitHalDm(IN struct adapter *Adapter);
void rtl8188e_HalDmWatchDog(IN struct adapter *Adapter); void rtl8188e_HalDmWatchDog(IN struct adapter *Adapter);
void AntDivCompare8188E(struct adapter *Adapter, WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src); void AntDivCompare8188E(struct adapter *Adapter, struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src);
u8 AntDivBeforeLink8188E(struct adapter *Adapter ); u8 AntDivBeforeLink8188E(struct adapter *Adapter );
#endif #endif

View file

@ -32,8 +32,8 @@ void rtw_indicate_sta_disassoc_event(struct adapter *padapter, struct sta_info *
void init_mlme_ap_info(struct adapter *padapter); void init_mlme_ap_info(struct adapter *padapter);
void free_mlme_ap_info(struct adapter *padapter); void free_mlme_ap_info(struct adapter *padapter);
void rtw_add_bcn_ie(struct adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *data, u8 len); void rtw_add_bcn_ie(struct adapter *padapter, struct wlan_bssid_ex *pnetwork, u8 index, u8 *data, u8 len);
void rtw_remove_bcn_ie(struct adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index); void rtw_remove_bcn_ie(struct adapter *padapter, struct wlan_bssid_ex *pnetwork, u8 index);
void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx); void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx);
void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level); void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level);
void expire_timeout_chk(struct adapter *padapter); void expire_timeout_chk(struct adapter *padapter);

View file

@ -218,7 +218,7 @@ Command Event Mode
*/ */
struct joinbss_parm { struct joinbss_parm {
WLAN_BSSID_EX network; struct wlan_bssid_ex network;
}; };
/* /*
@ -241,7 +241,7 @@ Notes: To create a BSS
Command Mode Command Mode
*/ */
struct createbss_parm { struct createbss_parm {
WLAN_BSSID_EX network; struct wlan_bssid_ex network;
}; };
/* /*
@ -549,7 +549,7 @@ struct getrfintfs_parm {
struct Tx_Beacon_param struct Tx_Beacon_param
{ {
WLAN_BSSID_EX network; struct wlan_bssid_ex network;
}; };
/* /*

View file

@ -39,7 +39,7 @@ Used to report a bss has been scanned
*/ */
struct survey_event { struct survey_event {
WLAN_BSSID_EX bss; struct wlan_bssid_ex bss;
}; };
/* /*
@ -138,7 +138,7 @@ struct c2hevent_queue {
struct network_queue { struct network_queue {
volatile int head; volatile int head;
volatile int tail; volatile int tail;
WLAN_BSSID_EX networks[NETWORK_QUEUE_SZ]; struct wlan_bssid_ex networks[NETWORK_QUEUE_SZ];
}; };

View file

@ -663,8 +663,8 @@ __inline static void set_scanned_network_val(struct mlme_priv *pmlmepriv, sint v
spin_unlock_bh(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
} }
extern u16 rtw_get_capability(WLAN_BSSID_EX *bss); extern u16 rtw_get_capability(struct wlan_bssid_ex *bss);
extern void rtw_update_scanned_network(struct adapter *adapter, WLAN_BSSID_EX *target); extern void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *target);
extern void rtw_disconnect_hdl_under_linked(struct adapter* adapter, struct sta_info *psta, u8 free_assoc); extern void rtw_disconnect_hdl_under_linked(struct adapter* adapter, struct sta_info *psta, u8 free_assoc);
extern void rtw_generate_random_ibss(u8 *pibss); extern void rtw_generate_random_ibss(u8 *pibss);
extern struct wlan_network* rtw_find_network(_queue *scanned_queue, u8 *addr); extern struct wlan_network* rtw_find_network(_queue *scanned_queue, u8 *addr);
@ -734,7 +734,7 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len);
void rtw_issue_addbareq_cmd(struct adapter *padapter, struct xmit_frame *pxmitframe); void rtw_issue_addbareq_cmd(struct adapter *padapter, struct xmit_frame *pxmitframe);
int rtw_is_same_ibss(struct adapter *adapter, struct wlan_network *pnetwork); int rtw_is_same_ibss(struct adapter *adapter, struct wlan_network *pnetwork);
int is_same_network(WLAN_BSSID_EX *src, WLAN_BSSID_EX *dst, u8 feature); int is_same_network(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst, u8 feature);
void _rtw_roaming(struct adapter *adapter, struct wlan_network *tgt_network); void _rtw_roaming(struct adapter *adapter, struct wlan_network *tgt_network);
void rtw_roaming(struct adapter *adapter, struct wlan_network *tgt_network); void rtw_roaming(struct adapter *adapter, struct wlan_network *tgt_network);

View file

@ -389,7 +389,7 @@ struct mlme_ext_info {
struct WMM_para_element WMM_param; struct WMM_para_element WMM_param;
struct HT_caps_element HT_caps; struct HT_caps_element HT_caps;
struct HT_info_element HT_info; struct HT_info_element HT_info;
WLAN_BSSID_EX network;//join network or bss_network, if in ap mode, it is the same to cur_network.network struct wlan_bssid_ex network;//join network or bss_network, if in ap mode, it is the same to cur_network.network
struct FW_Sta_Info FW_sta_info[NUM_STA]; struct FW_Sta_Info FW_sta_info[NUM_STA];
#ifdef CONFIG_STA_MODE_SCAN_UNDER_AP_MODE #ifdef CONFIG_STA_MODE_SCAN_UNDER_AP_MODE
@ -556,12 +556,12 @@ void flush_all_cam_entry(struct adapter *padapter);
bool IsLegal5GChannel(struct adapter *Adapter, u8 channel); bool IsLegal5GChannel(struct adapter *Adapter, u8 channel);
void site_survey(struct adapter *padapter); void site_survey(struct adapter *padapter);
u8 collect_bss_info(struct adapter *padapter, union recv_frame *precv_frame, WLAN_BSSID_EX *bssid); u8 collect_bss_info(struct adapter *padapter, union recv_frame *precv_frame, struct wlan_bssid_ex *bssid);
void update_network(WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src, struct adapter * padapter, bool update_ie); void update_network(struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src, struct adapter * padapter, bool update_ie);
int get_bsstype(unsigned short capability); int get_bsstype(unsigned short capability);
u8* get_my_bssid(WLAN_BSSID_EX *pnetwork); u8* get_my_bssid(struct wlan_bssid_ex *pnetwork);
u16 get_beacon_interval(WLAN_BSSID_EX *bss); u16 get_beacon_interval(struct wlan_bssid_ex *bss);
int is_client_associated_to_ap(struct adapter *padapter); int is_client_associated_to_ap(struct adapter *padapter);
int is_client_associated_to_ibss(struct adapter *padapter); int is_client_associated_to_ibss(struct adapter *padapter);

View file

@ -174,7 +174,7 @@ struct security_priv
u32 ndisauthtype; // NDIS_802_11_AUTHENTICATION_MODE u32 ndisauthtype; // NDIS_802_11_AUTHENTICATION_MODE
u32 ndisencryptstatus; // NDIS_802_11_ENCRYPTION_STATUS u32 ndisencryptstatus; // NDIS_802_11_ENCRYPTION_STATUS
WLAN_BSSID_EX sec_bss; //for joinbss (h2c buffer) usage struct wlan_bssid_ex sec_bss; //for joinbss (h2c buffer) usage
NDIS_802_11_WEP ndiswep; NDIS_802_11_WEP ndiswep;

View file

@ -292,10 +292,9 @@ typedef struct _WLAN_BCN_INFO
}WLAN_BCN_INFO,*PWLAN_BCN_INFO; }WLAN_BCN_INFO,*PWLAN_BCN_INFO;
/* temporally add #pragma pack for structure alignment issue of /* temporally add #pragma pack for structure alignment issue of
* WLAN_BSSID_EX and get_wlan_bssid_ex_sz() * struct wlan_bssid_ex and get_wlan_bssid_ex_sz()
*/ */
typedef struct _WLAN_BSSID_EX struct wlan_bssid_ex {
{
ULONG Length; ULONG Length;
NDIS_802_11_MAC_ADDRESS MacAddress; NDIS_802_11_MAC_ADDRESS MacAddress;
u8 Reserved[2];//[0]: IS beacon frame u8 Reserved[2];//[0]: IS beacon frame
@ -309,13 +308,11 @@ typedef struct _WLAN_BSSID_EX
WLAN_PHY_INFO PhyInfo; WLAN_PHY_INFO PhyInfo;
ULONG IELength; ULONG IELength;
u8 IEs[MAX_IE_SZ]; //(timestamp, beacon interval, and capability information) u8 IEs[MAX_IE_SZ]; //(timestamp, beacon interval, and capability information)
} } __packed;
__attribute__((packed))
WLAN_BSSID_EX, *PWLAN_BSSID_EX;
__inline static uint get_wlan_bssid_ex_sz(WLAN_BSSID_EX *bss) __inline static uint get_wlan_bssid_ex_sz(struct wlan_bssid_ex *bss)
{ {
return (sizeof(WLAN_BSSID_EX) -MAX_IE_SZ + bss->IELength); return (sizeof(struct wlan_bssid_ex) -MAX_IE_SZ + bss->IELength);
} }
struct wlan_network { struct wlan_network {
@ -325,7 +322,7 @@ struct wlan_network {
unsigned long last_scanned; //timestamp for the network unsigned long last_scanned; //timestamp for the network
int aid; //will only be valid when a BSS is joinned. int aid; //will only be valid when a BSS is joinned.
int join_res; int join_res;
WLAN_BSSID_EX network; //must be the last item struct wlan_bssid_ex network; //must be the last item
WLAN_BCN_INFO BcnInfo; WLAN_BCN_INFO BcnInfo;
}; };

View file

@ -510,7 +510,7 @@ exit:
*/ */
int rtw_cfg80211_check_bss(struct adapter *padapter) int rtw_cfg80211_check_bss(struct adapter *padapter)
{ {
WLAN_BSSID_EX *pnetwork = &(padapter->mlmeextpriv.mlmext_info.network); struct wlan_bssid_ex *pnetwork = &(padapter->mlmeextpriv.mlmext_info.network);
struct cfg80211_bss *bss = NULL; struct cfg80211_bss *bss = NULL;
struct ieee80211_channel *notify_channel = NULL; struct ieee80211_channel *notify_channel = NULL;
u32 freq; u32 freq;
@ -550,13 +550,13 @@ void rtw_cfg80211_ibss_indicate_connect(struct adapter *padapter)
} }
if (!rtw_cfg80211_check_bss(padapter)) { if (!rtw_cfg80211_check_bss(padapter)) {
WLAN_BSSID_EX *pnetwork = &(padapter->mlmeextpriv.mlmext_info.network); struct wlan_bssid_ex *pnetwork = &(padapter->mlmeextpriv.mlmext_info.network);
struct wlan_network *scanned = pmlmepriv->cur_network_scanned; struct wlan_network *scanned = pmlmepriv->cur_network_scanned;
if(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)==true) if(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)==true)
{ {
memcpy(&cur_network->network, pnetwork, sizeof(WLAN_BSSID_EX)); memcpy(&cur_network->network, pnetwork, sizeof(struct wlan_bssid_ex));
if(cur_network) if(cur_network)
{ {
if (!rtw_cfg80211_inform_bss(padapter,cur_network)) if (!rtw_cfg80211_inform_bss(padapter,cur_network))
@ -641,7 +641,7 @@ void rtw_cfg80211_indicate_connect(struct adapter *padapter)
#endif /* CONFIG_P2P */ #endif /* CONFIG_P2P */
{ {
WLAN_BSSID_EX *pnetwork = &(padapter->mlmeextpriv.mlmext_info.network); struct wlan_bssid_ex *pnetwork = &(padapter->mlmeextpriv.mlmext_info.network);
struct wlan_network *scanned = pmlmepriv->cur_network_scanned; struct wlan_network *scanned = pmlmepriv->cur_network_scanned;
/* DBG_871X(FUNC_ADPT_FMT" BSS not found\n", FUNC_ADPT_ARG(padapter)); */ /* DBG_871X(FUNC_ADPT_FMT" BSS not found\n", FUNC_ADPT_ARG(padapter)); */
@ -3536,8 +3536,8 @@ static int cfg80211_rtw_start_ap(struct wiphy *wiphy, struct net_device *ndev,
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) {
WLAN_BSSID_EX *pbss_network = &adapter->mlmepriv.cur_network.network; struct wlan_bssid_ex *pbss_network = &adapter->mlmepriv.cur_network.network;
WLAN_BSSID_EX *pbss_network_ext = &adapter->mlmeextpriv.mlmext_info.network; struct wlan_bssid_ex *pbss_network_ext = &adapter->mlmeextpriv.mlmext_info.network;
memcpy(pbss_network->Ssid.Ssid, (void *)settings->ssid, settings->ssid_len); memcpy(pbss_network->Ssid.Ssid, (void *)settings->ssid, settings->ssid_len);
pbss_network->Ssid.SsidLength = settings->ssid_len; pbss_network->Ssid.SsidLength = settings->ssid_len;

View file

@ -198,7 +198,7 @@ void rtw_indicate_wx_assoc_event(struct adapter *padapter)
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network)); struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex*)(&(pmlmeinfo->network));
memset(&wrqu, 0, sizeof(union iwreq_data)); memset(&wrqu, 0, sizeof(union iwreq_data));
@ -1044,7 +1044,7 @@ static int rtw_wx_get_name(struct net_device *dev,
char *p; char *p;
u8 ht_cap=false; u8 ht_cap=false;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
WLAN_BSSID_EX *pcur_bss = &pmlmepriv->cur_network.network; struct wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network;
NDIS_802_11_RATES_EX* prates = NULL; NDIS_802_11_RATES_EX* prates = NULL;
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("cmd_code=%x\n", info->cmd)); RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("cmd_code=%x\n", info->cmd));
@ -1125,7 +1125,7 @@ static int rtw_wx_get_freq(struct net_device *dev,
{ {
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
WLAN_BSSID_EX *pcur_bss = &pmlmepriv->cur_network.network; struct wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network;
if(check_fwstate(pmlmepriv, _FW_LINKED) == true) if(check_fwstate(pmlmepriv, _FW_LINKED) == true)
{ {
@ -1555,7 +1555,7 @@ static int rtw_wx_get_wap(struct net_device *dev,
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
WLAN_BSSID_EX *pcur_bss = &pmlmepriv->cur_network.network; struct wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network;
wrqu->ap_addr.sa_family = ARPHRD_ETHER; wrqu->ap_addr.sa_family = ARPHRD_ETHER;
@ -2078,7 +2078,7 @@ static int rtw_wx_get_essid(struct net_device *dev,
u32 len,ret = 0; u32 len,ret = 0;
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
WLAN_BSSID_EX *pcur_bss = &pmlmepriv->cur_network.network; struct wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network;
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_wx_get_essid\n")); RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_wx_get_essid\n"));
@ -7354,8 +7354,8 @@ static int rtw_set_hidden_ssid(struct net_device *dev, struct ieee_param *param,
ssid_ie = rtw_get_ie(param->u.bcn_ie.buf, WLAN_EID_SSID, &ssid_len, ie_len); ssid_ie = rtw_get_ie(param->u.bcn_ie.buf, WLAN_EID_SSID, &ssid_len, ie_len);
if (ssid_ie && ssid_len) { if (ssid_ie && ssid_len) {
WLAN_BSSID_EX *pbss_network = &mlmepriv->cur_network.network; struct wlan_bssid_ex *pbss_network = &mlmepriv->cur_network.network;
WLAN_BSSID_EX *pbss_network_ext = &mlmeinfo->network; struct wlan_bssid_ex *pbss_network_ext = &mlmeinfo->network;
memcpy(ssid, ssid_ie+2, ssid_len); memcpy(ssid, ssid_ie+2, ssid_len);
ssid[ssid_len>NDIS_802_11_LENGTH_SSID?NDIS_802_11_LENGTH_SSID:ssid_len] = 0x0; ssid[ssid_len>NDIS_802_11_LENGTH_SSID?NDIS_802_11_LENGTH_SSID:ssid_len] = 0x0;
@ -9020,7 +9020,7 @@ static s32 createpseudoadhoc(struct adapter *padapter)
NDIS_802_11_AUTHENTICATION_MODE authmode; NDIS_802_11_AUTHENTICATION_MODE authmode;
struct mlme_priv *pmlmepriv; struct mlme_priv *pmlmepriv;
NDIS_802_11_SSID *passoc_ssid; NDIS_802_11_SSID *passoc_ssid;
WLAN_BSSID_EX *pdev_network; struct wlan_bssid_ex *pdev_network;
u8 *pibss; u8 *pibss;
u8 ssid[] = "pseduo_ad-hoc"; u8 ssid[] = "pseduo_ad-hoc";
s32 err; s32 err;