mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-22 12:33:40 +00:00
rtl8188eu: Convert the typedef statements in include/wlan_bssdef.h
One remains that I still do not know how to convert; however, it has been moved to os_dep/ioctl_linux.c where it is used. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
3c0fdf5c36
commit
a01908ab27
29 changed files with 411 additions and 495 deletions
|
@ -81,7 +81,7 @@ static void update_BCNTIM(_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;
|
||||||
|
|
||||||
/* update TIM IE */
|
/* update TIM IE */
|
||||||
|
@ -165,16 +165,16 @@ static void update_BCNTIM(_adapter *padapter)
|
||||||
set_tx_beacon_cmd(padapter);
|
set_tx_beacon_cmd(padapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_add_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *data, u8 len)
|
void rtw_add_bcn_ie(_adapter *padapter, struct wlan_bssid_ex *pnetwork, u8 index, u8 *data, u8 len)
|
||||||
{
|
{
|
||||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
struct ndis_802_11_var_ie * pIE;
|
||||||
u8 bmatch = false;
|
u8 bmatch = false;
|
||||||
u8 *pie = pnetwork->IEs;
|
u8 *pie = pnetwork->IEs;
|
||||||
u8 *p, *dst_ie, *premainder_ie=NULL, *pbackup_remainder_ie=NULL;
|
u8 *p, *dst_ie, *premainder_ie=NULL, *pbackup_remainder_ie=NULL;
|
||||||
u32 i, offset, ielen, ie_offset, remainder_ielen = 0;
|
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_ie); i < pnetwork->IELength;) {
|
||||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pnetwork->IEs + i);
|
pIE = (struct ndis_802_11_var_ie *)(pnetwork->IEs + i);
|
||||||
|
|
||||||
if (pIE->ElementID > index) {
|
if (pIE->ElementID > index) {
|
||||||
break;
|
break;
|
||||||
|
@ -227,7 +227,7 @@ void rtw_add_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *d
|
||||||
pnetwork->IELength = offset + remainder_ielen;
|
pnetwork->IELength = offset + remainder_ielen;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_remove_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index)
|
void rtw_remove_bcn_ie(_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;
|
||||||
|
@ -454,7 +454,7 @@ void add_RATid(_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;
|
||||||
|
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
if (psta)
|
if (psta)
|
||||||
|
@ -551,7 +551,7 @@ static void update_bmc_sta(_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) {
|
||||||
|
@ -740,10 +740,10 @@ static void start_bss_network(_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);
|
||||||
|
@ -814,7 +814,7 @@ static void start_bss_network(_adapter *padapter, u8 *pbuf)
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
/* set channel, bwmode */
|
/* 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_ie)), _HT_ADD_INFO_IE_, &ie_len, (pnetwork->IELength - sizeof(struct ndis_802_11_fixed_ie)));
|
||||||
if ( p && ie_len) {
|
if ( p && ie_len) {
|
||||||
pht_info = (struct HT_info_element *)(p+2);
|
pht_info = (struct HT_info_element *)(p+2);
|
||||||
|
|
||||||
|
@ -850,7 +850,7 @@ static void start_bss_network(_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));
|
||||||
|
|
||||||
/* let pnetwork_mlmeext == pnetwork_mlme. */
|
/* let pnetwork_mlmeext == pnetwork_mlme. */
|
||||||
_rtw_memcpy(pnetwork_mlmeext, pnetwork, pnetwork->Length);
|
_rtw_memcpy(pnetwork_mlmeext, pnetwork, pnetwork->Length);
|
||||||
|
@ -891,7 +891,7 @@ int rtw_check_beacon_data(_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;
|
||||||
|
|
||||||
|
@ -941,7 +941,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SSID_IE_, &ie_len, (pbss_network->IELength -_BEACON_IE_OFFSET_));
|
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SSID_IE_, &ie_len, (pbss_network->IELength -_BEACON_IE_OFFSET_));
|
||||||
if (p && ie_len>0)
|
if (p && ie_len>0)
|
||||||
{
|
{
|
||||||
_rtw_memset(&pbss_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
|
_rtw_memset(&pbss_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||||
_rtw_memcpy(pbss_network->Ssid.Ssid, (p + 2), ie_len);
|
_rtw_memcpy(pbss_network->Ssid.Ssid, (p + 2), ie_len);
|
||||||
pbss_network->Ssid.SsidLength = ie_len;
|
pbss_network->Ssid.SsidLength = ie_len;
|
||||||
}
|
}
|
||||||
|
@ -983,7 +983,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _ERPINFO_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _ERPINFO_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||||
if (p && ie_len>0)
|
if (p && ie_len>0)
|
||||||
{
|
{
|
||||||
ERP_IE_handler(padapter, (PNDIS_802_11_VARIABLE_IEs)p);
|
ERP_IE_handler(padapter, (struct ndis_802_11_var_ie *)p);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* update privacy/security */
|
/* update privacy/security */
|
||||||
|
@ -1158,14 +1158,14 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||||
pmlmepriv->htpriv.ampdu_enable = true;
|
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_var_ie *)pHT_caps_ie);
|
||||||
|
|
||||||
HT_info_handler(padapter, (PNDIS_802_11_VARIABLE_IEs)pHT_info_ie);
|
HT_info_handler(padapter, (struct ndis_802_11_var_ie *)pHT_info_ie);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
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);
|
||||||
|
@ -1331,7 +1331,7 @@ static void update_bcn_erpinfo_ie(_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;
|
||||||
|
|
||||||
|
@ -1344,7 +1344,7 @@ static void update_bcn_erpinfo_ie(_adapter *padapter)
|
||||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _ERPINFO_IE_, &len, (pnetwork->IELength - _BEACON_IE_OFFSET_));
|
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _ERPINFO_IE_, &len, (pnetwork->IELength - _BEACON_IE_OFFSET_));
|
||||||
if (p && len>0)
|
if (p && len>0)
|
||||||
{
|
{
|
||||||
PNDIS_802_11_VARIABLE_IEs pIE = (PNDIS_802_11_VARIABLE_IEs)p;
|
struct ndis_802_11_var_ie * pIE = (struct ndis_802_11_var_ie *)p;
|
||||||
|
|
||||||
if (pmlmepriv->num_sta_non_erp == 1)
|
if (pmlmepriv->num_sta_non_erp == 1)
|
||||||
pIE->data[0] |= RTW_ERP_INFO_NON_ERP_PRESENT|RTW_ERP_INFO_USE_PROTECTION;
|
pIE->data[0] |= RTW_ERP_INFO_NON_ERP_PRESENT|RTW_ERP_INFO_USE_PROTECTION;
|
||||||
|
@ -1398,7 +1398,7 @@ static void update_bcn_wps_ie(_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;
|
||||||
|
|
||||||
|
|
|
@ -501,7 +501,7 @@ rtw_sitesurvey_cmd(~)
|
||||||
### NOTE:#### (!!!!)
|
### NOTE:#### (!!!!)
|
||||||
MUST TAKE CARE THAT BEFORE CALLING THIS FUNC, YOU SHOULD HAVE LOCKED pmlmepriv->lock
|
MUST TAKE CARE THAT BEFORE CALLING THIS FUNC, YOU SHOULD HAVE LOCKED pmlmepriv->lock
|
||||||
*/
|
*/
|
||||||
u8 rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num,
|
u8 rtw_sitesurvey_cmd(_adapter *padapter, struct ndis_802_11_ssid *ssid, int ssid_num,
|
||||||
struct rtw_ieee80211_channel *ch, int ch_num)
|
struct rtw_ieee80211_channel *ch, int ch_num)
|
||||||
{
|
{
|
||||||
u8 res = _FAIL;
|
u8 res = _FAIL;
|
||||||
|
@ -547,7 +547,7 @@ _func_enter_;
|
||||||
int i;
|
int i;
|
||||||
for (i=0; i<ssid_num && i< RTW_SSID_SCAN_AMOUNT; i++) {
|
for (i=0; i<ssid_num && i< RTW_SSID_SCAN_AMOUNT; i++) {
|
||||||
if (ssid[i].SsidLength) {
|
if (ssid[i].SsidLength) {
|
||||||
_rtw_memcpy(&psurveyPara->ssid[i], &ssid[i], sizeof(NDIS_802_11_SSID));
|
_rtw_memcpy(&psurveyPara->ssid[i], &ssid[i], sizeof(struct ndis_802_11_ssid));
|
||||||
psurveyPara->ssid_num++;
|
psurveyPara->ssid_num++;
|
||||||
if (0)
|
if (0)
|
||||||
DBG_88E(FUNC_ADPT_FMT" ssid:(%s, %d)\n", FUNC_ADPT_ARG(padapter),
|
DBG_88E(FUNC_ADPT_FMT" ssid:(%s, %d)\n", FUNC_ADPT_ARG(padapter),
|
||||||
|
@ -870,7 +870,7 @@ u8 rtw_createbss_cmd(_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;
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -892,7 +892,7 @@ _func_enter_;
|
||||||
_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;
|
||||||
pdev_network->Length = pcmd->cmdsz;
|
pdev_network->Length = pcmd->cmdsz;
|
||||||
|
@ -938,7 +938,7 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network* pnetwork)
|
||||||
{
|
{
|
||||||
u8 res = _SUCCESS;
|
u8 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;
|
||||||
|
@ -948,7 +948,7 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network* pnetwork)
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
struct ht_priv *phtpriv = &pmlmepriv->htpriv;
|
struct ht_priv *phtpriv = &pmlmepriv->htpriv;
|
||||||
#endif /* CONFIG_80211N_HT */
|
#endif /* CONFIG_80211N_HT */
|
||||||
NDIS_802_11_NETWORK_INFRASTRUCTURE ndis_network_mode = pnetwork->network.InfrastructureMode;
|
enum ndis_802_11_network_infra ndis_network_mode = pnetwork->network.InfrastructureMode;
|
||||||
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);
|
||||||
|
|
||||||
|
@ -969,7 +969,7 @@ _func_enter_;
|
||||||
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 */
|
||||||
|
@ -993,7 +993,7 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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)
|
||||||
|
@ -1008,7 +1008,7 @@ _func_enter_;
|
||||||
|
|
||||||
_rtw_memset(psecnetwork, 0, t_len);
|
_rtw_memset(psecnetwork, 0, t_len);
|
||||||
|
|
||||||
_rtw_memcpy(psecnetwork, &pnetwork->network, get_WLAN_BSSID_EX_sz(&pnetwork->network));
|
_rtw_memcpy(psecnetwork, &pnetwork->network, get_wlan_bssid_ex_sz(&pnetwork->network));
|
||||||
|
|
||||||
psecuritypriv->authenticator_ie[0]=(unsigned char)psecnetwork->IELength;
|
psecuritypriv->authenticator_ie[0]=(unsigned char)psecnetwork->IELength;
|
||||||
|
|
||||||
|
@ -1079,7 +1079,7 @@ _func_enter_;
|
||||||
|
|
||||||
DBG_88E("%s: smart_ps=%d\n", __func__, padapter->pwrctrlpriv.smart_ps);
|
DBG_88E("%s: smart_ps=%d\n", __func__, padapter->pwrctrlpriv.smart_ps);
|
||||||
|
|
||||||
pcmd->cmdsz = get_WLAN_BSSID_EX_sz(psecnetwork);/* get cmdsz before endian conversion */
|
pcmd->cmdsz = get_wlan_bssid_ex_sz(psecnetwork);/* get cmdsz before endian conversion */
|
||||||
|
|
||||||
_rtw_init_listhead(&pcmd->list);
|
_rtw_init_listhead(&pcmd->list);
|
||||||
pcmd->cmdcode = _JoinBss_CMD_;/* GEN_CMD_CODE(_JoinBss) */
|
pcmd->cmdcode = _JoinBss_CMD_;/* GEN_CMD_CODE(_JoinBss) */
|
||||||
|
@ -1139,7 +1139,7 @@ _func_exit_;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 rtw_setopmode_cmd(_adapter *padapter, NDIS_802_11_NETWORK_INFRASTRUCTURE networktype)
|
u8 rtw_setopmode_cmd(_adapter *padapter, enum ndis_802_11_network_infra networktype)
|
||||||
{
|
{
|
||||||
struct cmd_obj* ph2c;
|
struct cmd_obj* ph2c;
|
||||||
struct setopmode_parm* psetop;
|
struct setopmode_parm* psetop;
|
||||||
|
@ -2435,7 +2435,7 @@ void rtw_createbss_cmd_callback(_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);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -2482,23 +2482,15 @@ _func_enter_;
|
||||||
rtw_list_insert_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue);
|
rtw_list_insert_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
pnetwork->Length = get_WLAN_BSSID_EX_sz(pnetwork);
|
pnetwork->Length = get_wlan_bssid_ex_sz(pnetwork);
|
||||||
_rtw_memcpy(&(pwlan->network), pnetwork, pnetwork->Length);
|
_rtw_memcpy(&(pwlan->network), pnetwork, pnetwork->Length);
|
||||||
/* pwlan->fixed = true; */
|
|
||||||
|
|
||||||
/* rtw_list_insert_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue); */
|
_rtw_memcpy(&tgt_network->network, pnetwork, (get_wlan_bssid_ex_sz(pnetwork)));
|
||||||
|
|
||||||
/* copy pdev_network information to pmlmepriv->cur_network */
|
|
||||||
_rtw_memcpy(&tgt_network->network, pnetwork, (get_WLAN_BSSID_EX_sz(pnetwork)));
|
|
||||||
|
|
||||||
/* reset DSConfig */
|
|
||||||
/* tgt_network->network.Configuration.DSConfig = (u32)rtw_ch2freq(pnetwork->Configuration.DSConfig); */
|
|
||||||
|
|
||||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||||
|
|
||||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||||
/* we will set _FW_LINKED when there is one more sat to join us (rtw_stassoc_event_callback) */
|
/* we will set _FW_LINKED when there is one more sat to join us (rtw_stassoc_event_callback) */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
createbss_cmd_fail:
|
createbss_cmd_fail:
|
||||||
|
|
|
@ -408,7 +408,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;
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -1534,7 +1534,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;
|
||||||
|
|
|
@ -37,7 +37,7 @@ extern void indicate_wx_scan_complete_event(_adapter *padapter);
|
||||||
(addr[4] == 0xff) && (addr[5] == 0xff) ) ? true : false \
|
(addr[4] == 0xff) && (addr[5] == 0xff) ) ? true : false \
|
||||||
)
|
)
|
||||||
|
|
||||||
u8 rtw_validate_ssid(NDIS_802_11_SSID *ssid)
|
u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid)
|
||||||
{
|
{
|
||||||
u8 i;
|
u8 i;
|
||||||
u8 ret=true;
|
u8 ret=true;
|
||||||
|
@ -126,14 +126,14 @@ _func_enter_;
|
||||||
/* 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;
|
||||||
|
|
||||||
pibss = padapter->registrypriv.dev_network.MacAddress;
|
pibss = padapter->registrypriv.dev_network.MacAddress;
|
||||||
|
|
||||||
_rtw_memset(&pdev_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
|
_rtw_memset(&pdev_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||||
_rtw_memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
_rtw_memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid));
|
||||||
|
|
||||||
rtw_update_registrypriv_dev_network(padapter);
|
rtw_update_registrypriv_dev_network(padapter);
|
||||||
|
|
||||||
|
@ -277,7 +277,7 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 rtw_set_802_11_ssid(_adapter* padapter, NDIS_802_11_SSID *ssid)
|
u8 rtw_set_802_11_ssid(_adapter* padapter, struct ndis_802_11_ssid *ssid)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
u8 status = _SUCCESS;
|
u8 status = _SUCCESS;
|
||||||
|
@ -377,7 +377,7 @@ handle_tkip_countermeasure:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(&pmlmepriv->assoc_ssid, ssid, sizeof(NDIS_802_11_SSID));
|
_rtw_memcpy(&pmlmepriv->assoc_ssid, ssid, sizeof(struct ndis_802_11_ssid));
|
||||||
pmlmepriv->assoc_by_bssid=false;
|
pmlmepriv->assoc_by_bssid=false;
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
|
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
|
||||||
|
@ -401,12 +401,12 @@ _func_exit_;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 rtw_set_802_11_infrastructure_mode(_adapter* padapter,
|
u8 rtw_set_802_11_infrastructure_mode(_adapter* padapter,
|
||||||
NDIS_802_11_NETWORK_INFRASTRUCTURE networktype)
|
enum ndis_802_11_network_infra networktype)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
struct wlan_network *cur_network = &pmlmepriv->cur_network;
|
struct wlan_network *cur_network = &pmlmepriv->cur_network;
|
||||||
NDIS_802_11_NETWORK_INFRASTRUCTURE* pold_state = &(cur_network->network.InfrastructureMode);
|
enum ndis_802_11_network_infra* pold_state = &(cur_network->network.InfrastructureMode);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
|
@ -507,7 +507,7 @@ _func_exit_;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 rtw_set_802_11_bssid_list_scan(_adapter* padapter, NDIS_802_11_SSID *pssid, int ssid_max_num)
|
u8 rtw_set_802_11_bssid_list_scan(_adapter* padapter, struct ndis_802_11_ssid *pssid, int ssid_max_num)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
struct mlme_priv *pmlmepriv= &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv= &padapter->mlmepriv;
|
||||||
|
@ -559,7 +559,7 @@ _func_exit_;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 rtw_set_802_11_authentication_mode(_adapter* padapter, NDIS_802_11_AUTHENTICATION_MODE authmode)
|
u8 rtw_set_802_11_authentication_mode(_adapter* padapter, enum ndis_802_11_auth_mode authmode)
|
||||||
{
|
{
|
||||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||||
int res;
|
int res;
|
||||||
|
@ -588,7 +588,7 @@ _func_exit_;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 rtw_set_802_11_add_wep(_adapter* padapter, NDIS_802_11_WEP *wep){
|
u8 rtw_set_802_11_add_wep(_adapter* padapter, struct ndis_802_11_wep *wep){
|
||||||
|
|
||||||
sint keyid,res;
|
sint keyid,res;
|
||||||
struct security_priv* psecuritypriv=&(padapter->securitypriv);
|
struct security_priv* psecuritypriv=&(padapter->securitypriv);
|
||||||
|
@ -690,7 +690,7 @@ _func_exit_;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 rtw_set_802_11_add_key(_adapter* padapter, NDIS_802_11_KEY *key){
|
u8 rtw_set_802_11_add_key(_adapter* padapter, struct ndis_802_11_key *key){
|
||||||
|
|
||||||
uint encryptionalgo;
|
uint encryptionalgo;
|
||||||
u8 * pbssid;
|
u8 * pbssid;
|
||||||
|
@ -883,8 +883,8 @@ _func_enter_;
|
||||||
if ((padapter->securitypriv.dot11AuthAlgrthm !=dot11AuthAlgrthm_8021X)&&(encryptionalgo== _WEP40_ || encryptionalgo== _WEP104_))
|
if ((padapter->securitypriv.dot11AuthAlgrthm !=dot11AuthAlgrthm_8021X)&&(encryptionalgo== _WEP40_ || encryptionalgo== _WEP104_))
|
||||||
{
|
{
|
||||||
u32 keyindex;
|
u32 keyindex;
|
||||||
u32 len = FIELD_OFFSET(NDIS_802_11_KEY, KeyMaterial) + key->KeyLength;
|
u32 len = FIELD_OFFSET(struct ndis_802_11_key, KeyMaterial) + key->KeyLength;
|
||||||
NDIS_802_11_WEP *wep = &padapter->securitypriv.ndiswep;
|
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"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("OID_802_11_ADD_KEY: +++++ WEP key +++++\n"));
|
||||||
|
|
||||||
|
@ -912,12 +912,12 @@ _func_enter_;
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("OID_802_11_ADD_KEY: +++++ SetRSC+++++\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("OID_802_11_ADD_KEY: +++++ SetRSC+++++\n"));
|
||||||
if (bgroup == true)
|
if (bgroup == true)
|
||||||
{
|
{
|
||||||
NDIS_802_11_KEY_RSC keysrc=key->KeyRSC & 0x00FFFFFFFFFFFFULL;
|
unsigned long long keysrc = key->KeyRSC & 0x00FFFFFFFFFFFFULL;
|
||||||
_rtw_memcpy(&padapter->securitypriv.dot11Grprxpn, &keysrc, 8);
|
_rtw_memcpy(&padapter->securitypriv.dot11Grprxpn, &keysrc, 8);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NDIS_802_11_KEY_RSC keysrc=key->KeyRSC & 0x00FFFFFFFFFFFFULL;
|
unsigned long long keysrc = key->KeyRSC & 0x00FFFFFFFFFFFFULL;
|
||||||
_rtw_memcpy(&padapter->securitypriv.dot11Grptxpn, &keysrc, 8);
|
_rtw_memcpy(&padapter->securitypriv.dot11Grptxpn, &keysrc, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1053,7 +1053,7 @@ _func_exit_;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 rtw_set_802_11_remove_key(_adapter* padapter, NDIS_802_11_REMOVE_KEY *key){
|
u8 rtw_set_802_11_remove_key(_adapter* padapter, struct ndis_802_11_remove_key *key){
|
||||||
|
|
||||||
u8 *pbssid;
|
u8 *pbssid;
|
||||||
struct sta_info *stainfo;
|
struct sta_info *stainfo;
|
||||||
|
@ -1108,7 +1108,7 @@ u16 rtw_get_cur_max_rate(_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;
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
struct rtw_ieee80211_ht_cap *pht_capie;
|
struct rtw_ieee80211_ht_cap *pht_capie;
|
||||||
u8 rf_type = 0;
|
u8 rf_type = 0;
|
||||||
|
|
|
@ -63,7 +63,7 @@ _func_enter_;
|
||||||
|
|
||||||
set_scanned_network_val(pmlmepriv, 0);
|
set_scanned_network_val(pmlmepriv, 0);
|
||||||
|
|
||||||
_rtw_memset(&pmlmepriv->assoc_ssid,0,sizeof(NDIS_802_11_SSID));
|
_rtw_memset(&pmlmepriv->assoc_ssid,0,sizeof(struct ndis_802_11_ssid));
|
||||||
|
|
||||||
pbuf = rtw_zvmalloc(MAX_BSS_CNT * (sizeof(struct wlan_network)));
|
pbuf = rtw_zvmalloc(MAX_BSS_CNT * (sizeof(struct wlan_network)));
|
||||||
|
|
||||||
|
@ -428,7 +428,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;
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -559,14 +559,14 @@ int rtw_is_same_ibss(_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);
|
||||||
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)
|
||||||
{
|
{
|
||||||
return (a->Ssid.SsidLength == b->Ssid.SsidLength)
|
return (a->Ssid.SsidLength == b->Ssid.SsidLength)
|
||||||
&& _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)
|
int is_same_network(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst)
|
||||||
{
|
{
|
||||||
u16 s_cap, d_cap;
|
u16 s_cap, d_cap;
|
||||||
__le16 le_scap, le_dcap;
|
__le16 le_scap, le_dcap;
|
||||||
|
@ -624,7 +624,7 @@ _func_exit_;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void update_network(WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src,
|
void update_network(struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src,
|
||||||
_adapter * padapter, bool update_ie)
|
_adapter * padapter, bool update_ie)
|
||||||
{
|
{
|
||||||
u8 ss_ori = dst->PhyInfo.SignalStrength;
|
u8 ss_ori = dst->PhyInfo.SignalStrength;
|
||||||
|
@ -680,7 +680,7 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (update_ie)
|
if (update_ie)
|
||||||
_rtw_memcpy((u8 *)dst, (u8 *)src, get_WLAN_BSSID_EX_sz(src));
|
_rtw_memcpy((u8 *)dst, (u8 *)src, get_wlan_bssid_ex_sz(src));
|
||||||
|
|
||||||
dst->PhyInfo.SignalStrength = ss_final;
|
dst->PhyInfo.SignalStrength = ss_final;
|
||||||
dst->PhyInfo.SignalQuality = sq_final;
|
dst->PhyInfo.SignalQuality = sq_final;
|
||||||
|
@ -698,7 +698,7 @@ _func_enter_;
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void update_current_network(_adapter *adapter, WLAN_BSSID_EX *pnetwork)
|
static void update_current_network(_adapter *adapter, struct wlan_bssid_ex *pnetwork)
|
||||||
{
|
{
|
||||||
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
||||||
|
|
||||||
|
@ -707,7 +707,7 @@ _func_enter_;
|
||||||
if ( (check_fwstate(pmlmepriv, _FW_LINKED)== true) && (is_same_network(&(pmlmepriv->cur_network.network), pnetwork)))
|
if ( (check_fwstate(pmlmepriv, _FW_LINKED)== true) && (is_same_network(&(pmlmepriv->cur_network.network), pnetwork)))
|
||||||
{
|
{
|
||||||
update_network(&(pmlmepriv->cur_network.network), pnetwork,adapter, true);
|
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_ie),
|
||||||
pmlmepriv->cur_network.network.IELength);
|
pmlmepriv->cur_network.network.IELength);
|
||||||
}
|
}
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
|
@ -716,7 +716,7 @@ _func_exit_;
|
||||||
/*
|
/*
|
||||||
Caller must hold pmlmepriv->lock first.
|
Caller must hold pmlmepriv->lock first.
|
||||||
*/
|
*/
|
||||||
void rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target)
|
void rtw_update_scanned_network(_adapter *adapter, struct wlan_bssid_ex *target)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
_list *plist, *phead;
|
_list *plist, *phead;
|
||||||
|
@ -765,7 +765,7 @@ _func_enter_;
|
||||||
pnetwork = oldest;
|
pnetwork = oldest;
|
||||||
|
|
||||||
rtw_hal_get_def_var(adapter, HAL_DEF_CURRENT_ANTENNA, &(target->PhyInfo.Optimum_antenna));
|
rtw_hal_get_def_var(adapter, HAL_DEF_CURRENT_ANTENNA, &(target->PhyInfo.Optimum_antenna));
|
||||||
_rtw_memcpy(&(pnetwork->network), target, get_WLAN_BSSID_EX_sz(target));
|
_rtw_memcpy(&(pnetwork->network), target, get_wlan_bssid_ex_sz(target));
|
||||||
/* variable initialize */
|
/* variable initialize */
|
||||||
pnetwork->fixed = false;
|
pnetwork->fixed = false;
|
||||||
pnetwork->last_scanned = rtw_get_current_time();
|
pnetwork->last_scanned = rtw_get_current_time();
|
||||||
|
@ -787,7 +787,7 @@ _func_enter_;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
bssid_ex_sz = get_WLAN_BSSID_EX_sz(target);
|
bssid_ex_sz = get_wlan_bssid_ex_sz(target);
|
||||||
target->Length = bssid_ex_sz;
|
target->Length = bssid_ex_sz;
|
||||||
rtw_hal_get_def_var(adapter, HAL_DEF_CURRENT_ANTENNA, &(target->PhyInfo.Optimum_antenna));
|
rtw_hal_get_def_var(adapter, HAL_DEF_CURRENT_ANTENNA, &(target->PhyInfo.Optimum_antenna));
|
||||||
_rtw_memcpy(&(pnetwork->network), target, bssid_ex_sz );
|
_rtw_memcpy(&(pnetwork->network), target, bssid_ex_sz );
|
||||||
|
@ -824,7 +824,7 @@ exit:
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_add_network(_adapter *adapter, WLAN_BSSID_EX *pnetwork)
|
void rtw_add_network(_adapter *adapter, struct wlan_bssid_ex *pnetwork)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
struct mlme_priv *pmlmepriv = &(((_adapter *)adapter)->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(((_adapter *)adapter)->mlmepriv);
|
||||||
|
@ -832,7 +832,7 @@ void rtw_add_network(_adapter *adapter, WLAN_BSSID_EX *pnetwork)
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
#if defined(CONFIG_P2P)
|
#if 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);
|
||||||
|
@ -912,17 +912,17 @@ void rtw_survey_event_callback(_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);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
@ -1020,15 +1020,15 @@ _func_enter_;
|
||||||
if (rtw_select_and_join_from_scanned_queue(pmlmepriv)==_SUCCESS) {
|
if (rtw_select_and_join_from_scanned_queue(pmlmepriv)==_SUCCESS) {
|
||||||
_set_timer(&pmlmepriv->assoc_timer, MAX_JOIN_TIMEOUT );
|
_set_timer(&pmlmepriv->assoc_timer, MAX_JOIN_TIMEOUT );
|
||||||
} 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);
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("switching to adhoc master\n"));
|
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("switching to adhoc master\n"));
|
||||||
|
|
||||||
_rtw_memset(&pdev_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
|
_rtw_memset(&pdev_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||||
_rtw_memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
_rtw_memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid));
|
||||||
|
|
||||||
rtw_update_registrypriv_dev_network(adapter);
|
rtw_update_registrypriv_dev_network(adapter);
|
||||||
rtw_generate_random_ibss(pibss);
|
rtw_generate_random_ibss(pibss);
|
||||||
|
@ -1230,7 +1230,7 @@ void rtw_indicate_disconnect( _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;
|
||||||
|
|
||||||
|
@ -1445,7 +1445,7 @@ static void rtw_joinbss_update_network(_adapter *padapter, struct wlan_network *
|
||||||
break;
|
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_ie),
|
||||||
(cur_network->network.IELength));
|
(cur_network->network.IELength));
|
||||||
|
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
|
@ -1488,8 +1488,8 @@ _func_enter_;
|
||||||
|
|
||||||
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_nolock;
|
goto ignore_nolock;
|
||||||
}
|
}
|
||||||
|
@ -1754,7 +1754,7 @@ void rtw_stadel_event_callback(_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;
|
||||||
|
@ -1835,10 +1835,10 @@ _func_enter_;
|
||||||
pdev_network = &(adapter->registrypriv.dev_network);
|
pdev_network = &(adapter->registrypriv.dev_network);
|
||||||
pibss = adapter->registrypriv.dev_network.MacAddress;
|
pibss = adapter->registrypriv.dev_network.MacAddress;
|
||||||
|
|
||||||
_rtw_memcpy(pdev_network, &tgt_network->network, get_WLAN_BSSID_EX_sz(&tgt_network->network));
|
_rtw_memcpy(pdev_network, &tgt_network->network, get_wlan_bssid_ex_sz(&tgt_network->network));
|
||||||
|
|
||||||
_rtw_memset(&pdev_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
|
_rtw_memset(&pdev_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||||
_rtw_memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
_rtw_memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid));
|
||||||
|
|
||||||
rtw_update_registrypriv_dev_network(adapter);
|
rtw_update_registrypriv_dev_network(adapter);
|
||||||
|
|
||||||
|
@ -2483,16 +2483,16 @@ void rtw_init_registrypriv_dev_network( _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);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
_rtw_memcpy(pdev_network->MacAddress, myhwaddr, ETH_ALEN);
|
_rtw_memcpy(pdev_network->MacAddress, myhwaddr, ETH_ALEN);
|
||||||
|
|
||||||
_rtw_memcpy(&pdev_network->Ssid, &pregistrypriv->ssid, sizeof(NDIS_802_11_SSID));
|
_rtw_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_config);
|
||||||
pdev_network->Configuration.BeaconPeriod = 100;
|
pdev_network->Configuration.BeaconPeriod = 100;
|
||||||
pdev_network->Configuration.FHConfig.Length = 0;
|
pdev_network->Configuration.FHConfig.Length = 0;
|
||||||
pdev_network->Configuration.FHConfig.HopPattern = 0;
|
pdev_network->Configuration.FHConfig.HopPattern = 0;
|
||||||
|
@ -2508,7 +2508,7 @@ void rtw_update_registrypriv_dev_network(_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; */
|
||||||
|
@ -2561,7 +2561,7 @@ _func_enter_;
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
/* notes: translate IELength & Length after assign the Length to cmdsz in createbss_cmd(); */
|
/* notes: translate IELength & Length after assign the Length to cmdsz in createbss_cmd(); */
|
||||||
/* pdev_network->IELength = cpu_to_le32(sz); */
|
/* pdev_network->IELength = cpu_to_le32(sz); */
|
||||||
|
@ -2745,7 +2745,7 @@ void rtw_update_ht_cap(_adapter *padapter, u8 *pie, uint ie_len)
|
||||||
|
|
||||||
/* check Max Rx A-MPDU Size */
|
/* check Max Rx A-MPDU Size */
|
||||||
len = 0;
|
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_ie), _HT_CAPABILITY_IE_, &len, ie_len-sizeof (struct ndis_802_11_fixed_ie));
|
||||||
if (p && len>0)
|
if (p && len>0)
|
||||||
{
|
{
|
||||||
pht_capie = (struct rtw_ieee80211_ht_cap *)(p+2);
|
pht_capie = (struct rtw_ieee80211_ht_cap *)(p+2);
|
||||||
|
@ -2759,7 +2759,7 @@ void rtw_update_ht_cap(_adapter *padapter, u8 *pie, uint ie_len)
|
||||||
|
|
||||||
|
|
||||||
len=0;
|
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_ie), _HT_ADD_INFO_IE_, &len, ie_len-sizeof (struct ndis_802_11_fixed_ie));
|
||||||
if (p && len>0) {
|
if (p && len>0) {
|
||||||
/* todo: */
|
/* todo: */
|
||||||
}
|
}
|
||||||
|
@ -2875,7 +2875,7 @@ void _rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network)
|
||||||
DBG_88E("roaming from %s(%pM length:%d\n",
|
DBG_88E("roaming from %s(%pM length:%d\n",
|
||||||
pnetwork->network.Ssid.Ssid, pnetwork->network.MacAddress,
|
pnetwork->network.Ssid.Ssid, pnetwork->network.MacAddress,
|
||||||
pnetwork->network.Ssid.SsidLength);
|
pnetwork->network.Ssid.SsidLength);
|
||||||
_rtw_memcpy(&pmlmepriv->assoc_ssid, &pnetwork->network.Ssid, sizeof(NDIS_802_11_SSID));
|
_rtw_memcpy(&pmlmepriv->assoc_ssid, &pnetwork->network.Ssid, sizeof(struct ndis_802_11_ssid));
|
||||||
|
|
||||||
pmlmepriv->assoc_by_bssid = false;
|
pmlmepriv->assoc_by_bssid = false;
|
||||||
|
|
||||||
|
|
|
@ -666,7 +666,7 @@ unsigned int OnProbeReq(_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;
|
||||||
|
@ -832,7 +832,7 @@ unsigned int OnBeacon(_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;
|
||||||
|
|
||||||
if (pmlmeext->sitesurvey_res.state == SCAN_PROCESS) {
|
if (pmlmeext->sitesurvey_res.state == SCAN_PROCESS) {
|
||||||
|
@ -845,13 +845,13 @@ unsigned int OnBeacon(_adapter *padapter, union recv_frame *precv_frame)
|
||||||
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 */
|
||||||
|
@ -1216,7 +1216,7 @@ unsigned int OnAssocReq(_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;
|
||||||
|
@ -1743,14 +1743,14 @@ unsigned int OnAssocRsp(_adapter *padapter, union recv_frame *precv_frame)
|
||||||
uint i;
|
uint i;
|
||||||
int res;
|
int res;
|
||||||
unsigned short status;
|
unsigned short status;
|
||||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
struct ndis_802_11_var_ie * pIE;
|
||||||
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;
|
struct ndis_802_11_var_ie * pWapiIE = NULL;
|
||||||
|
|
||||||
DBG_88E("%s\n", __func__);
|
DBG_88E("%s\n", __func__);
|
||||||
|
|
||||||
|
@ -1788,7 +1788,7 @@ unsigned int OnAssocRsp(_adapter *padapter, union recv_frame *precv_frame)
|
||||||
/* to handle HT, WMM, rate adaptive, update MAC reg */
|
/* to handle HT, WMM, rate adaptive, update MAC reg */
|
||||||
/* for not to handle the synchronous IO in the tasklet */
|
/* for not to handle the synchronous IO in the tasklet */
|
||||||
for (i = (6 + WLAN_HDR_A3_LEN); i < pkt_len;) {
|
for (i = (6 + WLAN_HDR_A3_LEN); i < pkt_len;) {
|
||||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pframe + i);
|
pIE = (struct ndis_802_11_var_ie *)(pframe + i);
|
||||||
|
|
||||||
switch (pIE->ElementID) {
|
switch (pIE->ElementID) {
|
||||||
case _VENDOR_SPECIFIC_IE_:
|
case _VENDOR_SPECIFIC_IE_:
|
||||||
|
@ -3829,7 +3829,7 @@ void issue_probersp_p2p(_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);
|
||||||
|
@ -5162,7 +5162,7 @@ void issue_beacon(_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);
|
||||||
|
@ -5417,7 +5417,7 @@ void issue_probersp(_adapter *padapter, unsigned char *da, u8 is_valid_p2p_probe
|
||||||
#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);
|
||||||
|
@ -5584,7 +5584,7 @@ void issue_probersp(_adapter *padapter, unsigned char *da, u8 is_valid_p2p_probe
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _issue_probereq(_adapter *padapter, NDIS_802_11_SSID *pssid, u8 *da, int wait_ack)
|
static int _issue_probereq(_adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da, int wait_ack)
|
||||||
{
|
{
|
||||||
int ret = _FAIL;
|
int ret = _FAIL;
|
||||||
struct xmit_frame *pmgntframe;
|
struct xmit_frame *pmgntframe;
|
||||||
|
@ -5685,12 +5685,12 @@ exit:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void issue_probereq(_adapter *padapter, NDIS_802_11_SSID *pssid, u8 *da)
|
inline void issue_probereq(_adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da)
|
||||||
{
|
{
|
||||||
_issue_probereq(padapter, pssid, da, false);
|
_issue_probereq(padapter, pssid, da, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
int issue_probereq_ex(_adapter *padapter, NDIS_802_11_SSID *pssid, u8 *da,
|
int issue_probereq_ex(_adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da,
|
||||||
int try_cnt, int wait_ms)
|
int try_cnt, int wait_ms)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -5888,7 +5888,7 @@ void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *p
|
||||||
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
|
||||||
|
@ -6030,7 +6030,7 @@ void issue_assocreq(_adapter *padapter)
|
||||||
__le16 le_tmp;
|
__le16 le_tmp;
|
||||||
unsigned int i, j, ie_len, index=0;
|
unsigned int i, j, ie_len, index=0;
|
||||||
unsigned char rf_type, bssrate[NumRates], sta_bssrate[NumRates];
|
unsigned char rf_type, bssrate[NumRates], sta_bssrate[NumRates];
|
||||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
struct ndis_802_11_var_ie * pIE;
|
||||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||||
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
|
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
|
@ -6148,14 +6148,14 @@ void issue_assocreq(_adapter *padapter)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* RSN */
|
/* 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_ie)), _RSN_IE_2_, &ie_len, (pmlmeinfo->network.IELength - sizeof(struct ndis_802_11_fixed_ie)));
|
||||||
if (p != NULL)
|
if (p != NULL)
|
||||||
pframe = rtw_set_ie(pframe, _RSN_IE_2_, ie_len, (p + 2), &(pattrib->pktlen));
|
pframe = rtw_set_ie(pframe, _RSN_IE_2_, ie_len, (p + 2), &(pattrib->pktlen));
|
||||||
|
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
/* HT caps */
|
/* HT caps */
|
||||||
if (padapter->mlmepriv.htpriv.ht_option==true) {
|
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_ie)), _HT_CAPABILITY_IE_, &ie_len, (pmlmeinfo->network.IELength - sizeof(struct ndis_802_11_fixed_ie)));
|
||||||
if ((p != NULL) && (!(is_ap_in_tkip(padapter)))) {
|
if ((p != NULL) && (!(is_ap_in_tkip(padapter)))) {
|
||||||
_rtw_memcpy(&(pmlmeinfo->HT_caps), (p + 2), sizeof(struct HT_caps_element));
|
_rtw_memcpy(&(pmlmeinfo->HT_caps), (p + 2), sizeof(struct HT_caps_element));
|
||||||
|
|
||||||
|
@ -6201,8 +6201,8 @@ void issue_assocreq(_adapter *padapter)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* vendor specific IE, such as WPA, WMM, WPS */
|
/* 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_ie); i < pmlmeinfo->network.IELength;) {
|
||||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pmlmeinfo->network.IEs + i);
|
pIE = (struct ndis_802_11_var_ie *)(pmlmeinfo->network.IEs + i);
|
||||||
|
|
||||||
switch (pIE->ElementID) {
|
switch (pIE->ElementID) {
|
||||||
case _VENDOR_SPECIFIC_IE_:
|
case _VENDOR_SPECIFIC_IE_:
|
||||||
|
@ -7073,7 +7073,7 @@ static void issue_action_BSSCoexistPacket(_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;
|
||||||
|
@ -7082,7 +7082,7 @@ static void issue_action_BSSCoexistPacket(_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 */
|
||||||
|
@ -7450,7 +7450,7 @@ void site_survey(_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(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSID_EX *bssid)
|
u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, struct wlan_bssid_ex *bssid)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
u32 len;
|
u32 len;
|
||||||
|
@ -7469,7 +7469,7 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI
|
||||||
if (len > MAX_IE_SZ)
|
if (len > MAX_IE_SZ)
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
|
|
||||||
_rtw_memset(bssid, 0, sizeof(WLAN_BSSID_EX));
|
_rtw_memset(bssid, 0, sizeof(struct wlan_bssid_ex));
|
||||||
|
|
||||||
subtype = GetFrameSubType(pframe);
|
subtype = GetFrameSubType(pframe);
|
||||||
|
|
||||||
|
@ -7490,7 +7490,7 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
|
@ -7589,7 +7589,7 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI
|
||||||
_rtw_memcpy(&le32_tmp, rtw_get_beacon_interval_from_ie(bssid->IEs), 2);
|
_rtw_memcpy(&le32_tmp, rtw_get_beacon_interval_from_ie(bssid->IEs), 2);
|
||||||
bssid->Configuration.BeaconPeriod = le32_to_cpu(le32_tmp);
|
bssid->Configuration.BeaconPeriod = le32_to_cpu(le32_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;
|
||||||
|
@ -7651,7 +7651,7 @@ void start_create_ibss(_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);
|
||||||
|
|
||||||
|
@ -7659,7 +7659,7 @@ void start_create_ibss(_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 */
|
||||||
{
|
{
|
||||||
|
@ -7708,7 +7708,7 @@ void start_clnt_join(_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;
|
||||||
|
|
||||||
pmlmeext->cur_channel = (u8)pnetwork->Configuration.DSConfig;
|
pmlmeext->cur_channel = (u8)pnetwork->Configuration.DSConfig;
|
||||||
|
@ -7718,7 +7718,7 @@ void start_clnt_join(_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_ESS)
|
if (caps&cap_ESS)
|
||||||
{
|
{
|
||||||
|
@ -7839,7 +7839,7 @@ unsigned int receive_disconnect(_adapter *padapter, unsigned char *MacAddr, unsi
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void process_80211d(PADAPTER padapter, WLAN_BSSID_EX *bssid)
|
static void process_80211d(PADAPTER padapter, struct wlan_bssid_ex *bssid)
|
||||||
{
|
{
|
||||||
struct registry_priv *pregistrypriv;
|
struct registry_priv *pregistrypriv;
|
||||||
struct mlme_ext_priv *pmlmeext;
|
struct mlme_ext_priv *pmlmeext;
|
||||||
|
@ -8125,7 +8125,7 @@ void report_survey_event(_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);
|
||||||
|
@ -8223,7 +8223,7 @@ void report_join_res(_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));
|
||||||
_rtw_memcpy((unsigned char *)(&(pjoinbss_evt->network.network)), &(pmlmeinfo->network), sizeof(WLAN_BSSID_EX));
|
_rtw_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_88E("report_join_res(%d)\n", res);
|
DBG_88E("report_join_res(%d)\n", res);
|
||||||
|
@ -8409,7 +8409,7 @@ void mlmeext_joinbss_event_callback(_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;
|
||||||
|
@ -8940,7 +8940,7 @@ u8 createbss_hdl(_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; */
|
||||||
|
|
||||||
|
@ -8986,13 +8986,13 @@ u8 createbss_hdl(_adapter *padapter, u8 *pbuf)
|
||||||
/* clear CAM */
|
/* clear CAM */
|
||||||
flush_all_cam_entry(padapter);
|
flush_all_cam_entry(padapter);
|
||||||
|
|
||||||
_rtw_memcpy(pnetwork, pbuf, FIELD_OFFSET(WLAN_BSSID_EX, IELength));
|
_rtw_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;
|
||||||
|
|
||||||
_rtw_memcpy(pnetwork->IEs, ((WLAN_BSSID_EX *)pbuf)->IEs, pnetwork->IELength);
|
_rtw_memcpy(pnetwork->IEs, ((struct wlan_bssid_ex *)pbuf)->IEs, pnetwork->IELength);
|
||||||
|
|
||||||
start_create_ibss(padapter);
|
start_create_ibss(padapter);
|
||||||
|
|
||||||
|
@ -9005,11 +9005,11 @@ u8 createbss_hdl(_adapter *padapter, u8 *pbuf)
|
||||||
u8 join_cmd_hdl(_adapter *padapter, u8 *pbuf)
|
u8 join_cmd_hdl(_adapter *padapter, u8 *pbuf)
|
||||||
{
|
{
|
||||||
u8 join_type;
|
u8 join_type;
|
||||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
struct ndis_802_11_var_ie * pIE;
|
||||||
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;
|
||||||
|
|
||||||
|
@ -9048,20 +9048,20 @@ u8 join_cmd_hdl(_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; */
|
||||||
|
|
||||||
_rtw_memcpy(pnetwork, pbuf, FIELD_OFFSET(WLAN_BSSID_EX, IELength));
|
_rtw_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;
|
||||||
|
|
||||||
_rtw_memcpy(pnetwork->IEs, ((WLAN_BSSID_EX *)pbuf)->IEs, pnetwork->IELength);
|
_rtw_memcpy(pnetwork->IEs, ((struct wlan_bssid_ex *)pbuf)->IEs, pnetwork->IELength);
|
||||||
|
|
||||||
/* Check AP vendor to move rtw_joinbss_cmd() */
|
/* Check AP vendor to move rtw_joinbss_cmd() */
|
||||||
/* pmlmeinfo->assoc_AP_vendor = check_assoc_AP(pnetwork->IEs, pnetwork->IELength); */
|
/* 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_ie); i < pnetwork->IELength;)
|
||||||
{
|
{
|
||||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pnetwork->IEs + i);
|
pIE = (struct ndis_802_11_var_ie *)(pnetwork->IEs + i);
|
||||||
|
|
||||||
switch (pIE->ElementID)
|
switch (pIE->ElementID)
|
||||||
{
|
{
|
||||||
|
@ -9137,7 +9137,7 @@ u8 disconnect_hdl(_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))
|
||||||
|
@ -9487,7 +9487,7 @@ _func_enter_;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(&(ptxBeacon_parm->network), &(pmlmeinfo->network), sizeof(WLAN_BSSID_EX));
|
_rtw_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_
|
||||||
|
|
|
@ -96,7 +96,7 @@ void write_rfreg(PADAPTER padapter, u8 rfpath, u32 addr, u32 val)
|
||||||
|
|
||||||
static void _init_mp_priv_(struct mp_priv *pmp_priv)
|
static void _init_mp_priv_(struct mp_priv *pmp_priv)
|
||||||
{
|
{
|
||||||
WLAN_BSSID_EX *pnetwork;
|
struct wlan_bssid_ex *pnetwork;
|
||||||
|
|
||||||
_rtw_memset(pmp_priv, 0, sizeof(struct mp_priv));
|
_rtw_memset(pmp_priv, 0, sizeof(struct mp_priv));
|
||||||
|
|
||||||
|
@ -378,7 +378,7 @@ static void disable_dm(PADAPTER padapter)
|
||||||
/* This function initializes the DUT to the MP test mode */
|
/* This function initializes the DUT to the MP test mode */
|
||||||
s32 mp_start_test(PADAPTER padapter)
|
s32 mp_start_test(PADAPTER padapter)
|
||||||
{
|
{
|
||||||
WLAN_BSSID_EX bssid;
|
struct wlan_bssid_ex bssid;
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
u32 length;
|
u32 length;
|
||||||
u8 val8;
|
u8 val8;
|
||||||
|
@ -424,8 +424,8 @@ s32 mp_start_test(PADAPTER padapter)
|
||||||
|
|
||||||
mpt_ProStartTest(padapter);
|
mpt_ProStartTest(padapter);
|
||||||
|
|
||||||
/* 3 1. initialize a new WLAN_BSSID_EX */
|
/* 3 1. initialize a new struct wlan_bssid_ex */
|
||||||
/* _rtw_memset(&bssid, 0, sizeof(WLAN_BSSID_EX)); */
|
/* _rtw_memset(&bssid, 0, sizeof(struct wlan_bssid_ex)); */
|
||||||
_rtw_memcpy(bssid.MacAddress, pmppriv->network_macaddr, ETH_ALEN);
|
_rtw_memcpy(bssid.MacAddress, pmppriv->network_macaddr, ETH_ALEN);
|
||||||
bssid.Ssid.SsidLength = strlen("mp_pseudo_adhoc");
|
bssid.Ssid.SsidLength = strlen("mp_pseudo_adhoc");
|
||||||
_rtw_memcpy(bssid.Ssid.Ssid, (u8*)"mp_pseudo_adhoc", bssid.Ssid.SsidLength);
|
_rtw_memcpy(bssid.Ssid.Ssid, (u8*)"mp_pseudo_adhoc", bssid.Ssid.SsidLength);
|
||||||
|
@ -433,7 +433,7 @@ s32 mp_start_test(PADAPTER padapter)
|
||||||
bssid.NetworkTypeInUse = Ndis802_11DS;
|
bssid.NetworkTypeInUse = Ndis802_11DS;
|
||||||
bssid.IELength = 0;
|
bssid.IELength = 0;
|
||||||
|
|
||||||
length = get_WLAN_BSSID_EX_sz(&bssid);
|
length = get_wlan_bssid_ex_sz(&bssid);
|
||||||
if (length % 4)
|
if (length % 4)
|
||||||
bssid.Length = ((length >> 2) + 1) << 2; /* round up to multiple of 4 bytes. */
|
bssid.Length = ((length >> 2) + 1) << 2; /* round up to multiple of 4 bytes. */
|
||||||
else
|
else
|
||||||
|
|
|
@ -1707,12 +1707,12 @@ static void find_phase_handler( _adapter* padapter )
|
||||||
{
|
{
|
||||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
NDIS_802_11_SSID ssid;
|
struct ndis_802_11_ssid ssid;
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
_rtw_memset((unsigned char*)&ssid, 0, sizeof(NDIS_802_11_SSID));
|
_rtw_memset((unsigned char*)&ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||||
_rtw_memcpy(ssid.Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN );
|
_rtw_memcpy(ssid.Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN );
|
||||||
ssid.SsidLength = P2P_WILDCARD_SSID_LEN;
|
ssid.SsidLength = P2P_WILDCARD_SSID_LEN;
|
||||||
|
|
||||||
|
|
|
@ -660,7 +660,7 @@ u32 rtw_init_bcmc_stainfo(_adapter* padapter)
|
||||||
|
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
u32 res=_SUCCESS;
|
u32 res=_SUCCESS;
|
||||||
NDIS_802_11_MAC_ADDRESS bcast_addr= {0xff,0xff,0xff,0xff,0xff,0xff};
|
unsigned char bcast_addr[ETH_ALEN] = {0xff,0xff,0xff,0xff,0xff,0xff};
|
||||||
|
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
/* _queue *pstapending = &padapter->xmitpriv.bm_pending; */
|
/* _queue *pstapending = &padapter->xmitpriv.bm_pending; */
|
||||||
|
|
|
@ -492,12 +492,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 val;
|
__le16 val;
|
||||||
_rtw_memcpy((unsigned char *)&val, rtw_get_beacon_interval_from_ie(bss->IEs), 2);
|
_rtw_memcpy((unsigned char *)&val, rtw_get_beacon_interval_from_ie(bss->IEs), 2);
|
||||||
|
@ -669,7 +669,7 @@ void flush_all_cam_entry(_adapter *padapter)
|
||||||
_rtw_memset((u8 *)(pmlmeinfo->FW_sta_info), 0, sizeof(pmlmeinfo->FW_sta_info));
|
_rtw_memset((u8 *)(pmlmeinfo->FW_sta_info), 0, sizeof(pmlmeinfo->FW_sta_info));
|
||||||
}
|
}
|
||||||
|
|
||||||
int WMM_param_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
int WMM_param_handler(_adapter *padapter, struct ndis_802_11_var_ie * pIE)
|
||||||
{
|
{
|
||||||
/* struct registry_priv *pregpriv = &padapter->registrypriv; */
|
/* struct registry_priv *pregpriv = &padapter->registrypriv; */
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
|
@ -805,7 +805,7 @@ void WMMOnAssocRsp(_adapter *padapter)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bwmode_update_check(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
static void bwmode_update_check(_adapter *padapter, struct ndis_802_11_var_ie * pIE)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
unsigned char new_bwmode;
|
unsigned char new_bwmode;
|
||||||
|
@ -872,7 +872,7 @@ static void bwmode_update_check(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pI
|
||||||
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); */
|
||||||
|
@ -900,7 +900,7 @@ static void bwmode_update_check(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pI
|
||||||
#endif /* CONFIG_80211N_HT */
|
#endif /* CONFIG_80211N_HT */
|
||||||
}
|
}
|
||||||
|
|
||||||
void HT_caps_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
void HT_caps_handler(_adapter *padapter, struct ndis_802_11_var_ie * pIE)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
@ -964,7 +964,7 @@ void HT_caps_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HT_info_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
void HT_info_handler(_adapter *padapter, struct ndis_802_11_var_ie * pIE)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||||
|
@ -1021,7 +1021,7 @@ void HTOnAssocRsp(_adapter *padapter)
|
||||||
rtw_hal_set_hwreg(padapter, HW_VAR_AMPDU_FACTOR, (u8 *)(&max_AMPDU_len));
|
rtw_hal_set_hwreg(padapter, HW_VAR_AMPDU_FACTOR, (u8 *)(&max_AMPDU_len));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ERP_IE_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
void ERP_IE_handler(_adapter *padapter, struct ndis_802_11_var_ie * 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);
|
||||||
|
@ -1092,7 +1092,7 @@ int rtw_check_bcn_info(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;
|
||||||
|
@ -1121,14 +1121,14 @@ int rtw_check_bcn_info(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));
|
||||||
|
|
||||||
subtype = GetFrameSubType(pframe) >> 4;
|
subtype = GetFrameSubType(pframe) >> 4;
|
||||||
|
|
||||||
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;
|
||||||
|
@ -1216,7 +1216,7 @@ int rtw_check_bcn_info(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;
|
||||||
|
@ -1282,11 +1282,11 @@ int rtw_check_bcn_info(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;
|
||||||
|
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
|
@ -1296,13 +1296,13 @@ void update_beacon_info(_adapter *padapter, u8 *pframe, uint pkt_len, struct sta
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
struct ndis_802_11_var_ie * pIE;
|
||||||
|
|
||||||
len = pkt_len - (_BEACON_IE_OFFSET_ + WLAN_HDR_A3_LEN);
|
len = pkt_len - (_BEACON_IE_OFFSET_ + WLAN_HDR_A3_LEN);
|
||||||
|
|
||||||
for (i = 0; i < 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_var_ie *)(pframe + (_BEACON_IE_OFFSET_ + WLAN_HDR_A3_LEN) + i);
|
||||||
|
|
||||||
switch (pIE->ElementID)
|
switch (pIE->ElementID)
|
||||||
{
|
{
|
||||||
|
@ -1326,16 +1326,16 @@ void update_beacon_info(_adapter *padapter, u8 *pframe, uint pkt_len, struct sta
|
||||||
unsigned int is_ap_in_tkip(_adapter *padapter)
|
unsigned int is_ap_in_tkip(_adapter *padapter)
|
||||||
{
|
{
|
||||||
u32 i;
|
u32 i;
|
||||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
struct ndis_802_11_var_ie * 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(struct ndis_802_11_fixed_ie); i < pmlmeinfo->network.IELength;)
|
||||||
{
|
{
|
||||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pmlmeinfo->network.IEs + i);
|
pIE = (struct ndis_802_11_var_ie *)(pmlmeinfo->network.IEs + i);
|
||||||
|
|
||||||
switch (pIE->ElementID)
|
switch (pIE->ElementID)
|
||||||
{
|
{
|
||||||
|
@ -1371,15 +1371,15 @@ unsigned int is_ap_in_tkip(_adapter *padapter)
|
||||||
unsigned int should_forbid_n_rate(_adapter * padapter)
|
unsigned int should_forbid_n_rate(_adapter * padapter)
|
||||||
{
|
{
|
||||||
u32 i;
|
u32 i;
|
||||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
struct ndis_802_11_var_ie * 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(struct ndis_802_11_fixed_ie); i < cur_network->IELength;)
|
||||||
{
|
{
|
||||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(cur_network->IEs + i);
|
pIE = (struct ndis_802_11_var_ie *)(cur_network->IEs + i);
|
||||||
|
|
||||||
switch (pIE->ElementID)
|
switch (pIE->ElementID)
|
||||||
{
|
{
|
||||||
|
@ -1415,16 +1415,16 @@ unsigned int should_forbid_n_rate(_adapter * padapter)
|
||||||
unsigned int is_ap_in_wep(_adapter *padapter)
|
unsigned int is_ap_in_wep(_adapter *padapter)
|
||||||
{
|
{
|
||||||
u32 i;
|
u32 i;
|
||||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
struct ndis_802_11_var_ie * 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(struct ndis_802_11_fixed_ie); i < pmlmeinfo->network.IELength;)
|
||||||
{
|
{
|
||||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pmlmeinfo->network.IEs + i);
|
pIE = (struct ndis_802_11_var_ie *)(pmlmeinfo->network.IEs + i);
|
||||||
|
|
||||||
switch (pIE->ElementID)
|
switch (pIE->ElementID)
|
||||||
{
|
{
|
||||||
|
@ -1627,7 +1627,7 @@ void set_sta_rate(_adapter *padapter, struct sta_info *psta)
|
||||||
/* Update RRSR and Rate for USERATE */
|
/* Update RRSR and Rate for USERATE */
|
||||||
void update_tx_basic_rate(_adapter *padapter, u8 wirelessmode)
|
void update_tx_basic_rate(_adapter *padapter, u8 wirelessmode)
|
||||||
{
|
{
|
||||||
NDIS_802_11_RATES_EX supported_rates;
|
unsigned char supported_rates[NDIS_802_11_LENGTH_RATES_EX];
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
struct wifidirect_info* pwdinfo = &padapter->wdinfo;
|
struct wifidirect_info* pwdinfo = &padapter->wdinfo;
|
||||||
|
|
||||||
|
@ -1658,15 +1658,15 @@ void update_tx_basic_rate(_adapter *padapter, u8 wirelessmode)
|
||||||
unsigned char check_assoc_AP(u8 *pframe, uint len)
|
unsigned char check_assoc_AP(u8 *pframe, uint len)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
struct ndis_802_11_var_ie * pIE;
|
||||||
u8 epigram_vendor_flag;
|
u8 epigram_vendor_flag;
|
||||||
u8 ralink_vendor_flag;
|
u8 ralink_vendor_flag;
|
||||||
epigram_vendor_flag = 0;
|
epigram_vendor_flag = 0;
|
||||||
ralink_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_ie); i < len;)
|
||||||
{
|
{
|
||||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pframe + i);
|
pIE = (struct ndis_802_11_var_ie *)(pframe + i);
|
||||||
|
|
||||||
switch (pIE->ElementID)
|
switch (pIE->ElementID)
|
||||||
{
|
{
|
||||||
|
@ -1854,15 +1854,13 @@ void update_wireless_mode(_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);
|
||||||
|
|
||||||
if ((pmlmeinfo->HT_info_enable) && (pmlmeinfo->HT_caps_enable))
|
if ((pmlmeinfo->HT_info_enable) && (pmlmeinfo->HT_caps_enable))
|
||||||
{
|
|
||||||
pmlmeinfo->HT_enable = 1;
|
pmlmeinfo->HT_enable = 1;
|
||||||
}
|
|
||||||
|
|
||||||
if (pmlmeext->cur_channel > 14)
|
if (pmlmeext->cur_channel > 14)
|
||||||
{
|
{
|
||||||
|
@ -1926,12 +1924,12 @@ void update_bmc_sta_support_rate(_adapter *padapter, u32 mac_id)
|
||||||
int update_sta_support_rate(_adapter *padapter, u8* pvar_ie, uint var_ie_len, int cam_idx)
|
int update_sta_support_rate(_adapter *padapter, u8* pvar_ie, uint var_ie_len, int cam_idx)
|
||||||
{
|
{
|
||||||
unsigned int ie_len;
|
unsigned int ie_len;
|
||||||
PNDIS_802_11_VARIABLE_IEs pIE;
|
struct ndis_802_11_var_ie * pIE;
|
||||||
int supportRateNum = 0;
|
int supportRateNum = 0;
|
||||||
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);
|
||||||
|
|
||||||
pIE = (PNDIS_802_11_VARIABLE_IEs)rtw_get_ie(pvar_ie, _SUPPORTEDRATES_IE_, &ie_len, var_ie_len);
|
pIE = (struct ndis_802_11_var_ie *)rtw_get_ie(pvar_ie, _SUPPORTEDRATES_IE_, &ie_len, var_ie_len);
|
||||||
if (pIE == NULL)
|
if (pIE == NULL)
|
||||||
{
|
{
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
|
@ -1940,7 +1938,7 @@ int update_sta_support_rate(_adapter *padapter, u8* pvar_ie, uint var_ie_len, in
|
||||||
_rtw_memcpy(pmlmeinfo->FW_sta_info[cam_idx].SupportedRates, pIE->data, ie_len);
|
_rtw_memcpy(pmlmeinfo->FW_sta_info[cam_idx].SupportedRates, pIE->data, ie_len);
|
||||||
supportRateNum = 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_var_ie *)rtw_get_ie(pvar_ie, _EXT_SUPPORTEDRATES_IE_, &ie_len, var_ie_len);
|
||||||
if (pIE)
|
if (pIE)
|
||||||
{
|
{
|
||||||
_rtw_memcpy((pmlmeinfo->FW_sta_info[cam_idx].SupportedRates + supportRateNum), pIE->data, ie_len);
|
_rtw_memcpy((pmlmeinfo->FW_sta_info[cam_idx].SupportedRates + supportRateNum), pIE->data, ie_len);
|
||||||
|
|
|
@ -357,7 +357,7 @@ u8 rtw_hal_antdiv_before_linked(_adapter *padapter)
|
||||||
return padapter->HalFunc.AntDivBeforeLinkHandler(padapter);
|
return padapter->HalFunc.AntDivBeforeLinkHandler(padapter);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
void rtw_hal_antdiv_rssi_compared(_adapter *padapter, WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src)
|
void rtw_hal_antdiv_rssi_compared(_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);
|
||||||
|
|
|
@ -304,7 +304,7 @@ static void ConstructBeacon(_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};
|
||||||
|
|
||||||
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
|
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
|
||||||
|
@ -340,8 +340,8 @@ static void ConstructBeacon(_adapter *padapter, u8 *pframe, u32 *pLength)
|
||||||
|
|
||||||
if ( (pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE)
|
if ( (pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE)
|
||||||
{
|
{
|
||||||
pktlen += cur_network->IELength - sizeof(NDIS_802_11_FIXED_IEs);
|
pktlen += cur_network->IELength - sizeof(struct ndis_802_11_fixed_ie);
|
||||||
_rtw_memcpy(pframe, cur_network->IEs+sizeof(NDIS_802_11_FIXED_IEs), pktlen);
|
_rtw_memcpy(pframe, cur_network->IEs+sizeof(struct ndis_802_11_fixed_ie), pktlen);
|
||||||
|
|
||||||
goto _ConstructBeacon;
|
goto _ConstructBeacon;
|
||||||
}
|
}
|
||||||
|
@ -493,7 +493,7 @@ static void ConstructProbeRsp(_adapter *padapter, u8 *pframe, u32 *pLength, u8 *
|
||||||
u32 pktlen;
|
u32 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);
|
||||||
|
|
||||||
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
|
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
|
||||||
|
|
||||||
|
|
|
@ -342,7 +342,7 @@ void rtl8188e_deinit_dm_priv(PADAPTER 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(PADAPTER Adapter, WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src)
|
void AntDivCompare8188E(PADAPTER Adapter, struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src)
|
||||||
{
|
{
|
||||||
struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter);
|
struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter);
|
||||||
if (0 != pHalData->AntDivCfg) {
|
if (0 != pHalData->AntDivCfg) {
|
||||||
|
|
|
@ -68,7 +68,7 @@ static void _restore_network_status(_adapter *padapter)
|
||||||
struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter);
|
struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter);
|
||||||
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));
|
||||||
unsigned short caps;
|
unsigned short caps;
|
||||||
u8 join_type;
|
u8 join_type;
|
||||||
|
|
||||||
|
|
|
@ -3057,7 +3057,7 @@ static void UpdateHalRAMask8188EUsb(PADAPTER padapter, u32 mac_id, u8 rssi_level
|
||||||
struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter);
|
struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter);
|
||||||
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 */
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -93,7 +93,7 @@ struct registry_priv
|
||||||
u8 rfintfs;
|
u8 rfintfs;
|
||||||
u8 lbkmode;
|
u8 lbkmode;
|
||||||
u8 hci;
|
u8 hci;
|
||||||
NDIS_802_11_SSID ssid;
|
struct ndis_802_11_ssid ssid;
|
||||||
u8 network_mode; //infra, ad-hoc, auto
|
u8 network_mode; //infra, ad-hoc, auto
|
||||||
u8 channel;//ad-hoc support requirement
|
u8 channel;//ad-hoc support requirement
|
||||||
u8 wireless_mode;//A, B, G, auto
|
u8 wireless_mode;//A, B, G, auto
|
||||||
|
@ -126,7 +126,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;
|
||||||
|
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
u8 ht_enable;
|
u8 ht_enable;
|
||||||
|
@ -175,8 +175,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(((Pstruct wlan_bssid_ex) 0)->field)
|
||||||
|
|
||||||
#define MAX_CONTINUAL_URB_ERR 4
|
#define MAX_CONTINUAL_URB_ERR 4
|
||||||
|
|
||||||
|
|
|
@ -204,7 +204,7 @@ struct hal_ops {
|
||||||
void (*cancel_thread)(_adapter *padapter);
|
void (*cancel_thread)(_adapter *padapter);
|
||||||
|
|
||||||
u8 (*AntDivBeforeLinkHandler)(_adapter *padapter);
|
u8 (*AntDivBeforeLinkHandler)(_adapter *padapter);
|
||||||
void (*AntDivCompareHandler)(_adapter *padapter, WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src);
|
void (*AntDivCompareHandler)(_adapter *padapter, struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src);
|
||||||
u8 (*interface_ps_func)(_adapter *padapter,HAL_INTF_PS_FUNC efunc_id, u8* val);
|
u8 (*interface_ps_func)(_adapter *padapter,HAL_INTF_PS_FUNC efunc_id, u8* val);
|
||||||
|
|
||||||
s32 (*hal_xmit)(_adapter *padapter, struct xmit_frame *pxmitframe);
|
s32 (*hal_xmit)(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||||
|
@ -417,7 +417,7 @@ void rtw_hal_set_chan(_adapter *padapter, u8 channel);
|
||||||
void rtw_hal_dm_watchdog(_adapter *padapter);
|
void rtw_hal_dm_watchdog(_adapter *padapter);
|
||||||
|
|
||||||
u8 rtw_hal_antdiv_before_linked(_adapter *padapter);
|
u8 rtw_hal_antdiv_before_linked(_adapter *padapter);
|
||||||
void rtw_hal_antdiv_rssi_compared(_adapter *padapter, WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src);
|
void rtw_hal_antdiv_rssi_compared(_adapter *padapter, struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src);
|
||||||
|
|
||||||
void rtw_hal_sreset_init(_adapter *padapter);
|
void rtw_hal_sreset_init(_adapter *padapter);
|
||||||
void rtw_hal_sreset_reset(_adapter *padapter);
|
void rtw_hal_sreset_reset(_adapter *padapter);
|
||||||
|
|
|
@ -1255,7 +1255,7 @@ u8 *rtw_get_p2p_ie(u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen);
|
||||||
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
|
||||||
|
|
||||||
uint rtw_get_rateset_len(u8 *rateset);
|
uint rtw_get_rateset_len(u8 *rateset);
|
||||||
|
|
|
@ -56,7 +56,7 @@ void rtl8188e_deinit_dm_priv(PADAPTER Adapter);
|
||||||
void rtl8188e_InitHalDm(PADAPTER Adapter);
|
void rtl8188e_InitHalDm(PADAPTER Adapter);
|
||||||
void rtl8188e_HalDmWatchDog(PADAPTER Adapter);
|
void rtl8188e_HalDmWatchDog(PADAPTER Adapter);
|
||||||
|
|
||||||
void AntDivCompare8188E(PADAPTER Adapter, WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src);
|
void AntDivCompare8188E(PADAPTER Adapter, struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src);
|
||||||
u8 AntDivBeforeLink8188E(PADAPTER Adapter );
|
u8 AntDivBeforeLink8188E(PADAPTER Adapter );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -33,8 +33,8 @@ extern void rtw_indicate_sta_disassoc_event(_adapter *padapter, struct sta_info
|
||||||
void init_mlme_ap_info(_adapter *padapter);
|
void init_mlme_ap_info(_adapter *padapter);
|
||||||
void free_mlme_ap_info(_adapter *padapter);
|
void free_mlme_ap_info(_adapter *padapter);
|
||||||
//void update_BCNTIM(_adapter *padapter);
|
//void update_BCNTIM(_adapter *padapter);
|
||||||
void rtw_add_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *data, u8 len);
|
void rtw_add_bcn_ie(_adapter *padapter, struct wlan_bssid_ex *pnetwork, u8 index, u8 *data, u8 len);
|
||||||
void rtw_remove_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index);
|
void rtw_remove_bcn_ie(_adapter *padapter, struct wlan_bssid_ex *pnetwork, u8 index);
|
||||||
void update_beacon(_adapter *padapter, u8 ie_id, u8 *oui, u8 tx);
|
void update_beacon(_adapter *padapter, u8 ie_id, u8 *oui, u8 tx);
|
||||||
void add_RATid(_adapter *padapter, struct sta_info *psta, u8 rssi_level);
|
void add_RATid(_adapter *padapter, struct sta_info *psta, u8 rssi_level);
|
||||||
void expire_timeout_chk(_adapter *padapter);
|
void expire_timeout_chk(_adapter *padapter);
|
||||||
|
|
|
@ -178,7 +178,7 @@ Command Event Mode
|
||||||
|
|
||||||
*/
|
*/
|
||||||
struct joinbss_parm {
|
struct joinbss_parm {
|
||||||
WLAN_BSSID_EX network;
|
struct wlan_bssid_ex network;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -201,7 +201,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;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -243,7 +243,7 @@ struct sitesurvey_parm {
|
||||||
/* sint bsslimit; // 1 ~ 48 */
|
/* sint bsslimit; // 1 ~ 48 */
|
||||||
u8 ssid_num;
|
u8 ssid_num;
|
||||||
u8 ch_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];
|
struct rtw_ieee80211_channel ch[RTW_CHANNEL_SCAN_AMOUNT];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -505,7 +505,7 @@ struct getrfintfs_parm {
|
||||||
|
|
||||||
struct Tx_Beacon_param
|
struct Tx_Beacon_param
|
||||||
{
|
{
|
||||||
WLAN_BSSID_EX network;
|
struct wlan_bssid_ex network;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -791,7 +791,7 @@ Result:
|
||||||
|
|
||||||
extern u8 rtw_setassocsta_cmd(_adapter *padapter, u8 *mac_addr);
|
extern u8 rtw_setassocsta_cmd(_adapter *padapter, u8 *mac_addr);
|
||||||
extern u8 rtw_setstandby_cmd(_adapter *padapter, uint action);
|
extern u8 rtw_setstandby_cmd(_adapter *padapter, uint action);
|
||||||
u8 rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num, struct rtw_ieee80211_channel *ch, int ch_num);
|
u8 rtw_sitesurvey_cmd(_adapter *padapter, struct ndis_802_11_ssid *ssid, int ssid_num, struct rtw_ieee80211_channel *ch, int ch_num);
|
||||||
extern u8 rtw_createbss_cmd(_adapter *padapter);
|
extern u8 rtw_createbss_cmd(_adapter *padapter);
|
||||||
extern u8 rtw_createbss_cmd_ex(_adapter *padapter, unsigned char *pbss, unsigned int sz);
|
extern u8 rtw_createbss_cmd_ex(_adapter *padapter, unsigned char *pbss, unsigned int sz);
|
||||||
extern u8 rtw_setphy_cmd(_adapter *padapter, u8 modem, u8 ch);
|
extern u8 rtw_setphy_cmd(_adapter *padapter, u8 modem, u8 ch);
|
||||||
|
@ -799,7 +799,7 @@ extern u8 rtw_setstakey_cmd(_adapter *padapter, u8 *psta, u8 unicast_key);
|
||||||
extern u8 rtw_clearstakey_cmd(_adapter *padapter, u8 *psta, u8 entry, u8 enqueue);
|
extern u8 rtw_clearstakey_cmd(_adapter *padapter, u8 *psta, u8 entry, u8 enqueue);
|
||||||
extern u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network* pnetwork);
|
extern u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network* pnetwork);
|
||||||
u8 rtw_disassoc_cmd(_adapter *padapter, u32 deauth_timeout_ms, bool enqueue);
|
u8 rtw_disassoc_cmd(_adapter *padapter, u32 deauth_timeout_ms, bool enqueue);
|
||||||
extern u8 rtw_setopmode_cmd(_adapter *padapter, NDIS_802_11_NETWORK_INFRASTRUCTURE networktype);
|
extern u8 rtw_setopmode_cmd(_adapter *padapter, enum ndis_802_11_network_infra networktype);
|
||||||
extern u8 rtw_setdatarate_cmd(_adapter *padapter, u8 *rateset);
|
extern u8 rtw_setdatarate_cmd(_adapter *padapter, u8 *rateset);
|
||||||
extern u8 rtw_setbasicrate_cmd(_adapter *padapter, u8 *rateset);
|
extern u8 rtw_setbasicrate_cmd(_adapter *padapter, u8 *rateset);
|
||||||
extern u8 rtw_setbbreg_cmd(_adapter * padapter, u8 offset, u8 val);
|
extern u8 rtw_setbbreg_cmd(_adapter * padapter, u8 offset, u8 val);
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
Used to report a bss has been scanned
|
Used to report a bss has been scanned
|
||||||
*/
|
*/
|
||||||
struct survey_event {
|
struct survey_event {
|
||||||
WLAN_BSSID_EX bss;
|
struct wlan_bssid_ex bss;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -116,7 +116,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];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,19 +25,19 @@
|
||||||
|
|
||||||
typedef u8 NDIS_802_11_PMKID_VALUE[16];
|
typedef u8 NDIS_802_11_PMKID_VALUE[16];
|
||||||
|
|
||||||
u8 rtw_set_802_11_add_key(_adapter * padapter, NDIS_802_11_KEY * key);
|
u8 rtw_set_802_11_add_key(_adapter * padapter, struct ndis_802_11_key * key);
|
||||||
u8 rtw_set_802_11_authentication_mode(_adapter *pdapter, NDIS_802_11_AUTHENTICATION_MODE authmode);
|
u8 rtw_set_802_11_authentication_mode(_adapter *pdapter, enum ndis_802_11_auth_mode authmode);
|
||||||
u8 rtw_set_802_11_bssid(_adapter* padapter, u8 *bssid);
|
u8 rtw_set_802_11_bssid(_adapter* padapter, u8 *bssid);
|
||||||
u8 rtw_set_802_11_add_wep(_adapter * padapter, NDIS_802_11_WEP * wep);
|
u8 rtw_set_802_11_add_wep(_adapter * padapter, struct ndis_802_11_wep * wep);
|
||||||
u8 rtw_set_802_11_disassociate(_adapter * padapter);
|
u8 rtw_set_802_11_disassociate(_adapter * padapter);
|
||||||
u8 rtw_set_802_11_bssid_list_scan(_adapter* padapter, NDIS_802_11_SSID *pssid, int ssid_max_num);
|
u8 rtw_set_802_11_bssid_list_scan(_adapter* padapter, struct ndis_802_11_ssid *pssid, int ssid_max_num);
|
||||||
u8 rtw_set_802_11_infrastructure_mode(_adapter * padapter, NDIS_802_11_NETWORK_INFRASTRUCTURE networktype);
|
u8 rtw_set_802_11_infrastructure_mode(_adapter * padapter, enum ndis_802_11_network_infra networktype);
|
||||||
u8 rtw_set_802_11_remove_wep(_adapter * padapter, u32 keyindex);
|
u8 rtw_set_802_11_remove_wep(_adapter * padapter, u32 keyindex);
|
||||||
u8 rtw_set_802_11_ssid(_adapter * padapter, NDIS_802_11_SSID * ssid);
|
u8 rtw_set_802_11_ssid(_adapter * padapter, struct ndis_802_11_ssid * ssid);
|
||||||
u8 rtw_set_802_11_remove_key(_adapter * padapter, NDIS_802_11_REMOVE_KEY * key);
|
u8 rtw_set_802_11_remove_key(_adapter * padapter, struct ndis_802_11_remove_key * key);
|
||||||
|
|
||||||
|
|
||||||
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(_adapter *adapter);
|
u16 rtw_get_cur_max_rate(_adapter *adapter);
|
||||||
int rtw_set_scan_mode(_adapter *adapter, RT_SCAN_TYPE scan_mode);
|
int rtw_set_scan_mode(_adapter *adapter, RT_SCAN_TYPE scan_mode);
|
||||||
|
|
|
@ -154,7 +154,7 @@ struct tx_invite_resp_info{
|
||||||
struct tx_provdisc_req_info{
|
struct tx_provdisc_req_info{
|
||||||
u16 wps_config_method_request; // Used when sending the provisioning request frame
|
u16 wps_config_method_request; // Used when sending the provisioning request frame
|
||||||
u16 peer_channel_num[2]; // The channel number which the receiver stands.
|
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 peerDevAddr[ ETH_ALEN ]; // Peer device address
|
||||||
u8 peerIFAddr[ ETH_ALEN ]; // Peer interface address
|
u8 peerIFAddr[ ETH_ALEN ]; // Peer interface address
|
||||||
u8 benable; // This provision discovery request frame is trigger to send or not
|
u8 benable; // This provision discovery request frame is trigger to send or not
|
||||||
|
@ -305,7 +305,7 @@ struct mlme_priv {
|
||||||
u8 *free_bss_buf;
|
u8 *free_bss_buf;
|
||||||
u32 num_of_scanned;
|
u32 num_of_scanned;
|
||||||
|
|
||||||
NDIS_802_11_SSID assoc_ssid;
|
struct ndis_802_11_ssid assoc_ssid;
|
||||||
u8 assoc_bssid[6];
|
u8 assoc_bssid[6];
|
||||||
|
|
||||||
struct wlan_network cur_network;
|
struct wlan_network cur_network;
|
||||||
|
@ -546,8 +546,8 @@ __inline static void set_scanned_network_val(struct mlme_priv *pmlmepriv, sint v
|
||||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||||
}
|
}
|
||||||
|
|
||||||
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(_adapter *adapter, WLAN_BSSID_EX *target);
|
extern void rtw_update_scanned_network(_adapter *adapter, struct wlan_bssid_ex *target);
|
||||||
extern void rtw_disconnect_hdl_under_linked(_adapter* adapter, struct sta_info *psta, u8 free_assoc);
|
extern void rtw_disconnect_hdl_under_linked(_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);
|
||||||
|
@ -615,7 +615,7 @@ void rtw_issue_addbareq_cmd(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int rtw_is_same_ibss(_adapter *adapter, struct wlan_network *pnetwork);
|
int rtw_is_same_ibss(_adapter *adapter, struct wlan_network *pnetwork);
|
||||||
int is_same_network(WLAN_BSSID_EX *src, WLAN_BSSID_EX *dst);
|
int is_same_network(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst);
|
||||||
|
|
||||||
void rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network);
|
void rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network);
|
||||||
void _rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network);
|
void _rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network);
|
||||||
|
|
|
@ -296,7 +296,7 @@ struct ss_res
|
||||||
int scan_mode;
|
int scan_mode;
|
||||||
u8 ssid_num;
|
u8 ssid_num;
|
||||||
u8 ch_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];
|
struct rtw_ieee80211_channel ch[RTW_CHANNEL_SCAN_AMOUNT];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -324,7 +324,7 @@ struct FW_Sta_Info {
|
||||||
u32 status;
|
u32 status;
|
||||||
u32 rx_pkt;
|
u32 rx_pkt;
|
||||||
u32 retry;
|
u32 retry;
|
||||||
NDIS_802_11_RATES_EX SupportedRates;
|
unsigned char SupportedRates[NDIS_802_11_LENGTH_RATES_EX];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -387,7 +387,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];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -529,12 +529,12 @@ void flush_all_cam_entry(_adapter *padapter);
|
||||||
bool IsLegal5GChannel(PADAPTER Adapter, u8 channel);
|
bool IsLegal5GChannel(PADAPTER Adapter, u8 channel);
|
||||||
|
|
||||||
void site_survey(_adapter *padapter);
|
void site_survey(_adapter *padapter);
|
||||||
u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSID_EX *bssid);
|
u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, struct wlan_bssid_ex *bssid);
|
||||||
void update_network(WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src, _adapter * padapter, bool update_ie);
|
void update_network(struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src, _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(_adapter *padapter);
|
int is_client_associated_to_ap(_adapter *padapter);
|
||||||
int is_client_associated_to_ibss(_adapter *padapter);
|
int is_client_associated_to_ibss(_adapter *padapter);
|
||||||
|
@ -542,14 +542,14 @@ int is_IBSS_empty(_adapter *padapter);
|
||||||
|
|
||||||
unsigned char check_assoc_AP(u8 *pframe, uint len);
|
unsigned char check_assoc_AP(u8 *pframe, uint len);
|
||||||
|
|
||||||
int WMM_param_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE);
|
int WMM_param_handler(_adapter *padapter, struct ndis_802_11_var_ie * pIE);
|
||||||
void WMMOnAssocRsp(_adapter *padapter);
|
void WMMOnAssocRsp(_adapter *padapter);
|
||||||
|
|
||||||
void HT_caps_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE);
|
void HT_caps_handler(_adapter *padapter, struct ndis_802_11_var_ie * pIE);
|
||||||
void HT_info_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE);
|
void HT_info_handler(_adapter *padapter, struct ndis_802_11_var_ie * pIE);
|
||||||
void HTOnAssocRsp(_adapter *padapter);
|
void HTOnAssocRsp(_adapter *padapter);
|
||||||
|
|
||||||
void ERP_IE_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE);
|
void ERP_IE_handler(_adapter *padapter, struct ndis_802_11_var_ie * pIE);
|
||||||
void VCS_update(_adapter *padapter, struct sta_info *psta);
|
void VCS_update(_adapter *padapter, struct sta_info *psta);
|
||||||
|
|
||||||
void update_beacon_info(_adapter *padapter, u8 *pframe, uint len, struct sta_info *psta);
|
void update_beacon_info(_adapter *padapter, u8 *pframe, uint len, struct sta_info *psta);
|
||||||
|
@ -606,8 +606,8 @@ void issue_probersp(_adapter *padapter, unsigned char *da, u8 is_valid_p2p_probe
|
||||||
void issue_assocreq(_adapter *padapter);
|
void issue_assocreq(_adapter *padapter);
|
||||||
void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *pstat, int pkt_type);
|
void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *pstat, int pkt_type);
|
||||||
void issue_auth(_adapter *padapter, struct sta_info *psta, unsigned short status);
|
void issue_auth(_adapter *padapter, struct sta_info *psta, unsigned short status);
|
||||||
void issue_probereq(_adapter *padapter, NDIS_802_11_SSID *pssid, u8 *da);
|
void issue_probereq(_adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da);
|
||||||
s32 issue_probereq_ex(_adapter *padapter, NDIS_802_11_SSID *pssid, u8* da, int try_cnt, int wait_ms);
|
s32 issue_probereq_ex(_adapter *padapter, struct ndis_802_11_ssid *pssid, u8* da, int try_cnt, int wait_ms);
|
||||||
int issue_nulldata(_adapter *padapter, unsigned char *da, unsigned int power_mode, int try_cnt, int wait_ms);
|
int issue_nulldata(_adapter *padapter, unsigned char *da, unsigned int power_mode, int try_cnt, int wait_ms);
|
||||||
int issue_qos_nulldata(_adapter *padapter, unsigned char *da, u16 tid, int try_cnt, int wait_ms);
|
int issue_qos_nulldata(_adapter *padapter, unsigned char *da, u16 tid, int try_cnt, int wait_ms);
|
||||||
int issue_deauth(_adapter *padapter, unsigned char *da, unsigned short reason);
|
int issue_deauth(_adapter *padapter, unsigned char *da, unsigned short reason);
|
||||||
|
|
|
@ -357,21 +357,17 @@ struct mp_priv
|
||||||
u8 txpoweridx_b;
|
u8 txpoweridx_b;
|
||||||
u8 rateidx;
|
u8 rateidx;
|
||||||
u32 preamble;
|
u32 preamble;
|
||||||
// u8 modem;
|
|
||||||
u32 CrystalCap;
|
u32 CrystalCap;
|
||||||
// u32 curr_crystalcap;
|
|
||||||
|
|
||||||
u16 antenna_tx;
|
u16 antenna_tx;
|
||||||
u16 antenna_rx;
|
u16 antenna_rx;
|
||||||
// u8 curr_rfpath;
|
|
||||||
|
|
||||||
u8 check_mp_pkt;
|
u8 check_mp_pkt;
|
||||||
|
|
||||||
u8 bSetTxPower;
|
u8 bSetTxPower;
|
||||||
// uint ForcedDataRate;
|
|
||||||
|
|
||||||
struct wlan_network mp_network;
|
struct wlan_network mp_network;
|
||||||
NDIS_802_11_MAC_ADDRESS network_macaddr;
|
unsigned char network_macaddr[ETH_ALEN];
|
||||||
|
|
||||||
u8 *pallocated_mp_xmitframe_buf;
|
u8 *pallocated_mp_xmitframe_buf;
|
||||||
u8 *pmp_xmtframe_buf;
|
u8 *pmp_xmtframe_buf;
|
||||||
|
|
|
@ -160,9 +160,9 @@ 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;
|
struct ndis_802_11_wep ndiswep;
|
||||||
u8 assoc_info[600];
|
u8 assoc_info[600];
|
||||||
u8 szofcapability[256]; //for wpa2 usage
|
u8 szofcapability[256]; //for wpa2 usage
|
||||||
u8 oidassociation[512]; //for wpa/wpa2 usage
|
u8 oidassociation[512]; //for wpa/wpa2 usage
|
||||||
|
|
|
@ -27,101 +27,74 @@
|
||||||
#define NDIS_802_11_LENGTH_RATES 8
|
#define NDIS_802_11_LENGTH_RATES 8
|
||||||
#define NDIS_802_11_LENGTH_RATES_EX 16
|
#define NDIS_802_11_LENGTH_RATES_EX 16
|
||||||
|
|
||||||
typedef unsigned char NDIS_802_11_MAC_ADDRESS[6];
|
#define NDIS_802_11_RSSI long // in dBm
|
||||||
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;
|
||||||
|
UCHAR Ssid[32];
|
||||||
|
};
|
||||||
|
|
||||||
typedef ULONG NDIS_802_11_KEY_INDEX;
|
enum NDIS_802_11_NETWORK_TYPE {
|
||||||
typedef unsigned long long NDIS_802_11_KEY_RSC;
|
Ndis802_11FH,
|
||||||
|
Ndis802_11DS,
|
||||||
|
Ndis802_11OFDM5,
|
||||||
|
Ndis802_11OFDM24,
|
||||||
|
Ndis802_11NetworkTypeMax // not a real type, defined as an upper bound
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ndis_802_11_config_fh {
|
||||||
typedef struct _NDIS_802_11_SSID
|
ULONG Length; // Length of structure
|
||||||
{
|
ULONG HopPattern; // As defined by 802.11, MSB set
|
||||||
ULONG SsidLength;
|
ULONG HopSet; // to one if non-802.11
|
||||||
UCHAR Ssid[32];
|
ULONG DwellTime; // units are Kusec
|
||||||
} 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;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
FW will only save the channel number in DSConfig.
|
FW will only save the channel number in DSConfig.
|
||||||
ODI Handler will convert the channel number to freq. number.
|
ODI Handler will convert the channel number to freq. number.
|
||||||
*/
|
*/
|
||||||
typedef struct _NDIS_802_11_CONFIGURATION
|
struct ndis_802_11_config {
|
||||||
{
|
ULONG Length; // Length of structure
|
||||||
ULONG Length; // Length of structure
|
ULONG BeaconPeriod; // units are Kusec
|
||||||
ULONG BeaconPeriod; // units are Kusec
|
ULONG ATIMWindow; // units are Kusec
|
||||||
ULONG ATIMWindow; // units are Kusec
|
ULONG DSConfig; // Frequency, units are kHz
|
||||||
ULONG DSConfig; // Frequency, units are kHz
|
struct ndis_802_11_config_fh FHConfig;
|
||||||
NDIS_802_11_CONFIGURATION_FH FHConfig;
|
};
|
||||||
} NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION;
|
|
||||||
|
|
||||||
|
enum ndis_802_11_network_infra {
|
||||||
|
|
||||||
typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE
|
|
||||||
{
|
|
||||||
Ndis802_11IBSS,
|
Ndis802_11IBSS,
|
||||||
Ndis802_11Infrastructure,
|
Ndis802_11Infrastructure,
|
||||||
Ndis802_11AutoUnknown,
|
Ndis802_11AutoUnknown,
|
||||||
Ndis802_11InfrastructureMax, // Not a real value, defined as upper bound
|
Ndis802_11InfrastructureMax, // Not a real value, defined as upper bound
|
||||||
Ndis802_11APMode
|
Ndis802_11APMode
|
||||||
} NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE;
|
};
|
||||||
|
|
||||||
|
struct ndis_802_11_fixed_ie {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _NDIS_802_11_FIXED_IEs
|
|
||||||
{
|
|
||||||
UCHAR Timestamp[8];
|
UCHAR Timestamp[8];
|
||||||
USHORT BeaconInterval;
|
USHORT BeaconInterval;
|
||||||
USHORT Capabilities;
|
USHORT Capabilities;
|
||||||
} NDIS_802_11_FIXED_IEs, *PNDIS_802_11_FIXED_IEs;
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _NDIS_802_11_VARIABLE_IEs
|
struct ndis_802_11_var_ie {
|
||||||
{
|
UCHAR ElementID;
|
||||||
UCHAR ElementID;
|
UCHAR Length;
|
||||||
UCHAR Length;
|
UCHAR data[1];
|
||||||
UCHAR data[1];
|
};
|
||||||
} NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Length is the 4 bytes multiples of the sume of
|
Length is the 4 bytes multiples of the sume of
|
||||||
sizeof (NDIS_802_11_MAC_ADDRESS) + 2 + sizeof (NDIS_802_11_SSID) + sizeof (ULONG)
|
[ETH_ALEN] + 2 + sizeof (struct 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_RSSI) + sizeof (enum NDIS_802_11_NETWORK_TYPE) + sizeof (struct ndis_802_11_config)
|
||||||
+ sizeof (NDIS_802_11_RATES_EX) + IELength
|
+ 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
|
Except the IELength, all other fields are fixed length. Therefore, we can define a macro to represent the
|
||||||
partial sum.
|
partial sum.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
typedef enum _NDIS_802_11_AUTHENTICATION_MODE
|
|
||||||
{
|
enum ndis_802_11_auth_mode {
|
||||||
Ndis802_11AuthModeOpen,
|
Ndis802_11AuthModeOpen,
|
||||||
Ndis802_11AuthModeShared,
|
Ndis802_11AuthModeShared,
|
||||||
Ndis802_11AuthModeAutoSwitch,
|
Ndis802_11AuthModeAutoSwitch,
|
||||||
|
@ -130,10 +103,9 @@ typedef enum _NDIS_802_11_AUTHENTICATION_MODE
|
||||||
Ndis802_11AuthModeWPANone,
|
Ndis802_11AuthModeWPANone,
|
||||||
Ndis802_11AuthModeWAPI,
|
Ndis802_11AuthModeWAPI,
|
||||||
Ndis802_11AuthModeMax // Not a real mode, defined as upper bound
|
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_11WEPEnabled,
|
||||||
Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
|
Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
|
||||||
Ndis802_11WEPDisabled,
|
Ndis802_11WEPDisabled,
|
||||||
|
@ -146,9 +118,8 @@ typedef enum _NDIS_802_11_WEP_STATUS
|
||||||
Ndis802_11Encryption2KeyAbsent,
|
Ndis802_11Encryption2KeyAbsent,
|
||||||
Ndis802_11Encryption3Enabled,
|
Ndis802_11Encryption3Enabled,
|
||||||
Ndis802_11Encryption3KeyAbsent,
|
Ndis802_11Encryption3KeyAbsent,
|
||||||
Ndis802_11_EncrypteionWAPI
|
Ndis802_11_EncryptionWAPI
|
||||||
} 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
|
#define NDIS_802_11_AI_REQFI_CAPABILITIES 1
|
||||||
|
@ -159,84 +130,74 @@ typedef enum _NDIS_802_11_WEP_STATUS
|
||||||
#define NDIS_802_11_AI_RESFI_STATUSCODE 2
|
#define NDIS_802_11_AI_RESFI_STATUSCODE 2
|
||||||
#define NDIS_802_11_AI_RESFI_ASSOCIATIONID 4
|
#define NDIS_802_11_AI_RESFI_ASSOCIATIONID 4
|
||||||
|
|
||||||
typedef struct _NDIS_802_11_AI_REQFI
|
struct ndis_802_11_ai_reqfi {
|
||||||
{
|
|
||||||
USHORT Capabilities;
|
USHORT Capabilities;
|
||||||
USHORT ListenInterval;
|
USHORT ListenInterval;
|
||||||
NDIS_802_11_MAC_ADDRESS CurrentAPAddress;
|
unsigned char CurrentAPAddress[ETH_ALEN];
|
||||||
} NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI;
|
};
|
||||||
|
|
||||||
typedef struct _NDIS_802_11_AI_RESFI
|
struct ndis_802_11_ai_resfi {
|
||||||
{
|
|
||||||
USHORT Capabilities;
|
USHORT Capabilities;
|
||||||
USHORT StatusCode;
|
USHORT StatusCode;
|
||||||
USHORT AssociationId;
|
USHORT AssociationId;
|
||||||
} NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI;
|
};
|
||||||
|
|
||||||
typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION
|
struct ndis_802_11_assoc_info {
|
||||||
{
|
|
||||||
ULONG Length;
|
ULONG Length;
|
||||||
USHORT AvailableRequestFixedIEs;
|
USHORT AvailableRequestFixedIEs;
|
||||||
NDIS_802_11_AI_REQFI RequestFixedIEs;
|
struct ndis_802_11_ai_reqfi RequestFixedIEs;
|
||||||
ULONG RequestIELength;
|
ULONG RequestIELength;
|
||||||
ULONG OffsetRequestIEs;
|
ULONG OffsetRequestIEs;
|
||||||
USHORT AvailableResponseFixedIEs;
|
USHORT AvailableResponseFixedIEs;
|
||||||
NDIS_802_11_AI_RESFI ResponseFixedIEs;
|
struct ndis_802_11_ai_resfi ResponseFixedIEs;
|
||||||
ULONG ResponseIELength;
|
ULONG ResponseIELength;
|
||||||
ULONG OffsetResponseIEs;
|
ULONG OffsetResponseIEs;
|
||||||
} NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION;
|
};
|
||||||
|
|
||||||
typedef enum _NDIS_802_11_RELOAD_DEFAULTS
|
enum ndis_802_11_reload_def {
|
||||||
{
|
Ndis802_11ReloadWEPKeys
|
||||||
Ndis802_11ReloadWEPKeys
|
};
|
||||||
} NDIS_802_11_RELOAD_DEFAULTS, *PNDIS_802_11_RELOAD_DEFAULTS;
|
|
||||||
|
|
||||||
|
|
||||||
// Key mapping keys require a BSSID
|
// Key mapping keys require a BSSID
|
||||||
typedef struct _NDIS_802_11_KEY
|
struct ndis_802_11_key {
|
||||||
{
|
ULONG Length; // Length of this structure
|
||||||
ULONG Length; // Length of this structure
|
ULONG KeyIndex;
|
||||||
ULONG KeyIndex;
|
ULONG KeyLength; // length of key in bytes
|
||||||
ULONG KeyLength; // length of key in bytes
|
unsigned char BSSID[ETH_ALEN];
|
||||||
NDIS_802_11_MAC_ADDRESS BSSID;
|
unsigned long long KeyRSC;
|
||||||
NDIS_802_11_KEY_RSC KeyRSC;
|
UCHAR KeyMaterial[32]; // variable length depending on above field
|
||||||
UCHAR 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 Length; // Length of this structure
|
ULONG KeyIndex;
|
||||||
ULONG KeyIndex;
|
unsigned char BSSID[ETH_ALEN];
|
||||||
NDIS_802_11_MAC_ADDRESS BSSID;
|
};
|
||||||
} NDIS_802_11_REMOVE_KEY, *PNDIS_802_11_REMOVE_KEY;
|
|
||||||
|
|
||||||
typedef struct _NDIS_802_11_WEP
|
struct ndis_802_11_wep {
|
||||||
{
|
ULONG Length; // Length of this structure
|
||||||
ULONG Length; // Length of this structure
|
ULONG KeyIndex; // 0 is the per-client key, 1-N are the global keys
|
||||||
ULONG KeyIndex; // 0 is the per-client key, 1-N are the global keys
|
ULONG KeyLength; // length of key in bytes
|
||||||
ULONG KeyLength; // length of key in bytes
|
UCHAR KeyMaterial[16];// variable length depending on above field
|
||||||
UCHAR 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_auth_req {
|
||||||
{
|
|
||||||
ULONG Length; // Length of structure
|
ULONG Length; // Length of structure
|
||||||
NDIS_802_11_MAC_ADDRESS Bssid;
|
unsigned char Bssid[ETH_ALEN];
|
||||||
ULONG Flags;
|
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_Authentication,
|
||||||
Ndis802_11StatusType_MediaStreamMode,
|
Ndis802_11StatusType_MediaStreamMode,
|
||||||
Ndis802_11StatusType_PMKID_CandidateList,
|
Ndis802_11StatusType_PMKID_CandidateList,
|
||||||
Ndis802_11StatusTypeMax // not a real type, defined as an upper bound
|
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
|
struct ndis_802_11_status_ind {
|
||||||
{
|
enum ndis_802_11_status_type StatusType;
|
||||||
NDIS_802_11_STATUS_TYPE StatusType;
|
};
|
||||||
} NDIS_802_11_STATUS_INDICATION, *PNDIS_802_11_STATUS_INDICATION;
|
|
||||||
|
|
||||||
// mask for authentication/integrity fields
|
// mask for authentication/integrity fields
|
||||||
#define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f
|
#define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f
|
||||||
|
@ -248,38 +209,34 @@ typedef struct _NDIS_802_11_STATUS_INDICATION
|
||||||
// MIC check time, 60 seconds.
|
// MIC check time, 60 seconds.
|
||||||
#define MIC_CHECK_TIME 60000000
|
#define MIC_CHECK_TIME 60000000
|
||||||
|
|
||||||
typedef struct _NDIS_802_11_AUTHENTICATION_EVENT
|
struct ndis_802_11_auth_evt {
|
||||||
{
|
struct ndis_802_11_status_ind Status;
|
||||||
NDIS_802_11_STATUS_INDICATION Status;
|
struct ndis_802_11_auth_req Request[1];
|
||||||
NDIS_802_11_AUTHENTICATION_REQUEST Request[1];
|
};
|
||||||
} NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT;
|
|
||||||
|
|
||||||
typedef struct _NDIS_802_11_TEST
|
struct ndis_802_11_test {
|
||||||
{
|
|
||||||
ULONG Length;
|
ULONG Length;
|
||||||
ULONG Type;
|
ULONG Type;
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
NDIS_802_11_AUTHENTICATION_EVENT AuthenticationEvent;
|
struct ndis_802_11_auth_evt AuthenticationEvent;
|
||||||
NDIS_802_11_RSSI RssiTrigger;
|
NDIS_802_11_RSSI RssiTrigger;
|
||||||
}tt;
|
}tt;
|
||||||
} NDIS_802_11_TEST, *PNDIS_802_11_TEST;
|
};
|
||||||
|
|
||||||
|
|
||||||
#ifndef Ndis802_11APMode
|
#ifndef Ndis802_11APMode
|
||||||
#define Ndis802_11APMode (Ndis802_11InfrastructureMax+1)
|
#define Ndis802_11APMode (Ndis802_11InfrastructureMax+1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct _WLAN_PHY_INFO
|
struct wlan_phy_info {
|
||||||
{
|
|
||||||
u8 SignalStrength;//(in percentage)
|
u8 SignalStrength;//(in percentage)
|
||||||
u8 SignalQuality;//(in percentage)
|
u8 SignalQuality;//(in percentage)
|
||||||
u8 Optimum_antenna; //for Antenna diversity
|
u8 Optimum_antenna; //for Antenna diversity
|
||||||
u8 Reserved_0;
|
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
|
/* these infor get from rtw_get_encrypt_info when
|
||||||
* * translate scan to UI */
|
* * translate scan to UI */
|
||||||
u8 encryp_protocol;//ENCRYP_PROTOCOL_E: OPEN/WEP/WPA/WPA2/WAPI
|
u8 encryp_protocol;//ENCRYP_PROTOCOL_E: OPEN/WEP/WPA/WPA2/WAPI
|
||||||
|
@ -290,32 +247,30 @@ typedef struct _WLAN_BCN_INFO
|
||||||
/* bwmode 20/40 and ch_offset UP/LOW */
|
/* bwmode 20/40 and ch_offset UP/LOW */
|
||||||
unsigned short ht_cap_info;
|
unsigned short ht_cap_info;
|
||||||
unsigned char ht_info_infos_0;
|
unsigned char ht_info_infos_0;
|
||||||
}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_struct wlan_bssid_ex_sz()
|
||||||
*/
|
*/
|
||||||
typedef struct _WLAN_BSSID_EX
|
struct wlan_bssid_ex {
|
||||||
{
|
ULONG Length;
|
||||||
ULONG Length;
|
unsigned char MacAddress[ETH_ALEN];
|
||||||
NDIS_802_11_MAC_ADDRESS MacAddress;
|
UCHAR Reserved[2];//[0]: IS beacon frame
|
||||||
UCHAR Reserved[2];//[0]: IS beacon frame
|
struct ndis_802_11_ssid Ssid;
|
||||||
NDIS_802_11_SSID Ssid;
|
ULONG Privacy;
|
||||||
ULONG Privacy;
|
NDIS_802_11_RSSI Rssi;//(in dBM,raw data ,get from PHY)
|
||||||
NDIS_802_11_RSSI Rssi;//(in dBM,raw data ,get from PHY)
|
enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
|
||||||
NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
|
struct ndis_802_11_config Configuration;
|
||||||
NDIS_802_11_CONFIGURATION Configuration;
|
enum ndis_802_11_network_infra InfrastructureMode;
|
||||||
NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
|
unsigned char SupportedRates[NDIS_802_11_LENGTH_RATES_EX];
|
||||||
NDIS_802_11_RATES_EX SupportedRates;
|
struct wlan_phy_info PhyInfo;
|
||||||
WLAN_PHY_INFO PhyInfo;
|
ULONG IELength;
|
||||||
ULONG IELength;
|
UCHAR IEs[MAX_IE_SZ]; //(timestamp, beacon interval, and capability information)
|
||||||
UCHAR 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)
|
static inline 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,34 +280,30 @@ 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;
|
struct wlan_bcn_info BcnInfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum VRTL_CARRIER_SENSE
|
enum VRTL_CARRIER_SENSE
|
||||||
{
|
{
|
||||||
DISABLE_VCS,
|
DISABLE_VCS,
|
||||||
ENABLE_VCS,
|
ENABLE_VCS,
|
||||||
AUTO_VCS
|
AUTO_VCS
|
||||||
};
|
};
|
||||||
|
|
||||||
enum VCS_TYPE
|
enum VCS_TYPE
|
||||||
{
|
{
|
||||||
NONE_VCS,
|
NONE_VCS,
|
||||||
RTS_CTS,
|
RTS_CTS,
|
||||||
CTS_TO_SELF
|
CTS_TO_SELF
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define PWR_CAM 0
|
#define PWR_CAM 0
|
||||||
#define PWR_MINPS 1
|
#define PWR_MINPS 1
|
||||||
#define PWR_MAXPS 2
|
#define PWR_MAXPS 2
|
||||||
#define PWR_UAPSD 3
|
#define PWR_UAPSD 3
|
||||||
#define PWR_VOIP 4
|
#define PWR_VOIP 4
|
||||||
|
|
||||||
|
|
||||||
enum UAPSD_MAX_SP
|
enum UAPSD_MAX_SP
|
||||||
{
|
{
|
||||||
NO_LIMIT,
|
NO_LIMIT,
|
||||||
|
@ -361,8 +312,6 @@ enum UAPSD_MAX_SP
|
||||||
SIX_MSDU
|
SIX_MSDU
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//john
|
|
||||||
#define NUM_PRE_AUTH_KEY 16
|
#define NUM_PRE_AUTH_KEY 16
|
||||||
#define NUM_PMKID_CACHE NUM_PRE_AUTH_KEY
|
#define NUM_PMKID_CACHE NUM_PRE_AUTH_KEY
|
||||||
|
|
||||||
|
@ -370,35 +319,29 @@ enum UAPSD_MAX_SP
|
||||||
* WPA2
|
* WPA2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct _PMKID_CANDIDATE {
|
struct pmkid_candidate {
|
||||||
NDIS_802_11_MAC_ADDRESS BSSID;
|
unsigned char BSSID[ETH_ALEN];
|
||||||
ULONG Flags;
|
ULONG Flags;
|
||||||
} PMKID_CANDIDATE, *PPMKID_CANDIDATE;
|
};
|
||||||
|
|
||||||
typedef struct _NDIS_802_11_PMKID_CANDIDATE_LIST
|
struct ndis_802_11_pmkid_list {
|
||||||
{
|
ULONG Version; // Version of the structure
|
||||||
ULONG Version; // Version of the structure
|
ULONG NumCandidates; // No. of pmkid candidates
|
||||||
ULONG NumCandidates; // No. of pmkid candidates
|
struct pmkid_candidate CandidateList[1];
|
||||||
PMKID_CANDIDATE CandidateList[1];
|
};
|
||||||
} NDIS_802_11_PMKID_CANDIDATE_LIST, *PNDIS_802_11_PMKID_CANDIDATE_LIST;
|
|
||||||
|
|
||||||
|
struct ndis_802_11_auth_encrypt {
|
||||||
|
enum ndis_802_11_auth_mode AuthModeSupported;
|
||||||
|
enum ndis_802_11_wep_status EncryptStatusSupported;
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct _NDIS_802_11_AUTHENTICATION_ENCRYPTION
|
struct ndis_802_11_cap {
|
||||||
{
|
|
||||||
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 Length;
|
||||||
ULONG Version;
|
ULONG Version;
|
||||||
ULONG NoOfPMKIDs;
|
ULONG NoOfPMKIDs;
|
||||||
ULONG NoOfAuthEncryptPairsSupported;
|
ULONG NoOfAuthEncryptPairsSupported;
|
||||||
NDIS_802_11_AUTHENTICATION_ENCRYPTION AuthenticationEncryptionSupported[1];
|
struct ndis_802_11_auth_encrypt AuthenticationEncryptionSupported[1];
|
||||||
|
};
|
||||||
} NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY;
|
|
||||||
|
|
||||||
u8 key_2char2num(u8 hch, u8 lch);
|
u8 key_2char2num(u8 hch, u8 lch);
|
||||||
u8 key_char2num(u8 ch);
|
u8 key_char2num(u8 ch);
|
||||||
|
|
|
@ -600,7 +600,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
u32 wep_key_idx, wep_key_len,wep_total_len;
|
u32 wep_key_idx, wep_key_len,wep_total_len;
|
||||||
NDIS_802_11_WEP *pwep = NULL;
|
struct ndis_802_11_wep *pwep = NULL;
|
||||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||||
|
@ -656,8 +656,8 @@ _func_enter_;
|
||||||
if (wep_key_len > 0)
|
if (wep_key_len > 0)
|
||||||
{
|
{
|
||||||
wep_key_len = wep_key_len <= 5 ? 5 : 13;
|
wep_key_len = wep_key_len <= 5 ? 5 : 13;
|
||||||
wep_total_len = wep_key_len + FIELD_OFFSET(NDIS_802_11_WEP, KeyMaterial);
|
wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial);
|
||||||
pwep =(NDIS_802_11_WEP *) rtw_malloc(wep_total_len);
|
pwep =(struct ndis_802_11_wep *) rtw_malloc(wep_total_len);
|
||||||
if (pwep == NULL){
|
if (pwep == NULL){
|
||||||
RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_err_,(" wpa_set_encryption: pwep allocate fail !!!\n"));
|
RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_err_,(" wpa_set_encryption: pwep allocate fail !!!\n"));
|
||||||
goto exit;
|
goto exit;
|
||||||
|
@ -958,6 +958,8 @@ exit:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef unsigned char NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX];
|
||||||
|
|
||||||
static int rtw_wx_get_name(struct net_device *dev,
|
static int rtw_wx_get_name(struct net_device *dev,
|
||||||
struct iw_request_info *info,
|
struct iw_request_info *info,
|
||||||
union iwreq_data *wrqu, char *extra)
|
union iwreq_data *wrqu, char *extra)
|
||||||
|
@ -968,60 +970,45 @@ 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));
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE) == true)
|
if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE) == true) {
|
||||||
{
|
|
||||||
//parsing HT_CAP_IE
|
//parsing HT_CAP_IE
|
||||||
p = rtw_get_ie(&pcur_bss->IEs[12], _HT_CAPABILITY_IE_, &ht_ielen, pcur_bss->IELength-12);
|
p = rtw_get_ie(&pcur_bss->IEs[12], _HT_CAPABILITY_IE_, &ht_ielen, pcur_bss->IELength-12);
|
||||||
if (p && ht_ielen>0)
|
if (p && ht_ielen>0)
|
||||||
{
|
|
||||||
ht_cap = true;
|
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) == true) {
|
||||||
{
|
|
||||||
if (ht_cap == true)
|
if (ht_cap == true)
|
||||||
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11bn");
|
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11bn");
|
||||||
else
|
else
|
||||||
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11b");
|
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11b");
|
||||||
}
|
} else if ((rtw_is_cckrates_included((u8*)prates)) == true) {
|
||||||
else if ((rtw_is_cckrates_included((u8*)prates)) == true)
|
|
||||||
{
|
|
||||||
if (ht_cap == true)
|
if (ht_cap == true)
|
||||||
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11bgn");
|
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11bgn");
|
||||||
else
|
else
|
||||||
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11bg");
|
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11bg");
|
||||||
}
|
} else {
|
||||||
else
|
if (pcur_bss->Configuration.DSConfig > 14) {
|
||||||
{
|
|
||||||
if (pcur_bss->Configuration.DSConfig > 14)
|
|
||||||
{
|
|
||||||
if (ht_cap == true)
|
if (ht_cap == true)
|
||||||
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11an");
|
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11an");
|
||||||
else
|
else
|
||||||
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11a");
|
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11a");
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
if (ht_cap == true)
|
if (ht_cap == true)
|
||||||
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11gn");
|
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11gn");
|
||||||
else
|
else
|
||||||
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11g");
|
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11g");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
//prates = &padapter->registrypriv.dev_network.SupportedRates;
|
|
||||||
//snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11g");
|
|
||||||
snprintf(wrqu->name, IFNAMSIZ, "unassociated");
|
snprintf(wrqu->name, IFNAMSIZ, "unassociated");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1049,7 +1036,7 @@ static int rtw_wx_get_freq(struct net_device *dev,
|
||||||
{
|
{
|
||||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
_adapter *padapter = (_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)
|
||||||
{
|
{
|
||||||
|
@ -1072,7 +1059,7 @@ static int rtw_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
|
||||||
union iwreq_data *wrqu, char *b)
|
union iwreq_data *wrqu, char *b)
|
||||||
{
|
{
|
||||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||||
NDIS_802_11_NETWORK_INFRASTRUCTURE networkType ;
|
enum ndis_802_11_network_infra networkType ;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -1425,7 +1412,7 @@ static int rtw_wx_set_wap(struct net_device *dev,
|
||||||
u8 *dst_bssid, *src_bssid;
|
u8 *dst_bssid, *src_bssid;
|
||||||
_queue *queue = &(pmlmepriv->scanned_queue);
|
_queue *queue = &(pmlmepriv->scanned_queue);
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
NDIS_802_11_AUTHENTICATION_MODE authmode;
|
enum ndis_802_11_auth_mode authmode;
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
|
@ -1499,7 +1486,7 @@ static int rtw_wx_get_wap(struct net_device *dev,
|
||||||
|
|
||||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
_adapter *padapter = (_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;
|
||||||
|
|
||||||
|
@ -1568,7 +1555,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||||
struct mlme_priv *pmlmepriv= &padapter->mlmepriv;
|
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;
|
_irqL irqL;
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
|
struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
|
||||||
|
@ -1653,7 +1640,7 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_P2P
|
#endif //CONFIG_P2P
|
||||||
|
|
||||||
_rtw_memset(ssid, 0, sizeof(NDIS_802_11_SSID)*RTW_SSID_SCAN_AMOUNT);
|
_rtw_memset(ssid, 0, sizeof(struct ndis_802_11_ssid)*RTW_SSID_SCAN_AMOUNT);
|
||||||
|
|
||||||
#if WIRELESS_EXT >= 17
|
#if WIRELESS_EXT >= 17
|
||||||
if (wrqu->data.length == sizeof(struct iw_scan_req))
|
if (wrqu->data.length == sizeof(struct iw_scan_req))
|
||||||
|
@ -1876,8 +1863,8 @@ static int rtw_wx_set_essid(struct net_device *dev,
|
||||||
_list *phead;
|
_list *phead;
|
||||||
s8 status = true;
|
s8 status = true;
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
NDIS_802_11_AUTHENTICATION_MODE authmode;
|
enum ndis_802_11_auth_mode authmode;
|
||||||
NDIS_802_11_SSID ndis_ssid;
|
struct ndis_802_11_ssid ndis_ssid;
|
||||||
u8 *dst_ssid, *src_ssid;
|
u8 *dst_ssid, *src_ssid;
|
||||||
|
|
||||||
uint ret = 0, len;
|
uint ret = 0, len;
|
||||||
|
@ -1932,7 +1919,7 @@ static int rtw_wx_set_essid(struct net_device *dev,
|
||||||
if (wrqu->essid.length != 33)
|
if (wrqu->essid.length != 33)
|
||||||
DBG_88E("ssid=%s, len=%d\n", extra, wrqu->essid.length);
|
DBG_88E("ssid=%s, len=%d\n", extra, wrqu->essid.length);
|
||||||
|
|
||||||
_rtw_memset(&ndis_ssid, 0, sizeof(NDIS_802_11_SSID));
|
_rtw_memset(&ndis_ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||||
ndis_ssid.SsidLength = len;
|
ndis_ssid.SsidLength = len;
|
||||||
_rtw_memcpy(ndis_ssid.Ssid, extra, len);
|
_rtw_memcpy(ndis_ssid.Ssid, extra, len);
|
||||||
src_ssid = ndis_ssid.Ssid;
|
src_ssid = ndis_ssid.Ssid;
|
||||||
|
@ -2009,7 +1996,7 @@ static int rtw_wx_get_essid(struct net_device *dev,
|
||||||
u32 len,ret = 0;
|
u32 len,ret = 0;
|
||||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
_adapter *padapter = (_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"));
|
||||||
|
|
||||||
|
@ -2260,15 +2247,15 @@ static int rtw_wx_set_enc(struct net_device *dev,
|
||||||
{
|
{
|
||||||
u32 key, ret = 0;
|
u32 key, ret = 0;
|
||||||
u32 keyindex_provided;
|
u32 keyindex_provided;
|
||||||
NDIS_802_11_WEP wep;
|
struct ndis_802_11_wep wep;
|
||||||
NDIS_802_11_AUTHENTICATION_MODE authmode;
|
enum ndis_802_11_auth_mode authmode;
|
||||||
|
|
||||||
struct iw_point *erq = &(wrqu->encoding);
|
struct iw_point *erq = &(wrqu->encoding);
|
||||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||||
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
|
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
|
||||||
DBG_88E("+rtw_wx_set_enc, flags=0x%x\n", erq->flags);
|
DBG_88E("+rtw_wx_set_enc, flags=0x%x\n", erq->flags);
|
||||||
|
|
||||||
_rtw_memset(&wep, 0, sizeof(NDIS_802_11_WEP));
|
_rtw_memset(&wep, 0, sizeof(struct ndis_802_11_wep));
|
||||||
|
|
||||||
key = erq->flags & IW_ENCODE_INDEX;
|
key = erq->flags & IW_ENCODE_INDEX;
|
||||||
|
|
||||||
|
@ -2338,7 +2325,7 @@ static int rtw_wx_set_enc(struct net_device *dev,
|
||||||
{
|
{
|
||||||
wep.KeyLength = erq->length <= 5 ? 5 : 13;
|
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
|
else
|
||||||
{
|
{
|
||||||
|
@ -4567,7 +4554,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.
|
// Reset the content of struct tx_provdisc_req_info excluded the wps_config_method_request.
|
||||||
_rtw_memset(pwdinfo->tx_prov_disc_info.peerDevAddr, 0x00, ETH_ALEN);
|
_rtw_memset(pwdinfo->tx_prov_disc_info.peerDevAddr, 0x00, ETH_ALEN);
|
||||||
_rtw_memset(pwdinfo->tx_prov_disc_info.peerIFAddr, 0x00, ETH_ALEN);
|
_rtw_memset(pwdinfo->tx_prov_disc_info.peerIFAddr, 0x00, ETH_ALEN);
|
||||||
_rtw_memset(&pwdinfo->tx_prov_disc_info.ssid, 0x00, sizeof(NDIS_802_11_SSID));
|
_rtw_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[ 0 ] = 0;
|
||||||
pwdinfo->tx_prov_disc_info.peer_channel_num[ 1 ] = 0;
|
pwdinfo->tx_prov_disc_info.peer_channel_num[ 1 ] = 0;
|
||||||
pwdinfo->tx_prov_disc_info.benable = false;
|
pwdinfo->tx_prov_disc_info.benable = false;
|
||||||
|
@ -4670,7 +4657,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
|
||||||
|
|
||||||
if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_CLIENT))
|
if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_CLIENT))
|
||||||
{
|
{
|
||||||
_rtw_memcpy(&pwdinfo->tx_prov_disc_info.ssid, &pnetwork->network.Ssid, sizeof(NDIS_802_11_SSID));
|
_rtw_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))
|
else if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_DEVICE) || rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO))
|
||||||
{
|
{
|
||||||
|
@ -6004,7 +5991,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param,
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
u32 wep_key_idx, wep_key_len,wep_total_len;
|
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 sta_info *psta = NULL, *pbcmc_sta = NULL;
|
||||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
|
@ -6074,8 +6061,8 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param,
|
||||||
if (wep_key_len > 0)
|
if (wep_key_len > 0)
|
||||||
{
|
{
|
||||||
wep_key_len = wep_key_len <= 5 ? 5 : 13;
|
wep_key_len = wep_key_len <= 5 ? 5 : 13;
|
||||||
wep_total_len = wep_key_len + FIELD_OFFSET(NDIS_802_11_WEP, KeyMaterial);
|
wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial);
|
||||||
pwep =(NDIS_802_11_WEP *)rtw_malloc(wep_total_len);
|
pwep =(struct ndis_802_11_wep *)rtw_malloc(wep_total_len);
|
||||||
if (pwep == NULL){
|
if (pwep == NULL){
|
||||||
DBG_88E(" r871x_set_encryption: pwep allocate fail !!!\n");
|
DBG_88E(" r871x_set_encryption: pwep allocate fail !!!\n");
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
Loading…
Reference in a new issue