mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-10 07:29:40 +00:00
rtl8188eu: Add spaces after comma, etc.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
9ee6ae40c3
commit
83488f50f7
21 changed files with 2285 additions and 2285 deletions
160
core/rtw_ap.c
160
core/rtw_ap.c
|
@ -54,7 +54,7 @@ void init_mlme_ap_info(struct adapter *padapter)
|
|||
void free_mlme_ap_info(struct adapter *padapter)
|
||||
{
|
||||
unsigned long irqL;
|
||||
struct sta_info *psta=NULL;
|
||||
struct sta_info *psta =NULL;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
|
@ -93,7 +93,7 @@ static void update_BCNTIM(struct adapter *padapter)
|
|||
/* if (pstapriv->tim_bitmap) */
|
||||
if (true)
|
||||
{
|
||||
u8 *p, *dst_ie, *premainder_ie=NULL, *pbackup_remainder_ie=NULL;
|
||||
u8 *p, *dst_ie, *premainder_ie =NULL, *pbackup_remainder_ie =NULL;
|
||||
__le16 tim_bitmap_le;
|
||||
uint offset, tmp_len, tim_ielen, tim_ie_offset, remainder_ielen;
|
||||
|
||||
|
@ -132,7 +132,7 @@ static void update_BCNTIM(struct adapter *padapter)
|
|||
offset += tmp_len+2;
|
||||
}
|
||||
|
||||
/* DS Parameter Set IE, len=3 */
|
||||
/* DS Parameter Set IE, len =3 */
|
||||
offset += 3;
|
||||
|
||||
premainder_ie = pie + offset;
|
||||
|
@ -169,11 +169,11 @@ static void update_BCNTIM(struct adapter *padapter)
|
|||
else
|
||||
*dst_ie++ = 0;
|
||||
|
||||
if (tim_ielen==4)
|
||||
if (tim_ielen ==4)
|
||||
{
|
||||
*dst_ie++ = *(u8*)&tim_bitmap_le;
|
||||
}
|
||||
else if (tim_ielen==5)
|
||||
else if (tim_ielen ==5)
|
||||
{
|
||||
memcpy(dst_ie, &tim_bitmap_le, 2);
|
||||
dst_ie+=2;
|
||||
|
@ -200,7 +200,7 @@ void rtw_add_bcn_ie(struct adapter *padapter, struct wlan_bssid_ex *pnetwork, u8
|
|||
struct ndis_802_11_variable_ies * pIE;
|
||||
u8 bmatch = false;
|
||||
u8 *pie = pnetwork->IEs;
|
||||
u8 *p, *dst_ie, *premainder_ie=NULL, *pbackup_remainder_ie=NULL;
|
||||
u8 *p, *dst_ie, *premainder_ie =NULL, *pbackup_remainder_ie =NULL;
|
||||
u32 i, offset, ielen, ie_offset, remainder_ielen = 0;
|
||||
|
||||
for (i = sizeof(struct ndis_802_11_fixed_ies); i < pnetwork->IELength;)
|
||||
|
@ -267,7 +267,7 @@ void rtw_add_bcn_ie(struct adapter *padapter, struct wlan_bssid_ex *pnetwork, u8
|
|||
|
||||
void rtw_remove_bcn_ie(struct adapter *padapter, struct wlan_bssid_ex *pnetwork, u8 index)
|
||||
{
|
||||
u8 *p, *dst_ie, *premainder_ie=NULL, *pbackup_remainder_ie=NULL;
|
||||
u8 *p, *dst_ie, *premainder_ie =NULL, *pbackup_remainder_ie =NULL;
|
||||
uint offset, ielen, ie_offset, remainder_ielen = 0;
|
||||
u8 *pie = pnetwork->IEs;
|
||||
|
||||
|
@ -329,7 +329,7 @@ void expire_timeout_chk(struct adapter *padapter)
|
|||
unsigned long irqL;
|
||||
struct list_head *phead, *plist;
|
||||
u8 updated;
|
||||
struct sta_info *psta=NULL;
|
||||
struct sta_info *psta =NULL;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
u8 chk_alive_num = 0;
|
||||
char chk_alive_list[NUM_STA];
|
||||
|
@ -355,7 +355,7 @@ void expire_timeout_chk(struct adapter *padapter)
|
|||
pstapriv->auth_list_cnt--;
|
||||
|
||||
DBG_871X("auth expire %02X%02X%02X%02X%02X%02X\n",
|
||||
psta->hwaddr[0],psta->hwaddr[1],psta->hwaddr[2],psta->hwaddr[3],psta->hwaddr[4],psta->hwaddr[5]);
|
||||
psta->hwaddr[0], psta->hwaddr[1], psta->hwaddr[2], psta->hwaddr[3], psta->hwaddr[4], psta->hwaddr[5]);
|
||||
|
||||
spin_unlock_bh(&pstapriv->auth_list_lock);
|
||||
|
||||
|
@ -432,7 +432,7 @@ void expire_timeout_chk(struct adapter *padapter)
|
|||
rtw_list_delete(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
|
||||
DBG_871X("asoc expire "MAC_FMT", state=0x%x\n", MAC_ARG(psta->hwaddr), psta->state);
|
||||
DBG_871X("asoc expire "MAC_FMT", state =0x%x\n", MAC_ARG(psta->hwaddr), psta->state);
|
||||
updated = ap_free_sta(padapter, psta, false, WLAN_REASON_DEAUTH_LEAVING);
|
||||
}
|
||||
else
|
||||
|
@ -452,7 +452,7 @@ void expire_timeout_chk(struct adapter *padapter)
|
|||
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
||||
|
||||
if (chk_alive_num) {
|
||||
u8 backup_oper_channel=0;
|
||||
u8 backup_oper_channel =0;
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
/* switch to correct channel of current network before issue keep-alive frames */
|
||||
if (rtw_get_oper_ch(padapter) != pmlmeext->cur_channel) {
|
||||
|
@ -483,16 +483,16 @@ void expire_timeout_chk(struct adapter *padapter)
|
|||
}
|
||||
else if (psta->keep_alive_trycnt <= 3)
|
||||
{
|
||||
DBG_871X("ack check for asoc expire, keep_alive_trycnt=%d\n", psta->keep_alive_trycnt);
|
||||
DBG_871X("ack check for asoc expire, keep_alive_trycnt =%d\n", psta->keep_alive_trycnt);
|
||||
psta->expire_to = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
psta->keep_alive_trycnt = 0;
|
||||
|
||||
DBG_871X("asoc expire "MAC_FMT", state=0x%x\n", MAC_ARG(psta->hwaddr), psta->state);
|
||||
DBG_871X("asoc expire "MAC_FMT", state =0x%x\n", MAC_ARG(psta->hwaddr), psta->state);
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
if (rtw_is_list_empty(&psta->asoc_list)==false) {
|
||||
if (rtw_is_list_empty(&psta->asoc_list) ==false) {
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
updated = ap_free_sta(padapter, psta, false, WLAN_REASON_DEAUTH_LEAVING);
|
||||
|
@ -511,10 +511,10 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
|
|||
{
|
||||
int i;
|
||||
u8 rf_type;
|
||||
u32 init_rate=0;
|
||||
u32 init_rate =0;
|
||||
unsigned char sta_band = 0, raid, shortGIrate = false;
|
||||
unsigned char limit;
|
||||
unsigned int tx_ra_bitmap=0;
|
||||
unsigned int tx_ra_bitmap =0;
|
||||
struct ht_priv *psta_ht = NULL;
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
struct wlan_bssid_ex *pcur_network = (struct wlan_bssid_ex *)&pmlmepriv->cur_network.network;
|
||||
|
@ -528,7 +528,7 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
|
|||
return;
|
||||
|
||||
/* b/g mode ra_bitmap */
|
||||
for (i=0; i<sizeof(psta->bssrateset); i++)
|
||||
for (i =0; i<sizeof(psta->bssrateset); i++)
|
||||
{
|
||||
if (psta->bssrateset[i])
|
||||
tx_ra_bitmap |= rtw_get_bit_value_from_ieee_value(psta->bssrateset[i]&0x7f);
|
||||
|
@ -538,11 +538,11 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
|
|||
{
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
|
||||
if (rf_type == RF_2T2R)
|
||||
limit=16;/* 2R */
|
||||
limit =16;/* 2R */
|
||||
else
|
||||
limit=8;/* 1R */
|
||||
limit =8;/* 1R */
|
||||
|
||||
for (i=0; i<limit; i++) {
|
||||
for (i =0; i<limit; i++) {
|
||||
if (psta_ht->ht_cap.mcs.rx_mask[i/8] & BIT(i%8))
|
||||
tx_ra_bitmap |= BIT(i+12);
|
||||
}
|
||||
|
@ -583,13 +583,13 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
|
|||
|
||||
arg |= BIT(7);/* support entry 2~31 */
|
||||
|
||||
if (shortGIrate==true)
|
||||
if (shortGIrate ==true)
|
||||
arg |= BIT(5);
|
||||
|
||||
tx_ra_bitmap |= ((raid<<28)&0xf0000000);
|
||||
|
||||
DBG_871X("%s=> mac_id:%d , raid:%d , bitmap=0x%x, arg=0x%x\n",
|
||||
__FUNCTION__ , psta->mac_id, raid ,tx_ra_bitmap, arg);
|
||||
DBG_871X("%s => mac_id:%d , raid:%d , bitmap =0x%x, arg =0x%x\n",
|
||||
__FUNCTION__ , psta->mac_id, raid , tx_ra_bitmap, arg);
|
||||
|
||||
/* bitmap[0:27] = tx_rate_bitmap */
|
||||
/* bitmap[28:31]= Rate Adaptive id */
|
||||
|
@ -598,7 +598,7 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
|
|||
rtw_hal_add_ra_tid(padapter, tx_ra_bitmap, arg, rssi_level);
|
||||
|
||||
|
||||
if (shortGIrate==true)
|
||||
if (shortGIrate ==true)
|
||||
init_rate |= BIT(6);
|
||||
|
||||
/* set ra_id, init_rate */
|
||||
|
@ -616,10 +616,10 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
|
|||
void update_bmc_sta(struct adapter *padapter)
|
||||
{
|
||||
unsigned long irqL;
|
||||
u32 init_rate=0;
|
||||
u32 init_rate =0;
|
||||
unsigned char network_type, raid;
|
||||
int i, supportRateNum = 0;
|
||||
unsigned int tx_ra_bitmap=0;
|
||||
unsigned int tx_ra_bitmap =0;
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
struct wlan_bssid_ex *pcur_network = (struct wlan_bssid_ex *)&pmlmepriv->cur_network.network;
|
||||
struct sta_info *psta = rtw_get_bcmc_stainfo(padapter);
|
||||
|
@ -645,7 +645,7 @@ void update_bmc_sta(struct adapter *padapter)
|
|||
psta->bssratelen = supportRateNum;
|
||||
|
||||
/* b/g mode ra_bitmap */
|
||||
for (i=0; i<supportRateNum; i++)
|
||||
for (i =0; i<supportRateNum; i++)
|
||||
{
|
||||
if (psta->bssrateset[i])
|
||||
tx_ra_bitmap |= rtw_get_bit_value_from_ieee_value(psta->bssrateset[i]&0x7f);
|
||||
|
@ -678,12 +678,12 @@ void update_bmc_sta(struct adapter *padapter)
|
|||
|
||||
arg |= BIT(7);
|
||||
|
||||
/* if (shortGIrate==true) */
|
||||
/* if (shortGIrate ==true) */
|
||||
/* arg |= BIT(5); */
|
||||
|
||||
tx_ra_bitmap |= ((raid<<28)&0xf0000000);
|
||||
|
||||
DBG_871X("update_bmc_sta, mask=0x%x, arg=0x%x\n", tx_ra_bitmap, arg);
|
||||
DBG_871X("update_bmc_sta, mask =0x%x, arg =0x%x\n", tx_ra_bitmap, arg);
|
||||
|
||||
/* bitmap[0:27] = tx_rate_bitmap */
|
||||
/* bitmap[28:31]= Rate Adaptive id */
|
||||
|
@ -716,7 +716,7 @@ void update_bmc_sta(struct adapter *padapter)
|
|||
/* MAC_ID = AID+1 for sta in ap/adhoc mode */
|
||||
/* MAC_ID = 1 for bc/mc for sta/ap/adhoc */
|
||||
/* MAC_ID = 0 for bssid for sta/ap/adhoc */
|
||||
/* CAM_ID = 0~3 for default key, cmd_id=macid + 3, macid=aid+1; */
|
||||
/* CAM_ID = 0~3 for default key, cmd_id =macid + 3, macid =aid+1; */
|
||||
|
||||
void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)
|
||||
{
|
||||
|
@ -731,12 +731,12 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)
|
|||
|
||||
/* psta->mac_id = psta->aid+4; */
|
||||
psta->mac_id = psta->aid+1;
|
||||
DBG_871X("%s\n",__FUNCTION__);
|
||||
DBG_871X("%s\n", __FUNCTION__);
|
||||
|
||||
/* ap mode */
|
||||
rtw_hal_set_odm_var(padapter,HAL_ODM_STA_INFO,psta,true);
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, true);
|
||||
|
||||
if (psecuritypriv->dot11AuthAlgrthm==dot11AuthAlgrthm_8021X)
|
||||
if (psecuritypriv->dot11AuthAlgrthm ==dot11AuthAlgrthm_8021X)
|
||||
psta->ieee8021x_blocked = true;
|
||||
else
|
||||
psta->ieee8021x_blocked = false;
|
||||
|
@ -825,7 +825,7 @@ static void update_hw_ht_param(struct adapter *padapter)
|
|||
/* */
|
||||
pmlmeinfo->SM_PS = (le16_to_cpu(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info) & 0x0C) >> 2;
|
||||
if (pmlmeinfo->SM_PS == WLAN_HT_CAP_SM_PS_STATIC)
|
||||
DBG_871X("%s(): WLAN_HT_CAP_SM_PS_STATIC\n",__FUNCTION__);
|
||||
DBG_871X("%s(): WLAN_HT_CAP_SM_PS_STATIC\n", __FUNCTION__);
|
||||
|
||||
/* */
|
||||
/* Config current HT Protection mode. */
|
||||
|
@ -843,12 +843,12 @@ static void start_bss_network(struct adapter *padapter, u8 *pbuf)
|
|||
int ie_len;
|
||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
struct security_priv* psecuritypriv=&(padapter->securitypriv);
|
||||
struct security_priv* psecuritypriv =&(padapter->securitypriv);
|
||||
struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex *)&pmlmepriv->cur_network.network;
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
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
|
||||
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
||||
#endif /* CONFIG_P2P */
|
||||
|
@ -959,7 +959,7 @@ static void start_bss_network(struct adapter *padapter, u8 *pbuf)
|
|||
/* set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); */
|
||||
set_channel_bwmode(padapter, cur_channel, cur_ch_offset, cur_bwmode);
|
||||
|
||||
DBG_871X("CH=%d, BW=%d, offset=%d\n", cur_channel, cur_bwmode, cur_ch_offset);
|
||||
DBG_871X("CH =%d, BW =%d, offset =%d\n", cur_channel, cur_bwmode, cur_ch_offset);
|
||||
|
||||
/* */
|
||||
pmlmeext->cur_channel = cur_channel;
|
||||
|
@ -986,7 +986,7 @@ static void start_bss_network(struct adapter *padapter, u8 *pbuf)
|
|||
update_beacon(padapter, _TIM_IE_, NULL, false);
|
||||
|
||||
/* issue beacon frame */
|
||||
if (send_beacon(padapter)==_FAIL)
|
||||
if (send_beacon(padapter) ==_FAIL)
|
||||
DBG_871X("issue_beacon, fail!\n");
|
||||
}
|
||||
|
||||
|
@ -996,18 +996,18 @@ static void start_bss_network(struct adapter *padapter, u8 *pbuf)
|
|||
|
||||
int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
||||
{
|
||||
int ret=_SUCCESS;
|
||||
int ret =_SUCCESS;
|
||||
u8 *p;
|
||||
u8 *pHT_caps_ie=NULL;
|
||||
u8 *pHT_info_ie=NULL;
|
||||
u8 *pHT_caps_ie =NULL;
|
||||
u8 *pHT_info_ie =NULL;
|
||||
struct sta_info *psta = NULL;
|
||||
u16 cap, ht_cap=false;
|
||||
u16 cap, ht_cap =false;
|
||||
uint ie_len = 0;
|
||||
int group_cipher, pairwise_cipher;
|
||||
u8 channel, network_type, supportRate[NDIS_802_11_LENGTH_RATES_EX];
|
||||
int supportRateNum = 0;
|
||||
u8 OUI1[] = {0x00, 0x50, 0xf2,0x01};
|
||||
u8 wps_oui[4]={0x0,0x50,0xf2,0x04};
|
||||
u8 OUI1[] = {0x00, 0x50, 0xf2, 0x01};
|
||||
u8 wps_oui[4]={0x0, 0x50, 0xf2, 0x04};
|
||||
u8 WMM_PARA_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x01, 0x01};
|
||||
struct registry_priv *pregistrypriv = &padapter->registrypriv;
|
||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||
|
@ -1028,7 +1028,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
|||
/* ht_capab, ht_oper */
|
||||
/* WPS IE */
|
||||
|
||||
DBG_871X("%s, len=%d\n", __FUNCTION__, len);
|
||||
DBG_871X("%s, len =%d\n", __FUNCTION__, len);
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true)
|
||||
return _FAIL;
|
||||
|
@ -1127,7 +1127,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
|||
{
|
||||
if (rtw_parse_wpa2_ie(p, ie_len+2, &group_cipher, &pairwise_cipher, NULL) == _SUCCESS)
|
||||
{
|
||||
psecuritypriv->dot11AuthAlgrthm= dot11AuthAlgrthm_8021X;
|
||||
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_8021X;
|
||||
|
||||
psecuritypriv->dot8021xalg = 1;/* psk, todo:802.1x */
|
||||
psecuritypriv->wpa_psk |= BIT(1);
|
||||
|
@ -1150,7 +1150,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
|||
{
|
||||
if (rtw_parse_wpa_ie(p, ie_len+2, &group_cipher, &pairwise_cipher, NULL) == _SUCCESS)
|
||||
{
|
||||
psecuritypriv->dot11AuthAlgrthm= dot11AuthAlgrthm_8021X;
|
||||
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_8021X;
|
||||
|
||||
psecuritypriv->dot8021xalg = 1;/* psk, todo:802.1x */
|
||||
|
||||
|
@ -1209,7 +1209,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
|||
|
||||
struct ieee80211_ht_cap *pht_cap = (struct ieee80211_ht_cap *)(p+2);
|
||||
|
||||
pHT_caps_ie=p;
|
||||
pHT_caps_ie =p;
|
||||
|
||||
|
||||
ht_cap = true;
|
||||
|
@ -1243,7 +1243,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
|||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _HT_ADD_INFO_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||
if (p && ie_len>0)
|
||||
{
|
||||
pHT_info_ie=p;
|
||||
pHT_info_ie =p;
|
||||
}
|
||||
switch (network_type)
|
||||
{
|
||||
|
@ -1276,12 +1276,12 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
|||
}
|
||||
|
||||
/* ht_cap */
|
||||
if (pregistrypriv->ht_enable && ht_cap==true)
|
||||
if (pregistrypriv->ht_enable && ht_cap ==true)
|
||||
{
|
||||
pmlmepriv->htpriv.ht_option = true;
|
||||
pmlmepriv->qospriv.qos_option = 1;
|
||||
|
||||
if (pregistrypriv->ampdu_enable==1)
|
||||
if (pregistrypriv->ampdu_enable ==1)
|
||||
{
|
||||
pmlmepriv->htpriv.ampdu_enable = true;
|
||||
}
|
||||
|
@ -1306,7 +1306,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
|||
return _FAIL;
|
||||
}
|
||||
}
|
||||
psta->state |= WIFI_AP_STATE; /* Aries, add,fix bug of flush_cam_entry at STOP AP mode , 0724 */
|
||||
psta->state |= WIFI_AP_STATE; /* Aries, add, fix bug of flush_cam_entry at STOP AP mode , 0724 */
|
||||
rtw_indicate_connect( padapter);
|
||||
|
||||
pmlmepriv->cur_network.join_res = true;/* for check if already set beacon */
|
||||
|
@ -1323,7 +1323,7 @@ void rtw_set_macaddr_acl(struct adapter *padapter, int mode)
|
|||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
||||
|
||||
DBG_871X("%s, mode=%d\n", __func__, mode);
|
||||
DBG_871X("%s, mode =%d\n", __func__, mode);
|
||||
|
||||
pacl_list->mode = mode;
|
||||
}
|
||||
|
@ -1333,13 +1333,13 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
|
|||
unsigned long irqL;
|
||||
struct list_head *plist, *phead;
|
||||
u8 added = false;
|
||||
int i, ret=0;
|
||||
int i, ret =0;
|
||||
struct rtw_wlan_acl_node *paclnode;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
||||
struct __queue *pacl_node_q =&pacl_list->acl_node_q;
|
||||
|
||||
DBG_871X("%s(acl_num=%d)=" MAC_FMT "\n", __func__, pacl_list->num, MAC_ARG(addr));
|
||||
DBG_871X("%s(acl_num =%d) =" MAC_FMT "\n", __func__, pacl_list->num, MAC_ARG(addr));
|
||||
|
||||
if ((NUM_ACL-1) < pacl_list->num)
|
||||
return (-1);
|
||||
|
@ -1375,7 +1375,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
|
|||
|
||||
spin_lock_bh(&(pacl_node_q->lock));
|
||||
|
||||
for (i=0; i< NUM_ACL; i++)
|
||||
for (i =0; i< NUM_ACL; i++)
|
||||
{
|
||||
paclnode = &pacl_list->aclnode[i];
|
||||
|
||||
|
@ -1395,7 +1395,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
|
|||
}
|
||||
}
|
||||
|
||||
DBG_871X("%s, acl_num=%d\n", __func__, pacl_list->num);
|
||||
DBG_871X("%s, acl_num =%d\n", __func__, pacl_list->num);
|
||||
|
||||
spin_unlock_bh(&(pacl_node_q->lock));
|
||||
|
||||
|
@ -1406,13 +1406,13 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
|
|||
{
|
||||
unsigned long irqL;
|
||||
struct list_head *plist, *phead;
|
||||
int i, ret=0;
|
||||
int i, ret =0;
|
||||
struct rtw_wlan_acl_node *paclnode;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
||||
struct __queue *pacl_node_q =&pacl_list->acl_node_q;
|
||||
|
||||
DBG_871X("%s(acl_num=%d)=" MAC_FMT "\n", __func__, pacl_list->num, MAC_ARG(addr));
|
||||
DBG_871X("%s(acl_num =%d) =" MAC_FMT "\n", __func__, pacl_list->num, MAC_ARG(addr));
|
||||
|
||||
spin_lock_bh(&(pacl_node_q->lock));
|
||||
|
||||
|
@ -1439,7 +1439,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
|
|||
|
||||
spin_unlock_bh(&(pacl_node_q->lock));
|
||||
|
||||
DBG_871X("%s, acl_num=%d\n", __func__, pacl_list->num);
|
||||
DBG_871X("%s, acl_num =%d\n", __func__, pacl_list->num);
|
||||
|
||||
return ret;
|
||||
|
||||
|
@ -1460,7 +1460,7 @@ static void update_bcn_erpinfo_ie(struct adapter *padapter)
|
|||
unsigned char *p, *ie = pnetwork->IEs;
|
||||
u32 len = 0;
|
||||
|
||||
DBG_871X("%s, ERP_enable=%d\n", __FUNCTION__, pmlmeinfo->ERP_enable);
|
||||
DBG_871X("%s, ERP_enable =%d\n", __FUNCTION__, pmlmeinfo->ERP_enable);
|
||||
|
||||
if (!pmlmeinfo->ERP_enable)
|
||||
return;
|
||||
|
@ -1518,8 +1518,8 @@ static void update_bcn_wmm_ie(struct adapter *padapter)
|
|||
|
||||
static void update_bcn_wps_ie(struct adapter *padapter)
|
||||
{
|
||||
u8 *pwps_ie=NULL, *pwps_ie_src, *premainder_ie, *pbackup_remainder_ie=NULL;
|
||||
uint wps_ielen=0, wps_offset, remainder_ielen;
|
||||
u8 *pwps_ie =NULL, *pwps_ie_src, *premainder_ie, *pbackup_remainder_ie =NULL;
|
||||
uint wps_ielen =0, wps_offset, remainder_ielen;
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
@ -1532,7 +1532,7 @@ static void update_bcn_wps_ie(struct adapter *padapter)
|
|||
|
||||
pwps_ie = rtw_get_wps_ie(ie+_FIXED_IE_LENGTH_, ielen-_FIXED_IE_LENGTH_, NULL, &wps_ielen);
|
||||
|
||||
if (pwps_ie==NULL || wps_ielen==0)
|
||||
if (pwps_ie ==NULL || wps_ielen ==0)
|
||||
return;
|
||||
|
||||
wps_offset = (uint)(pwps_ie-ie);
|
||||
|
@ -1707,7 +1707,7 @@ static int rtw_ht_operation_update(struct adapter *padapter)
|
|||
/* if (!iface->conf->ieee80211n || iface->conf->ht_op_mode_fixed) */
|
||||
/* return 0; */
|
||||
|
||||
DBG_871X("%s current operation mode=0x%X\n",
|
||||
DBG_871X("%s current operation mode =0x%X\n",
|
||||
__FUNCTION__, pmlmepriv->ht_op_mode);
|
||||
|
||||
if (!(pmlmepriv->ht_op_mode & HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT)
|
||||
|
@ -1758,7 +1758,7 @@ static int rtw_ht_operation_update(struct adapter *padapter)
|
|||
op_mode_changes++;
|
||||
}
|
||||
|
||||
DBG_871X("%s new operation mode=0x%X changes=%d\n",
|
||||
DBG_871X("%s new operation mode =0x%X changes =%d\n",
|
||||
__FUNCTION__, pmlmepriv->ht_op_mode, op_mode_changes);
|
||||
|
||||
return op_mode_changes;
|
||||
|
@ -1772,7 +1772,7 @@ void associated_clients_update(struct adapter *padapter, u8 updated)
|
|||
{
|
||||
unsigned long irqL;
|
||||
struct list_head *phead, *plist;
|
||||
struct sta_info *psta=NULL;
|
||||
struct sta_info *psta =NULL;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
|
@ -1947,7 +1947,7 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
|
|||
/* update associcated stations cap. */
|
||||
associated_clients_update(padapter, beacon_updated);
|
||||
|
||||
DBG_871X("%s, updated=%d\n", __func__, beacon_updated);
|
||||
DBG_871X("%s, updated =%d\n", __func__, beacon_updated);
|
||||
|
||||
}
|
||||
|
||||
|
@ -2013,7 +2013,7 @@ u8 bss_cap_update_on_sta_leave(struct adapter *padapter, struct sta_info *psta)
|
|||
update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, true);
|
||||
}
|
||||
|
||||
DBG_871X("%s, updated=%d\n", __func__, beacon_updated);
|
||||
DBG_871X("%s, updated =%d\n", __func__, beacon_updated);
|
||||
|
||||
return beacon_updated;
|
||||
|
||||
|
@ -2072,12 +2072,12 @@ int rtw_ap_inform_ch_switch (struct adapter *padapter, u8 new_ch, u8 ch_offset)
|
|||
{
|
||||
unsigned long irqL;
|
||||
struct list_head *phead, *plist;
|
||||
int ret=0;
|
||||
int ret =0;
|
||||
struct sta_info *psta = NULL;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
u8 bc_addr[ETH_ALEN] = {0xff,0xff,0xff,0xff,0xff,0xff};
|
||||
u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
||||
|
||||
if ((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE)
|
||||
return ret;
|
||||
|
@ -2109,12 +2109,12 @@ int rtw_sta_flush(struct adapter *padapter)
|
|||
{
|
||||
unsigned long irqL;
|
||||
struct list_head *phead, *plist;
|
||||
int ret=0;
|
||||
int ret =0;
|
||||
struct sta_info *psta = NULL;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
u8 bc_addr[ETH_ALEN] = {0xff,0xff,0xff,0xff,0xff,0xff};
|
||||
u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
||||
u8 chk_alive_num = 0;
|
||||
char chk_alive_list[NUM_STA];
|
||||
int i;
|
||||
|
@ -2211,14 +2211,14 @@ void rtw_ap_restore_network(struct adapter *padapter)
|
|||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
struct sta_priv * pstapriv = &padapter->stapriv;
|
||||
struct sta_info *psta;
|
||||
struct security_priv* psecuritypriv=&(padapter->securitypriv);
|
||||
struct security_priv* psecuritypriv =&(padapter->securitypriv);
|
||||
unsigned long irqL;
|
||||
struct list_head *phead, *plist;
|
||||
u8 chk_alive_num = 0;
|
||||
char chk_alive_list[NUM_STA];
|
||||
int i;
|
||||
|
||||
rtw_setopmode_cmd(padapter, Ndis802_11APMode,false);
|
||||
rtw_setopmode_cmd(padapter, Ndis802_11APMode, false);
|
||||
|
||||
set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode);
|
||||
|
||||
|
@ -2228,7 +2228,7 @@ void rtw_ap_restore_network(struct adapter *padapter)
|
|||
(padapter->securitypriv.dot11PrivacyAlgrthm == _AES_))
|
||||
{
|
||||
/* restore group key, WEP keys is restored in ips_leave() */
|
||||
rtw_set_key(padapter, psecuritypriv, psecuritypriv->dot118021XGrpKeyid, 0,false);
|
||||
rtw_set_key(padapter, psecuritypriv, psecuritypriv->dot118021XGrpKeyid, 0, false);
|
||||
}
|
||||
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
|
@ -2264,7 +2264,7 @@ void rtw_ap_restore_network(struct adapter *padapter)
|
|||
if ( (padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_) ||
|
||||
(padapter->securitypriv.dot11PrivacyAlgrthm == _AES_))
|
||||
{
|
||||
rtw_setstakey_cmd(padapter, (unsigned char *)psta, true,false);
|
||||
rtw_setstakey_cmd(padapter, (unsigned char *)psta, true, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2300,7 +2300,7 @@ void start_ap_mode(struct adapter *padapter)
|
|||
|
||||
pmlmepriv->ht_op_mode = 0;
|
||||
|
||||
for (i=0; i<NUM_STA; i++)
|
||||
for (i =0; i<NUM_STA; i++)
|
||||
pstapriv->sta_aid[i] = NULL;
|
||||
|
||||
pmlmepriv->wps_beacon_ie = NULL;
|
||||
|
@ -2328,7 +2328,7 @@ void stop_ap_mode(struct adapter *padapter)
|
|||
unsigned long irqL;
|
||||
struct list_head *phead, *plist;
|
||||
struct rtw_wlan_acl_node *paclnode;
|
||||
struct sta_info *psta=NULL;
|
||||
struct sta_info *psta =NULL;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
|
@ -2362,7 +2362,7 @@ void stop_ap_mode(struct adapter *padapter)
|
|||
}
|
||||
spin_unlock_bh(&(pacl_node_q->lock));
|
||||
|
||||
DBG_871X("%s, free acl_node_queue, num=%d\n", __func__, pacl_list->num);
|
||||
DBG_871X("%s, free acl_node_queue, num =%d\n", __func__, pacl_list->num);
|
||||
|
||||
rtw_sta_flush(padapter);
|
||||
|
||||
|
|
|
@ -237,8 +237,8 @@ static int update_nd_link_layer_addr(unsigned char *data, int len, unsigned char
|
|||
mac = scan_tlv(&data[8], len-8, 1, 1);
|
||||
if (mac) {
|
||||
_DEBUG_INFO("Router Solicitation, replace MAC From: %02x:%02x:%02x:%02x:%02x:%02x, To: %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
mac[0],mac[1],mac[2],mac[3],mac[4],mac[5],
|
||||
replace_mac[0],replace_mac[1],replace_mac[2],replace_mac[3],replace_mac[4],replace_mac[5]);
|
||||
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5],
|
||||
replace_mac[0], replace_mac[1], replace_mac[2], replace_mac[3], replace_mac[4], replace_mac[5]);
|
||||
memcpy(mac, replace_mac, 6);
|
||||
return 1;
|
||||
}
|
||||
|
@ -249,8 +249,8 @@ static int update_nd_link_layer_addr(unsigned char *data, int len, unsigned char
|
|||
mac = scan_tlv(&data[16], len-16, 1, 1);
|
||||
if (mac) {
|
||||
_DEBUG_INFO("Router Advertisement, replace MAC From: %02x:%02x:%02x:%02x:%02x:%02x, To: %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
mac[0],mac[1],mac[2],mac[3],mac[4],mac[5],
|
||||
replace_mac[0],replace_mac[1],replace_mac[2],replace_mac[3],replace_mac[4],replace_mac[5]);
|
||||
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5],
|
||||
replace_mac[0], replace_mac[1], replace_mac[2], replace_mac[3], replace_mac[4], replace_mac[5]);
|
||||
memcpy(mac, replace_mac, 6);
|
||||
return 1;
|
||||
}
|
||||
|
@ -261,8 +261,8 @@ static int update_nd_link_layer_addr(unsigned char *data, int len, unsigned char
|
|||
mac = scan_tlv(&data[24], len-24, 1, 1);
|
||||
if (mac) {
|
||||
_DEBUG_INFO("Neighbor Solicitation, replace MAC From: %02x:%02x:%02x:%02x:%02x:%02x, To: %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
mac[0],mac[1],mac[2],mac[3],mac[4],mac[5],
|
||||
replace_mac[0],replace_mac[1],replace_mac[2],replace_mac[3],replace_mac[4],replace_mac[5]);
|
||||
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5],
|
||||
replace_mac[0], replace_mac[1], replace_mac[2], replace_mac[3], replace_mac[4], replace_mac[5]);
|
||||
memcpy(mac, replace_mac, 6);
|
||||
return 1;
|
||||
}
|
||||
|
@ -273,8 +273,8 @@ static int update_nd_link_layer_addr(unsigned char *data, int len, unsigned char
|
|||
mac = scan_tlv(&data[24], len-24, 2, 1);
|
||||
if (mac) {
|
||||
_DEBUG_INFO("Neighbor Advertisement, replace MAC From: %02x:%02x:%02x:%02x:%02x:%02x, To: %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
mac[0],mac[1],mac[2],mac[3],mac[4],mac[5],
|
||||
replace_mac[0],replace_mac[1],replace_mac[2],replace_mac[3],replace_mac[4],replace_mac[5]);
|
||||
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5],
|
||||
replace_mac[0], replace_mac[1], replace_mac[2], replace_mac[3], replace_mac[4], replace_mac[5]);
|
||||
memcpy(mac, replace_mac, 6);
|
||||
return 1;
|
||||
}
|
||||
|
@ -285,8 +285,8 @@ static int update_nd_link_layer_addr(unsigned char *data, int len, unsigned char
|
|||
mac = scan_tlv(&data[40], len-40, 2, 1);
|
||||
if (mac) {
|
||||
_DEBUG_INFO("Redirect, replace MAC From: %02x:%02x:%02x:%02x:%02x:%02x, To: %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
mac[0],mac[1],mac[2],mac[3],mac[4],mac[5],
|
||||
replace_mac[0],replace_mac[1],replace_mac[2],replace_mac[3],replace_mac[4],replace_mac[5]);
|
||||
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5],
|
||||
replace_mac[0], replace_mac[1], replace_mac[2], replace_mac[3], replace_mac[4], replace_mac[5]);
|
||||
memcpy(mac, replace_mac, 6);
|
||||
return 1;
|
||||
}
|
||||
|
@ -303,12 +303,12 @@ static void convert_ipv6_mac_to_mc(struct sk_buff *skb)
|
|||
|
||||
/* dst_mac[0] = 0xff; */
|
||||
/* dst_mac[1] = 0xff; */
|
||||
/*modified by qinjunjie,ipv6 multicast address ix 0x33-33-xx-xx-xx-xx*/
|
||||
/*modified by qinjunjie, ipv6 multicast address ix 0x33-33-xx-xx-xx-xx*/
|
||||
dst_mac[0] = 0x33;
|
||||
dst_mac[1] = 0x33;
|
||||
memcpy(&dst_mac[2], &iph->daddr.s6_addr32[3], 4);
|
||||
#if defined(__LINUX_2_6__)
|
||||
/*modified by qinjunjie,warning:should not remove next line*/
|
||||
/*modified by qinjunjie, warning:should not remove next line*/
|
||||
skb->pkt_type = PACKET_MULTICAST;
|
||||
#endif
|
||||
}
|
||||
|
@ -368,7 +368,7 @@ static __inline__ int __nat25_network_hash(unsigned char *networkAddr)
|
|||
unsigned long x = 0;
|
||||
int i;
|
||||
|
||||
for (i=0; i<MAX_NETWORK_ADDR_LEN; i++)
|
||||
for (i =0; i<MAX_NETWORK_ADDR_LEN; i++)
|
||||
x ^= networkAddr[i];
|
||||
|
||||
return x & (NAT25_HASH_SIZE - 1);
|
||||
|
@ -540,7 +540,7 @@ void nat25_db_cleanup(struct adapter *priv)
|
|||
unsigned long irqL;
|
||||
spin_lock_bh(&priv->br_ext_lock);
|
||||
|
||||
for (i=0; i<NAT25_HASH_SIZE; i++)
|
||||
for (i =0; i<NAT25_HASH_SIZE; i++)
|
||||
{
|
||||
struct nat25_network_db_entry *f;
|
||||
f = priv->nethash[i];
|
||||
|
@ -573,7 +573,7 @@ void nat25_db_expire(struct adapter *priv)
|
|||
|
||||
/* if (!priv->ethBrExtInfo.nat25_disable) */
|
||||
{
|
||||
for (i=0; i<NAT25_HASH_SIZE; i++)
|
||||
for (i =0; i<NAT25_HASH_SIZE; i++)
|
||||
{
|
||||
struct nat25_network_db_entry *f;
|
||||
f = priv->nethash[i];
|
||||
|
@ -624,7 +624,7 @@ static int checkIPMcAndReplace(struct adapter *priv, struct sk_buff *skb, unsign
|
|||
if (pstat->ipmc_num == 0)
|
||||
continue;
|
||||
|
||||
for (i=0; i<MAX_IP_MC_ENTRY; i++) {
|
||||
for (i =0; i<MAX_IP_MC_ENTRY; i++) {
|
||||
if (pstat->ipmc[i].used && !memcmp(&pstat->ipmc[i].mcmac[3], ((unsigned char *)dst_ip)+1, 3)) {
|
||||
memcpy(skb->data, pstat->ipmc[i].mcmac, ETH_ALEN);
|
||||
return 1;
|
||||
|
@ -672,7 +672,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
|||
/* in class A, B, C, host address is all zero or all one is illegal */
|
||||
if (iph->saddr == 0)
|
||||
return 0;
|
||||
DEBUG_INFO("NAT25: Insert IP, SA=%08x, DA=%08x\n", iph->saddr, iph->daddr);
|
||||
DEBUG_INFO("NAT25: Insert IP, SA =%08x, DA =%08x\n", iph->saddr, iph->daddr);
|
||||
__nat25_generate_ipv4_network_addr(networkAddr, &tmp);
|
||||
/* record source IP address and , source mac address into db */
|
||||
__nat25_db_network_insert(priv, skb->data+ETH_ALEN, networkAddr);
|
||||
|
@ -683,7 +683,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
|||
|
||||
case NAT25_LOOKUP:
|
||||
{
|
||||
DEBUG_INFO("NAT25: Lookup IP, SA=%08x, DA=%08x\n", iph->saddr, iph->daddr);
|
||||
DEBUG_INFO("NAT25: Lookup IP, SA =%08x, DA =%08x\n", iph->saddr, iph->daddr);
|
||||
#ifdef SUPPORT_TX_MCAST2UNI
|
||||
if (priv->pshare->rf_ft_var.mc2u_disable ||
|
||||
((((OPMODE & (WIFI_STATION_STATE|WIFI_ASOC_STATE)) ==
|
||||
|
@ -704,7 +704,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
|||
/* forward unknow IP packet to upper TCP/IP */
|
||||
DEBUG_INFO("NAT25: Replace DA with BR's MAC\n");
|
||||
if ( (*(u32 *)priv->br_mac) == 0 && (*(u16 *)(priv->br_mac+4)) == 0 ) {
|
||||
printk("Re-init netdev_br_init() due to br_mac==0!\n");
|
||||
printk("Re-init netdev_br_init() due to br_mac ==0!\n");
|
||||
netdev_br_init(priv->pnetdev);
|
||||
}
|
||||
memcpy(skb->data, priv->br_mac, ETH_ALEN);
|
||||
|
@ -741,7 +741,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
|||
|
||||
case NAT25_INSERT:
|
||||
{
|
||||
DEBUG_INFO("NAT25: Insert ARP, MAC=%02x%02x%02x%02x%02x%02x\n", arp_ptr[0],
|
||||
DEBUG_INFO("NAT25: Insert ARP, MAC =%02x%02x%02x%02x%02x%02x\n", arp_ptr[0],
|
||||
arp_ptr[1], arp_ptr[2], arp_ptr[3], arp_ptr[4], arp_ptr[5]);
|
||||
|
||||
/* change to ARP sender mac address to wlan STA address */
|
||||
|
@ -797,14 +797,14 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
|||
|
||||
if (protocol == ETH_P_IPX)
|
||||
{
|
||||
DEBUG_INFO("NAT25: Protocol=IPX (Ethernet II)\n");
|
||||
DEBUG_INFO("NAT25: Protocol =IPX (Ethernet II)\n");
|
||||
ipx = (struct ipxhdr *)framePtr;
|
||||
}
|
||||
else if (protocol <= ETH_FRAME_LEN)
|
||||
{
|
||||
if (!memcmp(ipx_header, framePtr, 2))
|
||||
{
|
||||
DEBUG_INFO("NAT25: Protocol=IPX (Ethernet 802.3)\n");
|
||||
DEBUG_INFO("NAT25: Protocol =IPX (Ethernet 802.3)\n");
|
||||
ipx = (struct ipxhdr *)framePtr;
|
||||
}
|
||||
else
|
||||
|
@ -824,7 +824,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
|||
{
|
||||
framePtr += 5; /* eliminate the SNAP header */
|
||||
|
||||
DEBUG_INFO("NAT25: Protocol=IPX (Ethernet SNAP)\n");
|
||||
DEBUG_INFO("NAT25: Protocol =IPX (Ethernet SNAP)\n");
|
||||
ipx = (struct ipxhdr *)framePtr;
|
||||
}
|
||||
else if (!memcmp(aarp_snap_id, framePtr, 5))
|
||||
|
@ -841,7 +841,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
|||
}
|
||||
else
|
||||
{
|
||||
DEBUG_WARN("NAT25: Protocol=Ethernet SNAP %02x%02x%02x%02x%02x\n", framePtr[0],
|
||||
DEBUG_WARN("NAT25: Protocol =Ethernet SNAP %02x%02x%02x%02x%02x\n", framePtr[0],
|
||||
framePtr[1], framePtr[2], framePtr[3], framePtr[4]);
|
||||
return -1;
|
||||
}
|
||||
|
@ -852,7 +852,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
|||
|
||||
if (!memcmp(ipx_header, framePtr, 2))
|
||||
{
|
||||
DEBUG_INFO("NAT25: Protocol=IPX (Ethernet 802.2)\n");
|
||||
DEBUG_INFO("NAT25: Protocol =IPX (Ethernet 802.2)\n");
|
||||
ipx = (struct ipxhdr *)framePtr;
|
||||
}
|
||||
else
|
||||
|
@ -880,7 +880,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
|||
|
||||
case NAT25_INSERT:
|
||||
{
|
||||
DEBUG_INFO("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
|
||||
DEBUG_INFO("NAT25: Insert IPX, Dest =%08x,%02x%02x%02x%02x%02x%02x,%04x Source =%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
|
||||
ipx->ipx_dest.net,
|
||||
ipx->ipx_dest.node[0],
|
||||
ipx->ipx_dest.node[1],
|
||||
|
@ -965,7 +965,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
|||
/* change to AARP source mac address to wlan STA address */
|
||||
memcpy(ea->hw_src, GET_MY_HWADDR(priv), ETH_ALEN);
|
||||
|
||||
DEBUG_INFO("NAT25: Insert AARP, Source=%d,%d Destination=%d,%d\n",
|
||||
DEBUG_INFO("NAT25: Insert AARP, Source =%d,%d Destination =%d,%d\n",
|
||||
ea->pa_src_net,
|
||||
ea->pa_src_node,
|
||||
ea->pa_dst_net,
|
||||
|
@ -981,7 +981,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
|||
|
||||
case NAT25_LOOKUP:
|
||||
{
|
||||
DEBUG_INFO("NAT25: Lookup AARP, Source=%d,%d Destination=%d,%d\n",
|
||||
DEBUG_INFO("NAT25: Lookup AARP, Source =%d,%d Destination =%d,%d\n",
|
||||
ea->pa_src_net,
|
||||
ea->pa_src_node,
|
||||
ea->pa_dst_net,
|
||||
|
@ -1011,7 +1011,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
|||
|
||||
case NAT25_INSERT:
|
||||
{
|
||||
DEBUG_INFO("NAT25: Insert DDP, Source=%d,%d Destination=%d,%d\n",
|
||||
DEBUG_INFO("NAT25: Insert DDP, Source =%d,%d Destination =%d,%d\n",
|
||||
ddp->deh_snet,
|
||||
ddp->deh_snode,
|
||||
ddp->deh_dnet,
|
||||
|
@ -1027,7 +1027,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
|||
|
||||
case NAT25_LOOKUP:
|
||||
{
|
||||
DEBUG_INFO("NAT25: Lookup DDP, Source=%d,%d Destination=%d,%d\n",
|
||||
DEBUG_INFO("NAT25: Lookup DDP, Source =%d,%d Destination =%d,%d\n",
|
||||
ddp->deh_snet,
|
||||
ddp->deh_snode,
|
||||
ddp->deh_dnet,
|
||||
|
@ -1071,7 +1071,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
|||
if (priv->ethBrExtInfo.addPPPoETag) {
|
||||
struct pppoe_tag *tag, *pOldTag;
|
||||
unsigned char tag_buf[40];
|
||||
int old_tag_len=0;
|
||||
int old_tag_len =0;
|
||||
|
||||
tag = (struct pppoe_tag *)tag_buf;
|
||||
pOldTag = (struct pppoe_tag *)__nat25_find_pppoe_tag(ph, ntohs(PTT_RELAY_SID));
|
||||
|
@ -1147,7 +1147,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
|||
struct pppoe_tag *tag;
|
||||
unsigned char *ptr;
|
||||
unsigned short tagType, tagLen;
|
||||
int offset=0;
|
||||
int offset =0;
|
||||
|
||||
if ((ptr = __nat25_find_pppoe_tag(ph, ntohs(PTT_RELAY_SID))) == NULL) {
|
||||
DEBUG_ERR("Fail to find PTT_RELAY_SID in FADO!\n");
|
||||
|
@ -1282,12 +1282,12 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
|||
|
||||
case NAT25_INSERT:
|
||||
{
|
||||
DEBUG_INFO("NAT25: Insert IP, SA=%4x:%4x:%4x:%4x:%4x:%4x:%4x:%4x,"
|
||||
" DA=%4x:%4x:%4x:%4x:%4x:%4x:%4x:%4x\n",
|
||||
iph->saddr.s6_addr16[0],iph->saddr.s6_addr16[1],iph->saddr.s6_addr16[2],iph->saddr.s6_addr16[3],
|
||||
iph->saddr.s6_addr16[4],iph->saddr.s6_addr16[5],iph->saddr.s6_addr16[6],iph->saddr.s6_addr16[7],
|
||||
iph->daddr.s6_addr16[0],iph->daddr.s6_addr16[1],iph->daddr.s6_addr16[2],iph->daddr.s6_addr16[3],
|
||||
iph->daddr.s6_addr16[4],iph->daddr.s6_addr16[5],iph->daddr.s6_addr16[6],iph->daddr.s6_addr16[7]);
|
||||
DEBUG_INFO("NAT25: Insert IP, SA =%4x:%4x:%4x:%4x:%4x:%4x:%4x:%4x,"
|
||||
" DA =%4x:%4x:%4x:%4x:%4x:%4x:%4x:%4x\n",
|
||||
iph->saddr.s6_addr16[0], iph->saddr.s6_addr16[1], iph->saddr.s6_addr16[2], iph->saddr.s6_addr16[3],
|
||||
iph->saddr.s6_addr16[4], iph->saddr.s6_addr16[5], iph->saddr.s6_addr16[6], iph->saddr.s6_addr16[7],
|
||||
iph->daddr.s6_addr16[0], iph->daddr.s6_addr16[1], iph->daddr.s6_addr16[2], iph->daddr.s6_addr16[3],
|
||||
iph->daddr.s6_addr16[4], iph->daddr.s6_addr16[5], iph->daddr.s6_addr16[6], iph->daddr.s6_addr16[7]);
|
||||
|
||||
if (memcmp(&iph->saddr, "\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0", 16)) {
|
||||
__nat25_generate_ipv6_network_addr(networkAddr, (unsigned int *)&iph->saddr);
|
||||
|
@ -1311,12 +1311,12 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
|||
return 0;
|
||||
|
||||
case NAT25_LOOKUP:
|
||||
DEBUG_INFO("NAT25: Lookup IP, SA=%4x:%4x:%4x:%4x:%4x:%4x:%4x:%4x,"
|
||||
" DA=%4x:%4x:%4x:%4x:%4x:%4x:%4x:%4x\n",
|
||||
iph->saddr.s6_addr16[0],iph->saddr.s6_addr16[1],iph->saddr.s6_addr16[2],iph->saddr.s6_addr16[3],
|
||||
iph->saddr.s6_addr16[4],iph->saddr.s6_addr16[5],iph->saddr.s6_addr16[6],iph->saddr.s6_addr16[7],
|
||||
iph->daddr.s6_addr16[0],iph->daddr.s6_addr16[1],iph->daddr.s6_addr16[2],iph->daddr.s6_addr16[3],
|
||||
iph->daddr.s6_addr16[4],iph->daddr.s6_addr16[5],iph->daddr.s6_addr16[6],iph->daddr.s6_addr16[7]);
|
||||
DEBUG_INFO("NAT25: Lookup IP, SA =%4x:%4x:%4x:%4x:%4x:%4x:%4x:%4x,"
|
||||
" DA =%4x:%4x:%4x:%4x:%4x:%4x:%4x:%4x\n",
|
||||
iph->saddr.s6_addr16[0], iph->saddr.s6_addr16[1], iph->saddr.s6_addr16[2], iph->saddr.s6_addr16[3],
|
||||
iph->saddr.s6_addr16[4], iph->saddr.s6_addr16[5], iph->saddr.s6_addr16[6], iph->saddr.s6_addr16[7],
|
||||
iph->daddr.s6_addr16[0], iph->daddr.s6_addr16[1], iph->daddr.s6_addr16[2], iph->daddr.s6_addr16[3],
|
||||
iph->daddr.s6_addr16[4], iph->daddr.s6_addr16[5], iph->daddr.s6_addr16[6], iph->daddr.s6_addr16[7]);
|
||||
|
||||
|
||||
__nat25_generate_ipv6_network_addr(networkAddr, (unsigned int *)&iph->daddr);
|
||||
|
@ -1342,13 +1342,13 @@ int nat25_handle_frame(struct adapter *priv, struct sk_buff *skb)
|
|||
{
|
||||
if (!(skb->data[0] & 1))
|
||||
{
|
||||
int is_vlan_tag=0, i, retval=0;
|
||||
unsigned short vlan_hdr=0;
|
||||
int is_vlan_tag =0, i, retval =0;
|
||||
unsigned short vlan_hdr =0;
|
||||
|
||||
if (*((__be16 *)(skb->data+ETH_ALEN*2)) == __constant_htons(ETH_P_8021Q)) {
|
||||
is_vlan_tag = 1;
|
||||
vlan_hdr = *((unsigned short *)(skb->data+ETH_ALEN*2+2));
|
||||
for (i=0; i<6; i++)
|
||||
for (i =0; i<6; i++)
|
||||
*((unsigned short *)(skb->data+ETH_ALEN*2+2-i*2)) = *((unsigned short *)(skb->data+ETH_ALEN*2-2-i*2));
|
||||
skb_pull(skb, 4);
|
||||
}
|
||||
|
@ -1387,7 +1387,7 @@ int nat25_handle_frame(struct adapter *priv, struct sk_buff *skb)
|
|||
|
||||
if (is_vlan_tag) {
|
||||
skb_push(skb, 4);
|
||||
for (i=0; i<6; i++)
|
||||
for (i =0; i<6; i++)
|
||||
*((__be16 *)(skb->data+i*2)) = *((__be16 *)(skb->data+4+i*2));
|
||||
*((__be16 *)(skb->data+ETH_ALEN*2)) = __constant_htons(ETH_P_8021Q);
|
||||
*((__be16 *)(skb->data+ETH_ALEN*2+2)) = cpu_to_be16(vlan_hdr);
|
||||
|
|
404
core/rtw_cmd.c
404
core/rtw_cmd.c
File diff suppressed because it is too large
Load diff
246
core/rtw_debug.c
246
core/rtw_debug.c
|
@ -97,7 +97,7 @@ int proc_set_write_reg(struct file *file, const char __user *buffer,
|
|||
rtw_write32(padapter, addr, val);
|
||||
break;
|
||||
default:
|
||||
DBG_871X("error write length=%d", len);
|
||||
DBG_871X("error write length =%d", len);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -107,8 +107,8 @@ int proc_set_write_reg(struct file *file, const char __user *buffer,
|
|||
|
||||
}
|
||||
|
||||
static u32 proc_get_read_addr=0xeeeeeeee;
|
||||
static u32 proc_get_read_len=0x4;
|
||||
static u32 proc_get_read_addr =0xeeeeeeee;
|
||||
static u32 proc_get_read_len =0x4;
|
||||
|
||||
int proc_get_read_reg(char *page, char **start,
|
||||
off_t offset, int count,
|
||||
|
@ -119,7 +119,7 @@ int proc_get_read_reg(char *page, char **start,
|
|||
|
||||
int len = 0;
|
||||
|
||||
if (proc_get_read_addr==0xeeeeeeee)
|
||||
if (proc_get_read_addr ==0xeeeeeeee)
|
||||
{
|
||||
*eof = 1;
|
||||
return len;
|
||||
|
@ -128,16 +128,16 @@ int proc_get_read_reg(char *page, char **start,
|
|||
switch (proc_get_read_len)
|
||||
{
|
||||
case 1:
|
||||
len += snprintf(page + len, count - len, "rtw_read8(0x%x)=0x%x\n", proc_get_read_addr, rtw_read8(padapter, proc_get_read_addr));
|
||||
len += snprintf(page + len, count - len, "rtw_read8(0x%x) =0x%x\n", proc_get_read_addr, rtw_read8(padapter, proc_get_read_addr));
|
||||
break;
|
||||
case 2:
|
||||
len += snprintf(page + len, count - len, "rtw_read16(0x%x)=0x%x\n", proc_get_read_addr, rtw_read16(padapter, proc_get_read_addr));
|
||||
len += snprintf(page + len, count - len, "rtw_read16(0x%x) =0x%x\n", proc_get_read_addr, rtw_read16(padapter, proc_get_read_addr));
|
||||
break;
|
||||
case 4:
|
||||
len += snprintf(page + len, count - len, "rtw_read32(0x%x)=0x%x\n", proc_get_read_addr, rtw_read32(padapter, proc_get_read_addr));
|
||||
len += snprintf(page + len, count - len, "rtw_read32(0x%x) =0x%x\n", proc_get_read_addr, rtw_read32(padapter, proc_get_read_addr));
|
||||
break;
|
||||
default:
|
||||
len += snprintf(page + len, count - len, "error read length=%d\n", proc_get_read_len);
|
||||
len += snprintf(page + len, count - len, "error read length =%d\n", proc_get_read_len);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,7 @@ int proc_get_fwstate(char *page, char **start,
|
|||
|
||||
int len = 0;
|
||||
|
||||
len += snprintf(page + len, count - len, "fwstate=0x%x\n", get_fwstate(pmlmepriv));
|
||||
len += snprintf(page + len, count - len, "fwstate =0x%x\n", get_fwstate(pmlmepriv));
|
||||
|
||||
*eof = 1;
|
||||
return len;
|
||||
|
@ -202,7 +202,7 @@ int proc_get_sec_info(char *page, char **start,
|
|||
|
||||
int len = 0;
|
||||
|
||||
len += snprintf(page + len, count - len, "auth_alg=0x%x, enc_alg=0x%x, auth_type=0x%x, enc_type=0x%x\n",
|
||||
len += snprintf(page + len, count - len, "auth_alg =0x%x, enc_alg =0x%x, auth_type =0x%x, enc_type =0x%x\n",
|
||||
psecuritypriv->dot11AuthAlgrthm, psecuritypriv->dot11PrivacyAlgrthm,
|
||||
psecuritypriv->ndisauthtype, psecuritypriv->ndisencryptstatus);
|
||||
|
||||
|
@ -221,7 +221,7 @@ int proc_get_mlmext_state(char *page, char **start,
|
|||
|
||||
int len = 0;
|
||||
|
||||
len += snprintf(page + len, count - len, "pmlmeinfo->state=0x%x\n", pmlmeinfo->state);
|
||||
len += snprintf(page + len, count - len, "pmlmeinfo->state =0x%x\n", pmlmeinfo->state);
|
||||
|
||||
*eof = 1;
|
||||
return len;
|
||||
|
@ -237,7 +237,7 @@ int proc_get_qos_option(char *page, char **start,
|
|||
|
||||
int len = 0;
|
||||
|
||||
len += snprintf(page + len, count - len, "qos_option=%d\n", pmlmepriv->qospriv.qos_option);
|
||||
len += snprintf(page + len, count - len, "qos_option =%d\n", pmlmepriv->qospriv.qos_option);
|
||||
|
||||
*eof = 1;
|
||||
return len;
|
||||
|
@ -253,7 +253,7 @@ int proc_get_ht_option(char *page, char **start,
|
|||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
|
||||
int len = 0;
|
||||
len += snprintf(page + len, count - len, "ht_option=%d\n", pmlmepriv->htpriv.ht_option);
|
||||
len += snprintf(page + len, count - len, "ht_option =%d\n", pmlmepriv->htpriv.ht_option);
|
||||
*eof = 1;
|
||||
return len;
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ int proc_get_rf_info(char *page, char **start,
|
|||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
int len = 0;
|
||||
|
||||
len += snprintf(page + len, count - len, "cur_ch=%d, cur_bw=%d, cur_ch_offet=%d\n",
|
||||
len += snprintf(page + len, count - len, "cur_ch =%d, cur_bw =%d, cur_ch_offet =%d\n",
|
||||
pmlmeext->cur_channel, pmlmeext->cur_bwmode, pmlmeext->cur_ch_offset);
|
||||
|
||||
|
||||
|
@ -295,22 +295,22 @@ int proc_get_ap_info(char *page, char **start,
|
|||
int i;
|
||||
struct recv_reorder_ctrl *preorder_ctrl;
|
||||
|
||||
len += snprintf(page + len, count - len, "SSID=%s\n", cur_network->network.Ssid.Ssid);
|
||||
len += snprintf(page + len, count - len, "SSID =%s\n", cur_network->network.Ssid.Ssid);
|
||||
len += snprintf(page + len, count - len, "sta's macaddr:" MAC_FMT "\n", MAC_ARG(psta->hwaddr));
|
||||
len += snprintf(page + len, count - len, "cur_channel=%d, cur_bwmode=%d, cur_ch_offset=%d\n", pmlmeext->cur_channel, pmlmeext->cur_bwmode, pmlmeext->cur_ch_offset);
|
||||
len += snprintf(page + len, count - len, "rtsen=%d, cts2slef=%d\n", psta->rtsen, psta->cts2self);
|
||||
len += snprintf(page + len, count - len, "state=0x%x, aid=%d, macid=%d, raid=%d\n", psta->state, psta->aid, psta->mac_id, psta->raid);
|
||||
len += snprintf(page + len, count - len, "qos_en=%d, ht_en=%d, init_rate=%d\n", psta->qos_option, psta->htpriv.ht_option, psta->init_rate);
|
||||
len += snprintf(page + len, count - len, "bwmode=%d, ch_offset=%d, sgi=%d\n", psta->htpriv.bwmode, psta->htpriv.ch_offset, psta->htpriv.sgi);
|
||||
len += snprintf(page + len, count - len, "cur_channel =%d, cur_bwmode =%d, cur_ch_offset =%d\n", pmlmeext->cur_channel, pmlmeext->cur_bwmode, pmlmeext->cur_ch_offset);
|
||||
len += snprintf(page + len, count - len, "rtsen =%d, cts2slef =%d\n", psta->rtsen, psta->cts2self);
|
||||
len += snprintf(page + len, count - len, "state =0x%x, aid =%d, macid =%d, raid =%d\n", psta->state, psta->aid, psta->mac_id, psta->raid);
|
||||
len += snprintf(page + len, count - len, "qos_en =%d, ht_en =%d, init_rate =%d\n", psta->qos_option, psta->htpriv.ht_option, psta->init_rate);
|
||||
len += snprintf(page + len, count - len, "bwmode =%d, ch_offset =%d, sgi =%d\n", psta->htpriv.bwmode, psta->htpriv.ch_offset, psta->htpriv.sgi);
|
||||
len += snprintf(page + len, count - len, "ampdu_enable = %d\n", psta->htpriv.ampdu_enable);
|
||||
len += snprintf(page + len, count - len, "agg_enable_bitmap=%x, candidate_tid_bitmap=%x\n", psta->htpriv.agg_enable_bitmap, psta->htpriv.candidate_tid_bitmap);
|
||||
len += snprintf(page + len, count - len, "agg_enable_bitmap =%x, candidate_tid_bitmap =%x\n", psta->htpriv.agg_enable_bitmap, psta->htpriv.candidate_tid_bitmap);
|
||||
|
||||
for (i=0;i<16;i++)
|
||||
for (i =0;i<16;i++)
|
||||
{
|
||||
preorder_ctrl = &psta->recvreorder_ctrl[i];
|
||||
if (preorder_ctrl->enable)
|
||||
{
|
||||
len += snprintf(page + len, count - len, "tid=%d, indicate_seq=%d\n", i, preorder_ctrl->indicate_seq);
|
||||
len += snprintf(page + len, count - len, "tid =%d, indicate_seq =%d\n", i, preorder_ctrl->indicate_seq);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -333,7 +333,7 @@ int proc_get_adapter_state(char *page, char **start,
|
|||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||
int len = 0;
|
||||
|
||||
len += snprintf(page + len, count - len, "bSurpriseRemoved=%d, bDriverStopped=%d\n",
|
||||
len += snprintf(page + len, count - len, "bSurpriseRemoved =%d, bDriverStopped =%d\n",
|
||||
padapter->bSurpriseRemoved, padapter->bDriverStopped);
|
||||
|
||||
*eof = 1;
|
||||
|
@ -353,9 +353,9 @@ int proc_get_trx_info(char *page, char **start,
|
|||
struct hw_xmit *phwxmit;
|
||||
int len = 0;
|
||||
|
||||
len += snprintf(page + len, count - len, "free_xmitbuf_cnt=%d, free_xmitframe_cnt=%d"
|
||||
", free_ext_xmitbuf_cnt=%d, free_xframe_ext_cnt=%d"
|
||||
", free_recvframe_cnt=%d\n",
|
||||
len += snprintf(page + len, count - len, "free_xmitbuf_cnt =%d, free_xmitframe_cnt =%d"
|
||||
", free_ext_xmitbuf_cnt =%d, free_xframe_ext_cnt =%d"
|
||||
", free_recvframe_cnt =%d\n",
|
||||
pxmitpriv->free_xmitbuf_cnt, pxmitpriv->free_xmitframe_cnt,
|
||||
pxmitpriv->free_xmit_extbuf_cnt, pxmitpriv->free_xframe_ext_cnt,
|
||||
precvpriv->free_recvframe_cnt);
|
||||
|
@ -363,10 +363,10 @@ int proc_get_trx_info(char *page, char **start,
|
|||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
phwxmit = pxmitpriv->hwxmits + i;
|
||||
len += snprintf(page + len, count - len, "%d, hwq.accnt=%d\n", i, phwxmit->accnt);
|
||||
len += snprintf(page + len, count - len, "%d, hwq.accnt =%d\n", i, phwxmit->accnt);
|
||||
}
|
||||
|
||||
len += snprintf(page + len, count - len, "rx_urb_pending_cn=%d\n", precvpriv->rx_pending_cnt);
|
||||
len += snprintf(page + len, count - len, "rx_urb_pending_cn =%d\n", precvpriv->rx_pending_cnt);
|
||||
*eof = 1;
|
||||
return len;
|
||||
|
||||
|
@ -379,14 +379,14 @@ int proc_get_mac_reg_dump1(char *page, char **start,
|
|||
struct net_device *dev = data;
|
||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||
int len = 0;
|
||||
int i,j=1;
|
||||
int i, j =1;
|
||||
|
||||
len += snprintf(page + len, count - len, "\n======= MAC REG =======\n");
|
||||
len += snprintf(page + len, count - len, "\n ======= MAC REG =======\n");
|
||||
|
||||
for (i=0x0;i<0x300;i+=4)
|
||||
for (i =0x0;i<0x300;i+=4)
|
||||
{
|
||||
if (j%4==1) len += snprintf(page + len, count - len,"0x%02x",i);
|
||||
len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i));
|
||||
if (j%4 ==1) len += snprintf(page + len, count - len,"0x%02x", i);
|
||||
len += snprintf(page + len, count - len," 0x%08x ", rtw_read32(padapter, i));
|
||||
if ((j++)%4 == 0) len += snprintf(page + len, count - len,"\n");
|
||||
}
|
||||
|
||||
|
@ -402,14 +402,14 @@ int proc_get_mac_reg_dump2(char *page, char **start,
|
|||
struct net_device *dev = data;
|
||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||
int len = 0;
|
||||
int i,j=1;
|
||||
int i, j =1;
|
||||
|
||||
len += snprintf(page + len, count - len, "\n======= MAC REG =======\n");
|
||||
len += snprintf(page + len, count - len, "\n ======= MAC REG =======\n");
|
||||
memset(page, 0, count);
|
||||
for (i=0x300;i<0x600;i+=4)
|
||||
for (i =0x300;i<0x600;i+=4)
|
||||
{
|
||||
if (j%4==1) len += snprintf(page + len, count - len,"0x%02x",i);
|
||||
len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i));
|
||||
if (j%4 ==1) len += snprintf(page + len, count - len,"0x%02x", i);
|
||||
len += snprintf(page + len, count - len," 0x%08x ", rtw_read32(padapter, i));
|
||||
if ((j++)%4 == 0) len += snprintf(page + len, count - len,"\n");
|
||||
}
|
||||
|
||||
|
@ -425,14 +425,14 @@ int proc_get_mac_reg_dump3(char *page, char **start,
|
|||
struct net_device *dev = data;
|
||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||
int len = 0;
|
||||
int i,j=1;
|
||||
int i, j =1;
|
||||
|
||||
len += snprintf(page + len, count - len, "\n======= MAC REG =======\n");
|
||||
len += snprintf(page + len, count - len, "\n ======= MAC REG =======\n");
|
||||
|
||||
for (i=0x600;i<0x800;i+=4)
|
||||
for (i =0x600;i<0x800;i+=4)
|
||||
{
|
||||
if (j%4==1) len += snprintf(page + len, count - len,"0x%02x",i);
|
||||
len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i));
|
||||
if (j%4 ==1) len += snprintf(page + len, count - len,"0x%02x", i);
|
||||
len += snprintf(page + len, count - len," 0x%08x ", rtw_read32(padapter, i));
|
||||
if ((j++)%4 == 0) len += snprintf(page + len, count - len,"\n");
|
||||
}
|
||||
|
||||
|
@ -448,13 +448,13 @@ int proc_get_bb_reg_dump1(char *page, char **start,
|
|||
struct net_device *dev = data;
|
||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||
int len = 0;
|
||||
int i,j=1;
|
||||
int i, j =1;
|
||||
|
||||
len += snprintf(page + len, count - len, "\n======= BB REG =======\n");
|
||||
for (i=0x800;i<0xB00;i+=4)
|
||||
len += snprintf(page + len, count - len, "\n ======= BB REG =======\n");
|
||||
for (i =0x800;i<0xB00;i+=4)
|
||||
{
|
||||
if (j%4==1) len += snprintf(page + len, count - len,"0x%02x",i);
|
||||
len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i));
|
||||
if (j%4 ==1) len += snprintf(page + len, count - len,"0x%02x", i);
|
||||
len += snprintf(page + len, count - len," 0x%08x ", rtw_read32(padapter, i));
|
||||
if ((j++)%4 == 0) len += snprintf(page + len, count - len,"\n");
|
||||
}
|
||||
*eof = 1;
|
||||
|
@ -468,13 +468,13 @@ int proc_get_bb_reg_dump2(char *page, char **start,
|
|||
struct net_device *dev = data;
|
||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||
int len = 0;
|
||||
int i,j=1;
|
||||
int i, j =1;
|
||||
|
||||
len += snprintf(page + len, count - len, "\n======= BB REG =======\n");
|
||||
for (i=0xB00;i<0xE00;i+=4)
|
||||
len += snprintf(page + len, count - len, "\n ======= BB REG =======\n");
|
||||
for (i =0xB00;i<0xE00;i+=4)
|
||||
{
|
||||
if (j%4==1) len += snprintf(page + len, count - len,"0x%02x",i);
|
||||
len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i));
|
||||
if (j%4 ==1) len += snprintf(page + len, count - len,"0x%02x", i);
|
||||
len += snprintf(page + len, count - len," 0x%08x ", rtw_read32(padapter, i));
|
||||
if ((j++)%4 == 0) len += snprintf(page + len, count - len,"\n");
|
||||
}
|
||||
*eof = 1;
|
||||
|
@ -488,13 +488,13 @@ int proc_get_bb_reg_dump3(char *page, char **start,
|
|||
struct net_device *dev = data;
|
||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||
int len = 0;
|
||||
int i,j=1;
|
||||
int i, j =1;
|
||||
|
||||
len += snprintf(page + len, count - len, "\n======= BB REG =======\n");
|
||||
for (i=0xE00;i<0x1000;i+=4)
|
||||
len += snprintf(page + len, count - len, "\n ======= BB REG =======\n");
|
||||
for (i =0xE00;i<0x1000;i+=4)
|
||||
{
|
||||
if (j%4==1) len += snprintf(page + len, count - len,"0x%02x",i);
|
||||
len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i));
|
||||
if (j%4 ==1) len += snprintf(page + len, count - len,"0x%02x", i);
|
||||
len += snprintf(page + len, count - len," 0x%08x ", rtw_read32(padapter, i));
|
||||
if ((j++)%4 == 0) len += snprintf(page + len, count - len,"\n");
|
||||
}
|
||||
*eof = 1;
|
||||
|
@ -508,19 +508,19 @@ int proc_get_rf_reg_dump1(char *page, char **start,
|
|||
struct net_device *dev = data;
|
||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||
int len = 0;
|
||||
int i,j=1,path;
|
||||
int i, j =1, path;
|
||||
u32 value;
|
||||
|
||||
len += snprintf(page + len, count - len, "\n======= RF REG =======\n");
|
||||
len += snprintf(page + len, count - len, "\n ======= RF REG =======\n");
|
||||
path = 1;
|
||||
len += snprintf(page + len, count - len, "\nRF_Path(%x)\n",path);
|
||||
for (i=0;i<0xC0;i++)
|
||||
len += snprintf(page + len, count - len, "\nRF_Path(%x)\n", path);
|
||||
for (i =0;i<0xC0;i++)
|
||||
{
|
||||
/* value = PHY_QueryRFReg(padapter, (RF90_RADIO_PATH_E)path,i, bMaskDWord); */
|
||||
/* value = PHY_QueryRFReg(padapter, (RF90_RADIO_PATH_E)path, i, bMaskDWord); */
|
||||
value = rtw_hal_read_rfreg(padapter, path, i, 0xffffffff);
|
||||
if (j%4==1) len += snprintf(page + len, count - len, "0x%02x ",i);
|
||||
len += snprintf(page + len, count - len, " 0x%08x ",value);
|
||||
if ((j++)%4==0) len += snprintf(page + len, count - len, "\n");
|
||||
if (j%4 ==1) len += snprintf(page + len, count - len, "0x%02x ", i);
|
||||
len += snprintf(page + len, count - len, " 0x%08x ", value);
|
||||
if ((j++)%4 ==0) len += snprintf(page + len, count - len, "\n");
|
||||
}
|
||||
|
||||
*eof = 1;
|
||||
|
@ -535,19 +535,19 @@ int proc_get_rf_reg_dump2(char *page, char **start,
|
|||
struct net_device *dev = data;
|
||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||
int len = 0;
|
||||
int i,j=1,path;
|
||||
int i, j =1, path;
|
||||
u32 value;
|
||||
|
||||
len += snprintf(page + len, count - len, "\n======= RF REG =======\n");
|
||||
len += snprintf(page + len, count - len, "\n ======= RF REG =======\n");
|
||||
path = 1;
|
||||
len += snprintf(page + len, count - len, "\nRF_Path(%x)\n",path);
|
||||
for (i=0xC0;i<0x100;i++)
|
||||
len += snprintf(page + len, count - len, "\nRF_Path(%x)\n", path);
|
||||
for (i =0xC0;i<0x100;i++)
|
||||
{
|
||||
/* value = PHY_QueryRFReg(padapter, (RF90_RADIO_PATH_E)path,i, bMaskDWord); */
|
||||
/* value = PHY_QueryRFReg(padapter, (RF90_RADIO_PATH_E)path, i, bMaskDWord); */
|
||||
value = rtw_hal_read_rfreg(padapter, path, i, 0xffffffff);
|
||||
if (j%4==1) len += snprintf(page + len, count - len, "0x%02x ",i);
|
||||
len += snprintf(page + len, count - len, " 0x%08x ",value);
|
||||
if ((j++)%4==0) len += snprintf(page + len, count - len, "\n");
|
||||
if (j%4 ==1) len += snprintf(page + len, count - len, "0x%02x ", i);
|
||||
len += snprintf(page + len, count - len, " 0x%08x ", value);
|
||||
if ((j++)%4 ==0) len += snprintf(page + len, count - len, "\n");
|
||||
}
|
||||
*eof = 1;
|
||||
return len;
|
||||
|
@ -561,19 +561,19 @@ int proc_get_rf_reg_dump3(char *page, char **start,
|
|||
struct net_device *dev = data;
|
||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||
int len = 0;
|
||||
int i,j=1,path;
|
||||
int i, j =1, path;
|
||||
u32 value;
|
||||
|
||||
len += snprintf(page + len, count - len, "\n======= RF REG =======\n");
|
||||
len += snprintf(page + len, count - len, "\n ======= RF REG =======\n");
|
||||
path = 2;
|
||||
len += snprintf(page + len, count - len, "\nRF_Path(%x)\n",path);
|
||||
for (i=0;i<0xC0;i++)
|
||||
len += snprintf(page + len, count - len, "\nRF_Path(%x)\n", path);
|
||||
for (i =0;i<0xC0;i++)
|
||||
{
|
||||
/* value = PHY_QueryRFReg(padapter, (RF90_RADIO_PATH_E)path,i, bMaskDWord); */
|
||||
/* value = PHY_QueryRFReg(padapter, (RF90_RADIO_PATH_E)path, i, bMaskDWord); */
|
||||
value = rtw_hal_read_rfreg(padapter, path, i, 0xffffffff);
|
||||
if (j%4==1) len += snprintf(page + len, count - len, "0x%02x ",i);
|
||||
len += snprintf(page + len, count - len, " 0x%08x ",value);
|
||||
if ((j++)%4==0) len += snprintf(page + len, count - len, "\n");
|
||||
if (j%4 ==1) len += snprintf(page + len, count - len, "0x%02x ", i);
|
||||
len += snprintf(page + len, count - len, " 0x%08x ", value);
|
||||
if ((j++)%4 ==0) len += snprintf(page + len, count - len, "\n");
|
||||
}
|
||||
|
||||
*eof = 1;
|
||||
|
@ -588,19 +588,19 @@ int proc_get_rf_reg_dump4(char *page, char **start,
|
|||
struct net_device *dev = data;
|
||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||
int len = 0;
|
||||
int i,j=1,path;
|
||||
int i, j =1, path;
|
||||
u32 value;
|
||||
|
||||
len += snprintf(page + len, count - len, "\n======= RF REG =======\n");
|
||||
len += snprintf(page + len, count - len, "\n ======= RF REG =======\n");
|
||||
path = 2;
|
||||
len += snprintf(page + len, count - len, "\nRF_Path(%x)\n",path);
|
||||
for (i=0xC0;i<0x100;i++)
|
||||
len += snprintf(page + len, count - len, "\nRF_Path(%x)\n", path);
|
||||
for (i =0xC0;i<0x100;i++)
|
||||
{
|
||||
/* value = PHY_QueryRFReg(padapter, (RF90_RADIO_PATH_E)path,i, bMaskDWord); */
|
||||
/* value = PHY_QueryRFReg(padapter, (RF90_RADIO_PATH_E)path, i, bMaskDWord); */
|
||||
value = rtw_hal_read_rfreg(padapter, path, i, 0xffffffff);
|
||||
if (j%4==1) len += snprintf(page + len, count - len, "0x%02x ",i);
|
||||
len += snprintf(page + len, count - len, " 0x%08x ",value);
|
||||
if ((j++)%4==0) len += snprintf(page + len, count - len, "\n");
|
||||
if (j%4 ==1) len += snprintf(page + len, count - len, "0x%02x ", i);
|
||||
len += snprintf(page + len, count - len, " 0x%08x ", value);
|
||||
if ((j++)%4 ==0) len += snprintf(page + len, count - len, "\n");
|
||||
}
|
||||
*eof = 1;
|
||||
return len;
|
||||
|
@ -650,7 +650,7 @@ int proc_set_rx_signal(struct file *file, const char __user *buffer,
|
|||
|
||||
int num = sscanf(tmp, "%u %u", &is_signal_dbg, &signal_strength);
|
||||
|
||||
is_signal_dbg = is_signal_dbg==0?0:1;
|
||||
is_signal_dbg = is_signal_dbg ==0?0:1;
|
||||
|
||||
if (is_signal_dbg && num!=2)
|
||||
return count;
|
||||
|
@ -658,7 +658,7 @@ int proc_set_rx_signal(struct file *file, const char __user *buffer,
|
|||
signal_strength = signal_strength>100?100:signal_strength;
|
||||
|
||||
padapter->recvpriv.is_signal_dbg = is_signal_dbg;
|
||||
padapter->recvpriv.signal_strength_dbg=signal_strength;
|
||||
padapter->recvpriv.signal_strength_dbg =signal_strength;
|
||||
|
||||
if (is_signal_dbg)
|
||||
DBG_871X("set %s %u\n", "DBG_SIGNAL_STRENGTH", signal_strength);
|
||||
|
@ -709,8 +709,8 @@ int proc_set_ht_enable(struct file *file, const char __user *buffer,
|
|||
|
||||
if ( pregpriv && mode >= 0 && mode < 2 )
|
||||
{
|
||||
pregpriv->ht_enable= mode;
|
||||
printk("ht_enable=%d\n", pregpriv->ht_enable);
|
||||
pregpriv->ht_enable = mode;
|
||||
printk("ht_enable =%d\n", pregpriv->ht_enable);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -757,8 +757,8 @@ int proc_set_cbw40_enable(struct file *file, const char __user *buffer,
|
|||
if ( pregpriv && mode >= 0 && mode < 2 )
|
||||
{
|
||||
|
||||
pregpriv->cbw40_enable= mode;
|
||||
printk("cbw40_enable=%d\n", mode);
|
||||
pregpriv->cbw40_enable = mode;
|
||||
printk("cbw40_enable =%d\n", mode);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -805,8 +805,8 @@ int proc_set_ampdu_enable(struct file *file, const char __user *buffer,
|
|||
|
||||
if ( pregpriv && mode >= 0 && mode < 3 )
|
||||
{
|
||||
pregpriv->ampdu_enable= mode;
|
||||
printk("ampdu_enable=%d\n", mode);
|
||||
pregpriv->ampdu_enable = mode;
|
||||
printk("ampdu_enable =%d\n", mode);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -873,8 +873,8 @@ int proc_set_rx_stbc(struct file *file, const char __user *buffer,
|
|||
|
||||
if ( pregpriv && (mode == 0 || mode == 1|| mode == 2|| mode == 3))
|
||||
{
|
||||
pregpriv->rx_stbc= mode;
|
||||
printk("rx_stbc=%d\n", mode);
|
||||
pregpriv->rx_stbc = mode;
|
||||
printk("rx_stbc =%d\n", mode);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -896,7 +896,7 @@ int proc_set_rssi_disp(struct file *file, const char __user *buffer,
|
|||
struct net_device *dev = (struct net_device *)data;
|
||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||
char tmp[32];
|
||||
u32 enable=0;
|
||||
u32 enable =0;
|
||||
|
||||
if (count < 1)
|
||||
{
|
||||
|
@ -947,11 +947,11 @@ int proc_get_all_sta_info(char *page, char **start,
|
|||
int len = 0;
|
||||
|
||||
|
||||
len += snprintf(page + len, count - len, "sta_dz_bitmap=0x%x, tim_bitmap=0x%x\n", pstapriv->sta_dz_bitmap, pstapriv->tim_bitmap);
|
||||
len += snprintf(page + len, count - len, "sta_dz_bitmap =0x%x, tim_bitmap =0x%x\n", pstapriv->sta_dz_bitmap, pstapriv->tim_bitmap);
|
||||
|
||||
spin_lock_bh(&pstapriv->sta_hash_lock);
|
||||
|
||||
for (i=0; i< NUM_STA; i++)
|
||||
for (i =0; i< NUM_STA; i++)
|
||||
{
|
||||
phead = &(pstapriv->sta_hash[i]);
|
||||
plist = get_next(phead);
|
||||
|
@ -965,27 +965,27 @@ int proc_get_all_sta_info(char *page, char **start,
|
|||
/* if (extra_arg == psta->aid) */
|
||||
{
|
||||
len += snprintf(page + len, count - len, "sta's macaddr:" MAC_FMT "\n", MAC_ARG(psta->hwaddr));
|
||||
len += snprintf(page + len, count - len, "rtsen=%d, cts2slef=%d\n", psta->rtsen, psta->cts2self);
|
||||
len += snprintf(page + len, count - len, "state=0x%x, aid=%d, macid=%d, raid=%d\n", psta->state, psta->aid, psta->mac_id, psta->raid);
|
||||
len += snprintf(page + len, count - len, "qos_en=%d, ht_en=%d, init_rate=%d\n", psta->qos_option, psta->htpriv.ht_option, psta->init_rate);
|
||||
len += snprintf(page + len, count - len, "bwmode=%d, ch_offset=%d, sgi=%d\n", psta->htpriv.bwmode, psta->htpriv.ch_offset, psta->htpriv.sgi);
|
||||
len += snprintf(page + len, count - len, "rtsen =%d, cts2slef =%d\n", psta->rtsen, psta->cts2self);
|
||||
len += snprintf(page + len, count - len, "state =0x%x, aid =%d, macid =%d, raid =%d\n", psta->state, psta->aid, psta->mac_id, psta->raid);
|
||||
len += snprintf(page + len, count - len, "qos_en =%d, ht_en =%d, init_rate =%d\n", psta->qos_option, psta->htpriv.ht_option, psta->init_rate);
|
||||
len += snprintf(page + len, count - len, "bwmode =%d, ch_offset =%d, sgi =%d\n", psta->htpriv.bwmode, psta->htpriv.ch_offset, psta->htpriv.sgi);
|
||||
len += snprintf(page + len, count - len, "ampdu_enable = %d\n", psta->htpriv.ampdu_enable);
|
||||
len += snprintf(page + len, count - len, "agg_enable_bitmap=%x, candidate_tid_bitmap=%x\n", psta->htpriv.agg_enable_bitmap, psta->htpriv.candidate_tid_bitmap);
|
||||
len += snprintf(page + len, count - len, "sleepq_len=%d\n", psta->sleepq_len);
|
||||
len += snprintf(page + len, count - len, "capability=0x%x\n", psta->capability);
|
||||
len += snprintf(page + len, count - len, "flags=0x%x\n", psta->flags);
|
||||
len += snprintf(page + len, count - len, "wpa_psk=0x%x\n", psta->wpa_psk);
|
||||
len += snprintf(page + len, count - len, "wpa2_group_cipher=0x%x\n", psta->wpa2_group_cipher);
|
||||
len += snprintf(page + len, count - len, "wpa2_pairwise_cipher=0x%x\n", psta->wpa2_pairwise_cipher);
|
||||
len += snprintf(page + len, count - len, "qos_info=0x%x\n", psta->qos_info);
|
||||
len += snprintf(page + len, count - len, "dot118021XPrivacy=0x%x\n", psta->dot118021XPrivacy);
|
||||
len += snprintf(page + len, count - len, "agg_enable_bitmap =%x, candidate_tid_bitmap =%x\n", psta->htpriv.agg_enable_bitmap, psta->htpriv.candidate_tid_bitmap);
|
||||
len += snprintf(page + len, count - len, "sleepq_len =%d\n", psta->sleepq_len);
|
||||
len += snprintf(page + len, count - len, "capability =0x%x\n", psta->capability);
|
||||
len += snprintf(page + len, count - len, "flags =0x%x\n", psta->flags);
|
||||
len += snprintf(page + len, count - len, "wpa_psk =0x%x\n", psta->wpa_psk);
|
||||
len += snprintf(page + len, count - len, "wpa2_group_cipher =0x%x\n", psta->wpa2_group_cipher);
|
||||
len += snprintf(page + len, count - len, "wpa2_pairwise_cipher =0x%x\n", psta->wpa2_pairwise_cipher);
|
||||
len += snprintf(page + len, count - len, "qos_info =0x%x\n", psta->qos_info);
|
||||
len += snprintf(page + len, count - len, "dot118021XPrivacy =0x%x\n", psta->dot118021XPrivacy);
|
||||
|
||||
for (j=0;j<16;j++)
|
||||
for (j =0;j<16;j++)
|
||||
{
|
||||
preorder_ctrl = &psta->recvreorder_ctrl[j];
|
||||
if (preorder_ctrl->enable)
|
||||
{
|
||||
len += snprintf(page + len, count - len, "tid=%d, indicate_seq=%d\n", j, preorder_ctrl->indicate_seq);
|
||||
len += snprintf(page + len, count - len, "tid =%d, indicate_seq =%d\n", j, preorder_ctrl->indicate_seq);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1015,14 +1015,14 @@ int proc_get_best_channel(char *page, char **start,
|
|||
int len = 0;
|
||||
u32 i, best_channel_24G = 1, best_channel_5G = 36, index_24G = 0, index_5G = 0;
|
||||
|
||||
for (i=0; pmlmeext->channel_set[i].ChannelNum !=0; i++) {
|
||||
for (i =0; pmlmeext->channel_set[i].ChannelNum !=0; i++) {
|
||||
if ( pmlmeext->channel_set[i].ChannelNum == 1)
|
||||
index_24G = i;
|
||||
if ( pmlmeext->channel_set[i].ChannelNum == 36)
|
||||
index_5G = i;
|
||||
}
|
||||
|
||||
for (i=0; pmlmeext->channel_set[i].ChannelNum !=0; i++) {
|
||||
for (i =0; pmlmeext->channel_set[i].ChannelNum !=0; i++) {
|
||||
/* 2.4G */
|
||||
if ( pmlmeext->channel_set[i].ChannelNum == 6 ) {
|
||||
if ( pmlmeext->channel_set[i].rx_count < pmlmeext->channel_set[index_24G].rx_count ) {
|
||||
|
@ -1131,8 +1131,8 @@ int proc_set_btcoex_dbg(struct file *file, const char __user *buffer,
|
|||
|
||||
if ( pregpriv && (mode == 0 || mode == 1|| mode == 2|| mode == 3))
|
||||
{
|
||||
BTCoexDbgLevel= mode;
|
||||
printk("btcoex_dbg=%d\n", BTCoexDbgLevel);
|
||||
BTCoexDbgLevel = mode;
|
||||
printk("btcoex_dbg =%d\n", BTCoexDbgLevel);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,18 +28,18 @@
|
|||
|
||||
|
||||
/*------------------------Define local variable------------------------------*/
|
||||
u8 fakeEfuseBank=0;
|
||||
u32 fakeEfuseUsedBytes=0;
|
||||
u8 fakeEfuseBank =0;
|
||||
u32 fakeEfuseUsedBytes =0;
|
||||
u8 fakeEfuseContent[EFUSE_MAX_HW_SIZE]={0};
|
||||
u8 fakeEfuseInitMap[EFUSE_MAX_MAP_LEN]={0};
|
||||
u8 fakeEfuseModifiedMap[EFUSE_MAX_MAP_LEN]={0};
|
||||
|
||||
u32 BTEfuseUsedBytes=0;
|
||||
u32 BTEfuseUsedBytes =0;
|
||||
u8 BTEfuseContent[EFUSE_MAX_BT_BANK][EFUSE_MAX_HW_SIZE];
|
||||
u8 BTEfuseInitMap[EFUSE_BT_MAX_MAP_LEN]={0};
|
||||
u8 BTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN]={0};
|
||||
|
||||
u32 fakeBTEfuseUsedBytes=0;
|
||||
u32 fakeBTEfuseUsedBytes =0;
|
||||
u8 fakeBTEfuseContent[EFUSE_MAX_BT_BANK][EFUSE_MAX_HW_SIZE];
|
||||
u8 fakeBTEfuseInitMap[EFUSE_BT_MAX_MAP_LEN]={0};
|
||||
u8 fakeBTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN]={0};
|
||||
|
@ -146,7 +146,7 @@ Efuse_GetCurrentSize(
|
|||
u8 efuseType,
|
||||
bool bPseudoTest)
|
||||
{
|
||||
u16 ret=0;
|
||||
u16 ret =0;
|
||||
|
||||
ret = pAdapter->HalFunc.EfuseGetCurrentSize(pAdapter, efuseType, bPseudoTest);
|
||||
|
||||
|
@ -186,7 +186,7 @@ ReadEFuseByte(
|
|||
u32 value32;
|
||||
u8 readbyte;
|
||||
u16 retry;
|
||||
/* u32 start=rtw_get_current_time(); */
|
||||
/* u32 start =rtw_get_current_time(); */
|
||||
|
||||
if (bPseudoTest)
|
||||
{
|
||||
|
@ -221,7 +221,7 @@ ReadEFuseByte(
|
|||
value32 = rtw_read32(Adapter, EFUSE_CTRL);
|
||||
|
||||
*pbuf = (u8)(value32 & 0xff);
|
||||
/* DBG_871X("ReadEFuseByte _offset:%08u, in %d ms\n",_offset ,rtw_get_passing_time_ms(start)); */
|
||||
/* DBG_871X("ReadEFuseByte _offset:%08u, in %d ms\n", _offset , rtw_get_passing_time_ms(start)); */
|
||||
|
||||
}
|
||||
|
||||
|
@ -302,8 +302,8 @@ EFUSE_Read1Byte(
|
|||
u8 data;
|
||||
u8 Bytetemp = {0x00};
|
||||
u8 temp = {0x00};
|
||||
u32 k=0;
|
||||
u16 contentLen=0;
|
||||
u32 k =0;
|
||||
u16 contentLen =0;
|
||||
|
||||
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI , TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&contentLen, false);
|
||||
|
||||
|
@ -328,13 +328,13 @@ EFUSE_Read1Byte(
|
|||
{
|
||||
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
|
||||
k++;
|
||||
if (k==1000)
|
||||
if (k ==1000)
|
||||
{
|
||||
k=0;
|
||||
k =0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
data=rtw_read8(Adapter, EFUSE_CTRL);
|
||||
data =rtw_read8(Adapter, EFUSE_CTRL);
|
||||
return data;
|
||||
}
|
||||
else
|
||||
|
@ -372,10 +372,10 @@ EFUSE_Write1Byte(
|
|||
{
|
||||
u8 Bytetemp = {0x00};
|
||||
u8 temp = {0x00};
|
||||
u32 k=0;
|
||||
u16 contentLen=0;
|
||||
u32 k =0;
|
||||
u16 contentLen =0;
|
||||
|
||||
/* RT_TRACE(COMP_EFUSE, DBG_LOUD, ("Addr=%x Data =%x\n", Address, Value)); */
|
||||
/* RT_TRACE(COMP_EFUSE, DBG_LOUD, ("Addr =%x Data =%x\n", Address, Value)); */
|
||||
EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI , TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&contentLen, false);
|
||||
|
||||
if ( Address < contentLen) /* E-fuse 512Byte */
|
||||
|
@ -402,9 +402,9 @@ EFUSE_Write1Byte(
|
|||
{
|
||||
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
|
||||
k++;
|
||||
if (k==100)
|
||||
if (k ==100)
|
||||
{
|
||||
k=0;
|
||||
k =0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ efuse_OneByteRead(
|
|||
}
|
||||
if (tmpidx<100)
|
||||
{
|
||||
*data=rtw_read8(pAdapter, EFUSE_CTRL);
|
||||
*data =rtw_read8(pAdapter, EFUSE_CTRL);
|
||||
bResult = true;
|
||||
}
|
||||
else
|
||||
|
@ -468,7 +468,7 @@ efuse_OneByteWrite(
|
|||
bResult = Efuse_Write1ByteToFakeContent(pAdapter, addr, data);
|
||||
return bResult;
|
||||
}
|
||||
/* RT_TRACE(COMP_EFUSE, DBG_LOUD, ("Addr = %x Data=%x\n", addr, data)); */
|
||||
/* RT_TRACE(COMP_EFUSE, DBG_LOUD, ("Addr = %x Data =%x\n", addr, data)); */
|
||||
|
||||
/* return 0; */
|
||||
|
||||
|
@ -503,7 +503,7 @@ Efuse_PgPacketRead( struct adapter *pAdapter,
|
|||
u8 *data,
|
||||
bool bPseudoTest)
|
||||
{
|
||||
int ret=0;
|
||||
int ret =0;
|
||||
|
||||
ret = pAdapter->HalFunc.Efuse_PgPacketRead(pAdapter, offset, data, bPseudoTest);
|
||||
|
||||
|
@ -591,7 +591,7 @@ Efuse_WordEnableDataWrite( struct adapter *pAdapter,
|
|||
u8 *data,
|
||||
bool bPseudoTest)
|
||||
{
|
||||
u8 ret=0;
|
||||
u8 ret =0;
|
||||
|
||||
ret = pAdapter->HalFunc.Efuse_WordEnableDataWrite(pAdapter, efuse_addr, word_en, data, bPseudoTest);
|
||||
|
||||
|
@ -600,12 +600,12 @@ Efuse_WordEnableDataWrite( struct adapter *pAdapter,
|
|||
|
||||
static u8 efuse_read8(struct adapter *padapter, u16 address, u8 *value)
|
||||
{
|
||||
return efuse_OneByteRead(padapter,address, value, false);
|
||||
return efuse_OneByteRead(padapter, address, value, false);
|
||||
}
|
||||
|
||||
static u8 efuse_write8(struct adapter *padapter, u16 address, u8 *value)
|
||||
{
|
||||
return efuse_OneByteWrite(padapter,address, *value, false);
|
||||
return efuse_OneByteWrite(padapter, address, *value, false);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -667,7 +667,7 @@ u8 efuse_GetCurrentSize(struct adapter *padapter, u16 *size)
|
|||
/* */
|
||||
u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
|
||||
{
|
||||
u16 mapLen=0;
|
||||
u16 mapLen =0;
|
||||
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
|
||||
|
||||
|
@ -685,7 +685,7 @@ u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
|
|||
|
||||
u8 rtw_BT_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
|
||||
{
|
||||
u16 mapLen=0;
|
||||
u16 mapLen =0;
|
||||
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
|
||||
|
||||
|
@ -708,7 +708,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
|
|||
u8 newdata[PGPKT_DATA_SIZE];
|
||||
s32 i, j, idx;
|
||||
u8 ret = _SUCCESS;
|
||||
u16 mapLen=0;
|
||||
u16 mapLen =0;
|
||||
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
|
||||
|
||||
|
@ -769,12 +769,12 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
|
|||
|
||||
if (word_en != 0xF) {
|
||||
ret = Efuse_PgPacketWrite(padapter, offset, word_en, newdata, false);
|
||||
DBG_871X("offset=%x\n",offset);
|
||||
DBG_871X("word_en=%x\n",word_en);
|
||||
DBG_871X("offset =%x\n", offset);
|
||||
DBG_871X("word_en =%x\n", word_en);
|
||||
|
||||
for (i=0;i<PGPKT_DATA_SIZE;i++)
|
||||
for (i =0;i<PGPKT_DATA_SIZE;i++)
|
||||
{
|
||||
DBG_871X("data=%x \t",newdata[i]);
|
||||
DBG_871X("data =%x \t", newdata[i]);
|
||||
}
|
||||
if (ret == _FAIL) break;
|
||||
}
|
||||
|
@ -806,7 +806,7 @@ u8 rtw_BT_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data
|
|||
u8 newdata[PGPKT_DATA_SIZE];
|
||||
s32 i, j, idx;
|
||||
u8 ret = _SUCCESS;
|
||||
u16 mapLen=0;
|
||||
u16 mapLen =0;
|
||||
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
|
||||
|
||||
|
@ -867,10 +867,10 @@ u8 rtw_BT_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data
|
|||
|
||||
if (word_en != 0xF)
|
||||
{
|
||||
DBG_871X("%s: offset=%#X\n", __FUNCTION__, offset);
|
||||
DBG_871X("%s: word_en=%#X\n", __FUNCTION__, word_en);
|
||||
DBG_871X("%s: data=", __FUNCTION__);
|
||||
for (i=0; i<PGPKT_DATA_SIZE; i++)
|
||||
DBG_871X("%s: offset =%#X\n", __FUNCTION__, offset);
|
||||
DBG_871X("%s: word_en =%#X\n", __FUNCTION__, word_en);
|
||||
DBG_871X("%s: data =", __FUNCTION__);
|
||||
for (i =0; i<PGPKT_DATA_SIZE; i++)
|
||||
{
|
||||
DBG_871X("0x%02X ", newdata[i]);
|
||||
}
|
||||
|
@ -927,15 +927,15 @@ Efuse_ReadAllMap(
|
|||
u8 *Efuse,
|
||||
bool bPseudoTest)
|
||||
{
|
||||
u16 mapLen=0;
|
||||
u16 mapLen =0;
|
||||
|
||||
Efuse_PowerSwitch(pAdapter,false, true);
|
||||
Efuse_PowerSwitch(pAdapter, false, true);
|
||||
|
||||
EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, bPseudoTest);
|
||||
|
||||
efuse_ReadEFuse(pAdapter, efuseType, 0, mapLen, Efuse, bPseudoTest);
|
||||
|
||||
Efuse_PowerSwitch(pAdapter,false, false);
|
||||
Efuse_PowerSwitch(pAdapter, false, false);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
@ -1088,7 +1088,7 @@ void EFUSE_ShadowMapUpdate(
|
|||
bool bPseudoTest)
|
||||
{
|
||||
struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(pAdapter);
|
||||
u16 mapLen=0;
|
||||
u16 mapLen =0;
|
||||
|
||||
EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, bPseudoTest);
|
||||
|
||||
|
@ -1190,14 +1190,14 @@ Efuse_InitSomeVar(
|
|||
memset((void *)&fakeEfuseInitMap[0], 0xff, EFUSE_MAX_MAP_LEN);
|
||||
memset((void *)&fakeEfuseModifiedMap[0], 0xff, EFUSE_MAX_MAP_LEN);
|
||||
|
||||
for (i=0; i<EFUSE_MAX_BT_BANK; i++)
|
||||
for (i =0; i<EFUSE_MAX_BT_BANK; i++)
|
||||
{
|
||||
memset((void *)&BTEfuseContent[i][0], EFUSE_MAX_HW_SIZE, 0xff);
|
||||
}
|
||||
memset((void *)&BTEfuseInitMap[0], 0xff, EFUSE_BT_MAX_MAP_LEN);
|
||||
memset((void *)&BTEfuseModifiedMap[0], 0xff, EFUSE_BT_MAX_MAP_LEN);
|
||||
|
||||
for (i=0; i<EFUSE_MAX_BT_BANK; i++)
|
||||
for (i =0; i<EFUSE_MAX_BT_BANK; i++)
|
||||
{
|
||||
memset((void *)&fakeBTEfuseContent[i][0], 0xff, EFUSE_MAX_HW_SIZE);
|
||||
}
|
||||
|
|
|
@ -69,9 +69,9 @@ static u8 WIFI_OFDMRATES[] =
|
|||
|
||||
int rtw_get_bit_value_from_ieee_value(u8 val)
|
||||
{
|
||||
unsigned char dot11_rate_table[]={2,4,11,22,12,18,24,36,48,72,96,108,0}; /* last element must be zero!! */
|
||||
unsigned char dot11_rate_table[]={2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108, 0}; /* last element must be zero!! */
|
||||
|
||||
int i=0;
|
||||
int i =0;
|
||||
while (dot11_rate_table[i] != 0) {
|
||||
if (dot11_rate_table[i] == val)
|
||||
return BIT(i);
|
||||
|
@ -217,7 +217,7 @@ index: the information element id index, limit is the limit for search
|
|||
-----------------------------------------------------------------------------*/
|
||||
u8 *rtw_get_ie(u8 *pbuf, sint index, sint *len, sint limit)
|
||||
{
|
||||
sint tmp,i;
|
||||
sint tmp, i;
|
||||
u8 *p;
|
||||
;
|
||||
if (limit < 1){
|
||||
|
@ -472,7 +472,7 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv)
|
|||
|
||||
/* HT Cap. */
|
||||
if (((pregistrypriv->wireless_mode&WIRELESS_11_5N)||(pregistrypriv->wireless_mode&WIRELESS_11_24N))
|
||||
&& (pregistrypriv->ht_enable==true))
|
||||
&& (pregistrypriv->ht_enable ==true))
|
||||
{
|
||||
/* todo: */
|
||||
}
|
||||
|
@ -540,7 +540,7 @@ check_next_ie:
|
|||
unsigned char *rtw_get_wpa2_ie(unsigned char *pie, int *rsn_ie_len, int limit)
|
||||
{
|
||||
|
||||
return rtw_get_ie(pie, _WPA2_IE_ID_,rsn_ie_len, limit);
|
||||
return rtw_get_ie(pie, _WPA2_IE_ID_, rsn_ie_len, limit);
|
||||
|
||||
}
|
||||
|
||||
|
@ -579,7 +579,7 @@ int rtw_get_wpa2_cipher_suite(u8 *s)
|
|||
|
||||
int rtw_parse_wpa_ie(u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwise_cipher, int *is_8021x)
|
||||
{
|
||||
int i, ret=_SUCCESS;
|
||||
int i, ret =_SUCCESS;
|
||||
int left, count;
|
||||
u8 *pos;
|
||||
u8 SUITE_1X[4] = {0x00, 0x50, 0xf2, 1};
|
||||
|
@ -613,7 +613,7 @@ int rtw_parse_wpa_ie(u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwis
|
|||
}
|
||||
else if (left > 0)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("%s: ie length mismatch, %u too much", __FUNCTION__, left));
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("%s: ie length mismatch, %u too much", __FUNCTION__, left));
|
||||
|
||||
return _FAIL;
|
||||
}
|
||||
|
@ -628,7 +628,7 @@ int rtw_parse_wpa_ie(u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwis
|
|||
left -= 2;
|
||||
|
||||
if (count == 0 || left < count * WPA_SELECTOR_LEN) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("%s: ie count botch (pairwise), "
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("%s: ie count botch (pairwise), "
|
||||
"count %u left %u", __FUNCTION__, count, left));
|
||||
return _FAIL;
|
||||
}
|
||||
|
@ -644,7 +644,7 @@ int rtw_parse_wpa_ie(u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwis
|
|||
}
|
||||
else if (left == 1)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("%s: ie too short (for key mgmt)", __FUNCTION__));
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("%s: ie too short (for key mgmt)", __FUNCTION__));
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
|
@ -652,7 +652,7 @@ int rtw_parse_wpa_ie(u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwis
|
|||
if (left >= 6) {
|
||||
pos += 2;
|
||||
if (_rtw_memcmp(pos, SUITE_1X, 4) == 1) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("%s : there has 802.1x auth\n", __FUNCTION__));
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("%s : there has 802.1x auth\n", __FUNCTION__));
|
||||
*is_8021x = 1;
|
||||
}
|
||||
}
|
||||
|
@ -664,10 +664,10 @@ int rtw_parse_wpa_ie(u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwis
|
|||
|
||||
int rtw_parse_wpa2_ie(u8* rsn_ie, int rsn_ie_len, int *group_cipher, int *pairwise_cipher, int *is_8021x)
|
||||
{
|
||||
int i, ret=_SUCCESS;
|
||||
int i, ret =_SUCCESS;
|
||||
int left, count;
|
||||
u8 *pos;
|
||||
u8 SUITE_1X[4] = {0x00,0x0f, 0xac, 0x01};
|
||||
u8 SUITE_1X[4] = {0x00, 0x0f, 0xac, 0x01};
|
||||
|
||||
if (rsn_ie_len <= 0) {
|
||||
/* No RSN IE - fail silently */
|
||||
|
@ -693,7 +693,7 @@ int rtw_parse_wpa2_ie(u8* rsn_ie, int rsn_ie_len, int *group_cipher, int *pairwi
|
|||
left -= RSN_SELECTOR_LEN;
|
||||
|
||||
} else if (left > 0) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("%s: ie length mismatch, %u too much", __FUNCTION__, left));
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("%s: ie length mismatch, %u too much", __FUNCTION__, left));
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
|
@ -706,7 +706,7 @@ int rtw_parse_wpa2_ie(u8* rsn_ie, int rsn_ie_len, int *group_cipher, int *pairwi
|
|||
left -= 2;
|
||||
|
||||
if (count == 0 || left < count * RSN_SELECTOR_LEN) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("%s: ie count botch (pairwise), "
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("%s: ie count botch (pairwise), "
|
||||
"count %u left %u", __FUNCTION__, count, left));
|
||||
return _FAIL;
|
||||
}
|
||||
|
@ -722,7 +722,7 @@ int rtw_parse_wpa2_ie(u8* rsn_ie, int rsn_ie_len, int *group_cipher, int *pairwi
|
|||
}
|
||||
else if (left == 1)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("%s: ie too short (for key mgmt)", __FUNCTION__));
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("%s: ie too short (for key mgmt)", __FUNCTION__));
|
||||
|
||||
return _FAIL;
|
||||
}
|
||||
|
@ -731,7 +731,7 @@ int rtw_parse_wpa2_ie(u8* rsn_ie, int rsn_ie_len, int *group_cipher, int *pairwi
|
|||
if (left >= 6) {
|
||||
pos += 2;
|
||||
if (_rtw_memcmp(pos, SUITE_1X, 4) == 1) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("%s (): there has 802.1x auth\n", __FUNCTION__));
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("%s (): there has 802.1x auth\n", __FUNCTION__));
|
||||
*is_8021x = 1;
|
||||
}
|
||||
}
|
||||
|
@ -740,56 +740,56 @@ int rtw_parse_wpa2_ie(u8* rsn_ie, int rsn_ie_len, int *group_cipher, int *pairwi
|
|||
return ret;
|
||||
}
|
||||
|
||||
int rtw_get_sec_ie(u8 *in_ie,uint in_len,u8 *rsn_ie,u16 *rsn_len,u8 *wpa_ie,u16 *wpa_len)
|
||||
int rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie, u16 *wpa_len)
|
||||
{
|
||||
u8 authmode, sec_idx, i;
|
||||
u8 wpa_oui[4]={0x0,0x50,0xf2,0x01};
|
||||
u8 wpa_oui[4]={0x0, 0x50, 0xf2, 0x01};
|
||||
uint cnt;
|
||||
|
||||
/* Search required WPA or WPA2 IE and copy to sec_ie[ ] */
|
||||
|
||||
cnt = (_TIMESTAMP_ + _BEACON_ITERVAL_ + _CAPABILITY_);
|
||||
|
||||
sec_idx=0;
|
||||
sec_idx =0;
|
||||
|
||||
while (cnt<in_len)
|
||||
{
|
||||
authmode=in_ie[cnt];
|
||||
authmode =in_ie[cnt];
|
||||
|
||||
if ((authmode==_WPA_IE_ID_)&&(_rtw_memcmp(&in_ie[cnt+2], &wpa_oui[0],4)==true))
|
||||
if ((authmode ==_WPA_IE_ID_)&&(_rtw_memcmp(&in_ie[cnt+2], &wpa_oui[0], 4) ==true))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("\n rtw_get_wpa_ie: sec_idx=%d in_ie[cnt+1]+2=%d\n",sec_idx,in_ie[cnt+1]+2));
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("\n rtw_get_wpa_ie: sec_idx =%d in_ie[cnt+1]+2 =%d\n", sec_idx, in_ie[cnt+1]+2));
|
||||
|
||||
if (wpa_ie) {
|
||||
memcpy(wpa_ie, &in_ie[cnt],in_ie[cnt+1]+2);
|
||||
memcpy(wpa_ie, &in_ie[cnt], in_ie[cnt+1]+2);
|
||||
|
||||
for (i=0;i<(in_ie[cnt+1]+2);i=i+8){
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("\n %2x,%2x,%2x,%2x,%2x,%2x,%2x,%2x\n",
|
||||
wpa_ie[i],wpa_ie[i+1],wpa_ie[i+2],wpa_ie[i+3],wpa_ie[i+4],
|
||||
wpa_ie[i+5],wpa_ie[i+6],wpa_ie[i+7]));
|
||||
for (i =0;i<(in_ie[cnt+1]+2);i =i+8){
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("\n %2x,%2x,%2x,%2x,%2x,%2x,%2x,%2x\n",
|
||||
wpa_ie[i], wpa_ie[i+1], wpa_ie[i+2], wpa_ie[i+3], wpa_ie[i+4],
|
||||
wpa_ie[i+5], wpa_ie[i+6], wpa_ie[i+7]));
|
||||
}
|
||||
}
|
||||
|
||||
*wpa_len=in_ie[cnt+1]+2;
|
||||
*wpa_len =in_ie[cnt+1]+2;
|
||||
cnt+=in_ie[cnt+1]+2; /* get next */
|
||||
}
|
||||
else
|
||||
{
|
||||
if (authmode==_WPA2_IE_ID_)
|
||||
if (authmode ==_WPA2_IE_ID_)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("\n get_rsn_ie: sec_idx=%d in_ie[cnt+1]+2=%d\n",sec_idx,in_ie[cnt+1]+2));
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("\n get_rsn_ie: sec_idx =%d in_ie[cnt+1]+2 =%d\n", sec_idx, in_ie[cnt+1]+2));
|
||||
|
||||
if (rsn_ie) {
|
||||
memcpy(rsn_ie, &in_ie[cnt],in_ie[cnt+1]+2);
|
||||
memcpy(rsn_ie, &in_ie[cnt], in_ie[cnt+1]+2);
|
||||
|
||||
for (i=0;i<(in_ie[cnt+1]+2);i=i+8){
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("\n %2x,%2x,%2x,%2x,%2x,%2x,%2x,%2x\n",
|
||||
rsn_ie[i],rsn_ie[i+1],rsn_ie[i+2],rsn_ie[i+3],rsn_ie[i+4],
|
||||
rsn_ie[i+5],rsn_ie[i+6],rsn_ie[i+7]));
|
||||
for (i =0;i<(in_ie[cnt+1]+2);i =i+8){
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("\n %2x,%2x,%2x,%2x,%2x,%2x,%2x,%2x\n",
|
||||
rsn_ie[i], rsn_ie[i+1], rsn_ie[i+2], rsn_ie[i+3], rsn_ie[i+4],
|
||||
rsn_ie[i+5], rsn_ie[i+6], rsn_ie[i+7]));
|
||||
}
|
||||
}
|
||||
|
||||
*rsn_len=in_ie[cnt+1]+2;
|
||||
*rsn_len =in_ie[cnt+1]+2;
|
||||
cnt+=in_ie[cnt+1]+2; /* get next */
|
||||
}
|
||||
else
|
||||
|
@ -809,17 +809,17 @@ int rtw_get_sec_ie(u8 *in_ie,uint in_len,u8 *rsn_ie,u16 *rsn_len,u8 *wpa_ie,u16
|
|||
u8 rtw_is_wps_ie(u8 *ie_ptr, uint *wps_ielen)
|
||||
{
|
||||
u8 match = false;
|
||||
u8 eid, wps_oui[4]={0x0,0x50,0xf2,0x04};
|
||||
u8 eid, wps_oui[4]={0x0, 0x50, 0xf2, 0x04};
|
||||
|
||||
if (ie_ptr == NULL) return match;
|
||||
|
||||
eid = ie_ptr[0];
|
||||
|
||||
if ((eid==_WPA_IE_ID_)&&(_rtw_memcmp(&ie_ptr[2], wps_oui, 4)==true))
|
||||
if ((eid ==_WPA_IE_ID_)&&(_rtw_memcmp(&ie_ptr[2], wps_oui, 4) ==true))
|
||||
{
|
||||
/* DBG_8192C("==> found WPS_IE.....\n"); */
|
||||
*wps_ielen = ie_ptr[1]+2;
|
||||
match=true;
|
||||
match =true;
|
||||
}
|
||||
return match;
|
||||
}
|
||||
|
@ -858,8 +858,8 @@ u8 *rtw_get_wps_ie_from_scan_queue(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps
|
|||
u8 *rtw_get_wps_ie(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen)
|
||||
{
|
||||
uint cnt;
|
||||
u8 *wpsie_ptr=NULL;
|
||||
u8 eid, wps_oui[4]={0x0,0x50,0xf2,0x04};
|
||||
u8 *wpsie_ptr =NULL;
|
||||
u8 eid, wps_oui[4]={0x0, 0x50, 0xf2, 0x04};
|
||||
|
||||
if (wps_ielen)
|
||||
*wps_ielen = 0;
|
||||
|
@ -873,7 +873,7 @@ u8 *rtw_get_wps_ie(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen)
|
|||
{
|
||||
eid = in_ie[cnt];
|
||||
|
||||
if ((eid==_WPA_IE_ID_)&&(_rtw_memcmp(&in_ie[cnt+2], wps_oui, 4)==true))
|
||||
if ((eid ==_WPA_IE_ID_)&&(_rtw_memcmp(&in_ie[cnt+2], wps_oui, 4) ==true))
|
||||
{
|
||||
wpsie_ptr = &in_ie[cnt];
|
||||
|
||||
|
@ -907,11 +907,11 @@ u8 *rtw_get_wps_ie(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen)
|
|||
*
|
||||
* Returns: the address of the specific WPS attribute found, or NULL
|
||||
*/
|
||||
u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 *buf_attr, u32 *len_attr)
|
||||
u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id , u8 *buf_attr, u32 *len_attr)
|
||||
{
|
||||
u8 *attr_ptr = NULL;
|
||||
u8 * target_attr_ptr = NULL;
|
||||
u8 wps_oui[4]={0x00,0x50,0xF2,0x04};
|
||||
u8 wps_oui[4]={0x00, 0x50, 0xF2, 0x04};
|
||||
|
||||
if (len_attr)
|
||||
*len_attr = 0;
|
||||
|
@ -965,7 +965,7 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 *buf_att
|
|||
*
|
||||
* Returns: the address of the specific WPS attribute content found, or NULL
|
||||
*/
|
||||
u8 *rtw_get_wps_attr_content(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 *buf_content, uint *len_content)
|
||||
u8 *rtw_get_wps_attr_content(u8 *wps_ie, uint wps_ielen, u16 target_attr_id , u8 *buf_content, uint *len_content)
|
||||
{
|
||||
u8 *attr_ptr;
|
||||
u32 attr_len;
|
||||
|
@ -1001,7 +1001,7 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
|
|||
if (elen < 4) {
|
||||
if (show_errors) {
|
||||
DBG_871X("short vendor specific "
|
||||
"information element ignored (len=%lu)\n",
|
||||
"information element ignored (len =%lu)\n",
|
||||
(unsigned long) elen);
|
||||
}
|
||||
return -1;
|
||||
|
@ -1023,7 +1023,7 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
|
|||
if (elen < 5) {
|
||||
DBG_871X("short WME "
|
||||
"information element ignored "
|
||||
"(len=%lu)\n",
|
||||
"(len =%lu)\n",
|
||||
(unsigned long) elen);
|
||||
return -1;
|
||||
}
|
||||
|
@ -1040,7 +1040,7 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
|
|||
default:
|
||||
DBG_871X("unknown WME "
|
||||
"information element ignored "
|
||||
"(subtype=%d len=%lu)\n",
|
||||
"(subtype =%d len =%lu)\n",
|
||||
pos[4], (unsigned long) elen);
|
||||
return -1;
|
||||
}
|
||||
|
@ -1053,7 +1053,7 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
|
|||
default:
|
||||
DBG_871X("Unknown Microsoft "
|
||||
"information element ignored "
|
||||
"(type=%d len=%lu)\n",
|
||||
"(type =%d len =%lu)\n",
|
||||
pos[3], (unsigned long) elen);
|
||||
return -1;
|
||||
}
|
||||
|
@ -1068,7 +1068,7 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
|
|||
default:
|
||||
DBG_871X("Unknown Broadcom "
|
||||
"information element ignored "
|
||||
"(type=%d len=%lu)\n",
|
||||
"(type =%d len =%lu)\n",
|
||||
pos[3], (unsigned long) elen);
|
||||
return -1;
|
||||
}
|
||||
|
@ -1077,7 +1077,7 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
|
|||
default:
|
||||
DBG_871X("unknown vendor specific information "
|
||||
"element ignored (vendor OUI %02x:%02x:%02x "
|
||||
"len=%lu)\n",
|
||||
"len =%lu)\n",
|
||||
pos[0], pos[1], pos[2], (unsigned long) elen);
|
||||
return -1;
|
||||
}
|
||||
|
@ -1114,8 +1114,8 @@ enum ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
|
|||
if (elen > left) {
|
||||
if (show_errors) {
|
||||
DBG_871X("IEEE 802.11 element "
|
||||
"parse failed (id=%d elen=%d "
|
||||
"left=%lu)\n",
|
||||
"parse failed (id =%d elen =%d "
|
||||
"left =%lu)\n",
|
||||
id, elen, (unsigned long) left);
|
||||
}
|
||||
return ParseFailed;
|
||||
|
@ -1205,7 +1205,7 @@ enum ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
|
|||
if (!show_errors)
|
||||
break;
|
||||
DBG_871X("IEEE 802.11 element parse "
|
||||
"ignored unknown element (id=%d elen=%d)\n",
|
||||
"ignored unknown element (id =%d elen =%d)\n",
|
||||
id, elen);
|
||||
break;
|
||||
}
|
||||
|
@ -1258,7 +1258,7 @@ void rtw_macaddr_cfg(u8 *mac_addr)
|
|||
|
||||
if ( rtw_initmac )
|
||||
{ /* Users specify the mac address */
|
||||
int jj,kk;
|
||||
int jj, kk;
|
||||
|
||||
for ( jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3 )
|
||||
{
|
||||
|
@ -1347,8 +1347,8 @@ u32 rtw_get_p2p_merged_ies_len(u8 *in_ie, u32 in_len)
|
|||
{
|
||||
struct ndis_802_11_variable_ies * pIE;
|
||||
u8 OUI[4] = { 0x50, 0x6f, 0x9a, 0x09 };
|
||||
int i=0;
|
||||
int j=0, len=0;
|
||||
int i =0;
|
||||
int j =0, len =0;
|
||||
|
||||
while ( i < in_len)
|
||||
{
|
||||
|
@ -1378,7 +1378,7 @@ int rtw_p2p_merge_ies(u8 *in_ie, u32 in_len, u8 *merge_ie)
|
|||
u8 len = 0;
|
||||
u8 OUI[4] = { 0x50, 0x6f, 0x9a, 0x09 };
|
||||
u8 ELOUI[6] = { 0xDD, 0x00, 0x50, 0x6f, 0x9a, 0x09 }; /* EID;Len;OUI, Len would copy at the end of function */
|
||||
int i=0;
|
||||
int i =0;
|
||||
|
||||
if ( merge_ie != NULL)
|
||||
{
|
||||
|
@ -1466,7 +1466,7 @@ u8 *rtw_get_p2p_ie(u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen)
|
|||
{
|
||||
uint cnt = 0;
|
||||
u8 *p2p_ie_ptr;
|
||||
u8 eid, p2p_oui[4]={0x50,0x6F,0x9A,0x09};
|
||||
u8 eid, p2p_oui[4]={0x50, 0x6F, 0x9A, 0x09};
|
||||
|
||||
if ( p2p_ielen != NULL )
|
||||
*p2p_ielen = 0;
|
||||
|
@ -1517,11 +1517,11 @@ u8 *rtw_get_p2p_ie(u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen)
|
|||
*
|
||||
* Returns: the address of the specific WPS attribute found, or NULL
|
||||
*/
|
||||
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 *attr_ptr = NULL;
|
||||
u8 *target_attr_ptr = NULL;
|
||||
u8 p2p_oui[4]={0x50,0x6F,0x9A,0x09};
|
||||
u8 p2p_oui[4]={0x50, 0x6F, 0x9A, 0x09};
|
||||
|
||||
if (len_attr)
|
||||
*len_attr = 0;
|
||||
|
@ -1575,7 +1575,7 @@ u8 *rtw_get_p2p_attr(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id ,u8 *buf_attr
|
|||
*
|
||||
* Returns: the address of the specific P2P attribute content found, or NULL
|
||||
*/
|
||||
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)
|
||||
{
|
||||
u8 *attr_ptr;
|
||||
u32 attr_len;
|
||||
|
@ -1621,10 +1621,10 @@ static uint rtw_p2p_attr_remove(u8 *ie, uint ielen_ori, u8 attr_id)
|
|||
u8 *target_attr;
|
||||
u32 target_attr_len;
|
||||
uint ielen = ielen_ori;
|
||||
int index=0;
|
||||
int index =0;
|
||||
|
||||
while (1) {
|
||||
target_attr=rtw_get_p2p_attr(ie, ielen, attr_id, NULL, &target_attr_len);
|
||||
target_attr =rtw_get_p2p_attr(ie, ielen, attr_id, NULL, &target_attr_len);
|
||||
if (target_attr && target_attr_len)
|
||||
{
|
||||
u8 *next_attr = target_attr+target_attr_len;
|
||||
|
@ -1651,9 +1651,9 @@ void rtw_wlan_bssid_ex_remove_p2p_attr(struct wlan_bssid_ex *bss_ex, u8 attr_id)
|
|||
uint p2p_ielen, p2p_ielen_ori;
|
||||
int cnt;
|
||||
|
||||
if ( (p2p_ie=rtw_get_p2p_ie(bss_ex->IEs+_FIXED_IE_LENGTH_, bss_ex->IELength-_FIXED_IE_LENGTH_, NULL, &p2p_ielen_ori)) )
|
||||
if ( (p2p_ie =rtw_get_p2p_ie(bss_ex->IEs+_FIXED_IE_LENGTH_, bss_ex->IELength-_FIXED_IE_LENGTH_, NULL, &p2p_ielen_ori)) )
|
||||
{
|
||||
p2p_ielen=rtw_p2p_attr_remove(p2p_ie, p2p_ielen_ori, attr_id);
|
||||
p2p_ielen =rtw_p2p_attr_remove(p2p_ie, p2p_ielen_ori, attr_id);
|
||||
if (p2p_ielen != p2p_ielen_ori) {
|
||||
|
||||
u8 *next_ie_ori = p2p_ie+p2p_ielen_ori;
|
||||
|
@ -1697,10 +1697,10 @@ int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
|
|||
{
|
||||
int match;
|
||||
uint cnt = 0;
|
||||
u8 eid, wfd_oui[4]={0x50,0x6F,0x9A,0x0A};
|
||||
u8 eid, wfd_oui[4]={0x50, 0x6F, 0x9A, 0x0A};
|
||||
|
||||
|
||||
match=false;
|
||||
match =false;
|
||||
|
||||
if ( in_len < 0 )
|
||||
{
|
||||
|
@ -1756,7 +1756,7 @@ int rtw_get_wfd_ie_from_scan_queue(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_
|
|||
{
|
||||
int match;
|
||||
|
||||
match=false;
|
||||
match =false;
|
||||
|
||||
DBG_871X( "[%s] frame_type = %d\n", __FUNCTION__, frame_type );
|
||||
switch ( frame_type )
|
||||
|
@ -1778,14 +1778,14 @@ int rtw_get_wfd_ie_from_scan_queue(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_
|
|||
|
||||
/* attr_content: The output buffer, contains the "body field" of WFD attribute. */
|
||||
/* attr_contentlen: The data length of the "body field" of WFD attribute. */
|
||||
int rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id ,u8 *attr_content, uint *attr_contentlen)
|
||||
int rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id , u8 *attr_content, uint *attr_contentlen)
|
||||
{
|
||||
int match;
|
||||
uint cnt = 0;
|
||||
u8 attr_id, wfd_oui[4]={0x50,0x6F,0x9A,0x0A};
|
||||
u8 attr_id, wfd_oui[4]={0x50, 0x6F, 0x9A, 0x0A};
|
||||
|
||||
|
||||
match=false;
|
||||
match =false;
|
||||
|
||||
if ( ( wfd_ie[ 0 ] != _VENDOR_SPECIFIC_IE_ ) ||
|
||||
( _rtw_memcmp( wfd_ie + 2, wfd_oui , 4 ) != true ) )
|
||||
|
@ -1879,13 +1879,13 @@ static int rtw_get_cipher_info(struct wlan_network *pnetwork)
|
|||
pbuf = rtw_get_wpa_ie(&pnetwork->network.IEs[12], &wpa_ielen, pnetwork->network.IELength-12);
|
||||
|
||||
if (pbuf && (wpa_ielen>0)) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_get_cipher_info: wpa_ielen: %d", wpa_ielen));
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_get_cipher_info: wpa_ielen: %d", wpa_ielen));
|
||||
if (_SUCCESS == rtw_parse_wpa_ie(pbuf, wpa_ielen+2, &group_cipher, &pairwise_cipher, &is8021x)) {
|
||||
|
||||
pnetwork->BcnInfo.pairwise_cipher = pairwise_cipher;
|
||||
pnetwork->BcnInfo.group_cipher = group_cipher;
|
||||
pnetwork->BcnInfo.is_8021x = is8021x;
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("%s: pnetwork->pairwise_cipher: %d, is_8021x is %d",
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("%s: pnetwork->pairwise_cipher: %d, is_8021x is %d",
|
||||
__func__, pnetwork->BcnInfo.pairwise_cipher, pnetwork->BcnInfo.is_8021x));
|
||||
ret = _SUCCESS;
|
||||
}
|
||||
|
@ -1894,15 +1894,15 @@ static int rtw_get_cipher_info(struct wlan_network *pnetwork)
|
|||
pbuf = rtw_get_wpa2_ie(&pnetwork->network.IEs[12], &wpa_ielen, pnetwork->network.IELength-12);
|
||||
|
||||
if (pbuf && (wpa_ielen>0)) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("get RSN IE\n"));
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("get RSN IE\n"));
|
||||
if (_SUCCESS == rtw_parse_wpa2_ie(pbuf, wpa_ielen+2, &group_cipher, &pairwise_cipher, &is8021x)) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("get RSN IE OK!!!\n"));
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("get RSN IE OK!!!\n"));
|
||||
pnetwork->BcnInfo.pairwise_cipher = pairwise_cipher;
|
||||
pnetwork->BcnInfo.group_cipher = group_cipher;
|
||||
pnetwork->BcnInfo.is_8021x = is8021x;
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("%s: pnetwork->pairwise_cipher: %d,"
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("%s: pnetwork->pairwise_cipher: %d,"
|
||||
"pnetwork->group_cipher is %d, is_8021x is %d", __func__, pnetwork->BcnInfo.pairwise_cipher,
|
||||
pnetwork->BcnInfo.group_cipher,pnetwork->BcnInfo.is_8021x));
|
||||
pnetwork->BcnInfo.group_cipher, pnetwork->BcnInfo.is_8021x));
|
||||
ret = _SUCCESS;
|
||||
}
|
||||
}
|
||||
|
@ -1915,8 +1915,8 @@ void rtw_get_bcn_info(struct wlan_network *pnetwork)
|
|||
{
|
||||
unsigned short cap = 0;
|
||||
u8 bencrypt = 0;
|
||||
/* u8 wpa_ie[255],rsn_ie[255]; */
|
||||
u16 wpa_len=0,rsn_len=0;
|
||||
/* u8 wpa_ie[255], rsn_ie[255]; */
|
||||
u16 wpa_len =0, rsn_len =0;
|
||||
struct HT_info_element *pht_info = NULL;
|
||||
struct ieee80211_ht_cap *pht_cap = NULL;
|
||||
unsigned int len;
|
||||
|
@ -1931,11 +1931,11 @@ void rtw_get_bcn_info(struct wlan_network *pnetwork)
|
|||
} else {
|
||||
pnetwork->BcnInfo.encryp_protocol = ENCRYP_PROTOCOL_OPENSYS;
|
||||
}
|
||||
rtw_get_sec_ie(pnetwork->network.IEs ,pnetwork->network.IELength,NULL,&rsn_len,NULL,&wpa_len);
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_get_bcn_info: ssid=%s\n",pnetwork->network.Ssid.Ssid));
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_get_bcn_info: wpa_len=%d rsn_len=%d\n",wpa_len,rsn_len));
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_get_bcn_info: ssid=%s\n",pnetwork->network.Ssid.Ssid));
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_get_bcn_info: wpa_len=%d rsn_len=%d\n",wpa_len,rsn_len));
|
||||
rtw_get_sec_ie(pnetwork->network.IEs , pnetwork->network.IELength, NULL,&rsn_len, NULL,&wpa_len);
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_get_bcn_info: ssid =%s\n", pnetwork->network.Ssid.Ssid));
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_get_bcn_info: wpa_len =%d rsn_len =%d\n", wpa_len, rsn_len));
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_get_bcn_info: ssid =%s\n", pnetwork->network.Ssid.Ssid));
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_get_bcn_info: wpa_len =%d rsn_len =%d\n", wpa_len, rsn_len));
|
||||
|
||||
if (rsn_len > 0) {
|
||||
pnetwork->BcnInfo.encryp_protocol = ENCRYP_PROTOCOL_WPA2;
|
||||
|
@ -1945,9 +1945,9 @@ void rtw_get_bcn_info(struct wlan_network *pnetwork)
|
|||
if (bencrypt)
|
||||
pnetwork->BcnInfo.encryp_protocol = ENCRYP_PROTOCOL_WEP;
|
||||
}
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_get_bcn_info: pnetwork->encryp_protocol is %x\n",
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_get_bcn_info: pnetwork->encryp_protocol is %x\n",
|
||||
pnetwork->BcnInfo.encryp_protocol));
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_get_bcn_info: pnetwork->encryp_protocol is %x\n",
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_get_bcn_info: pnetwork->encryp_protocol is %x\n",
|
||||
pnetwork->BcnInfo.encryp_protocol));
|
||||
rtw_get_cipher_info(pnetwork);
|
||||
|
||||
|
|
|
@ -124,16 +124,16 @@ int _rtw_write32(struct adapter *adapter, u32 addr, u32 val)
|
|||
return RTW_STATUS_CODE(ret);
|
||||
}
|
||||
|
||||
int _rtw_writeN(struct adapter *adapter, u32 addr ,u32 length , u8 *pdata)
|
||||
int _rtw_writeN(struct adapter *adapter, u32 addr , u32 length , u8 *pdata)
|
||||
{
|
||||
/* struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue; */
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = (struct intf_hdl*)(&(pio_priv->intf));
|
||||
int (*_writeN)(struct intf_hdl *pintfhdl, u32 addr,u32 length, u8 *pdata);
|
||||
int (*_writeN)(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata);
|
||||
int ret;
|
||||
_writeN = pintfhdl->io_ops._writeN;
|
||||
|
||||
ret = _writeN(pintfhdl, addr,length,pdata);
|
||||
ret = _writeN(pintfhdl, addr, length, pdata);
|
||||
|
||||
return RTW_STATUS_CODE(ret);
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ int rtw_inc_and_chk_continual_io_error(struct dvobj_priv *dvobj)
|
|||
{
|
||||
int ret = false;
|
||||
int value;
|
||||
if ( (value=ATOMIC_INC_RETURN(&dvobj->continual_io_error)) > MAX_CONTINUAL_IO_ERR) {
|
||||
if ( (value =ATOMIC_INC_RETURN(&dvobj->continual_io_error)) > MAX_CONTINUAL_IO_ERR) {
|
||||
DBG_871X("[dvobj:%p][ERROR] continual_io_error:%d > %d\n", dvobj, value, MAX_CONTINUAL_IO_ERR);
|
||||
ret = true;
|
||||
} else {
|
||||
|
@ -408,7 +408,7 @@ int dbg_rtw_write32(struct adapter *adapter, u32 addr, u32 val, const char *call
|
|||
|
||||
return _rtw_write32(adapter, addr, val);
|
||||
}
|
||||
int dbg_rtw_writeN(struct adapter *adapter, u32 addr ,u32 length , u8 *data, const char *caller, const int line)
|
||||
int dbg_rtw_writeN(struct adapter *adapter, u32 addr , u32 length , u8 *data, const char *caller, const int line)
|
||||
{
|
||||
if (match_write_sniff_ranges(addr, length))
|
||||
DBG_871X("DBG_IO %s:%d rtw_writeN(0x%04x, %u)\n", caller, line, addr, length);
|
||||
|
|
|
@ -54,13 +54,13 @@ u8 rtw_validate_bssid(u8 *bssid)
|
|||
u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid)
|
||||
{
|
||||
u8 i;
|
||||
u8 ret=true;
|
||||
u8 ret =true;
|
||||
|
||||
;
|
||||
|
||||
if (ssid->SsidLength > 32) {
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("ssid length >32\n"));
|
||||
ret= false;
|
||||
ret = false;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid)
|
|||
/* wifi, printable ascii code must be supported */
|
||||
if (!( (ssid->Ssid[i] >= 0x20) && (ssid->Ssid[i] <= 0x7e) )){
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("ssid has nonprintabl ascii\n"));
|
||||
ret= false;
|
||||
ret = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ u8 rtw_do_join(struct adapter * padapter)
|
|||
u8* pibss = NULL;
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
struct __queue *queue = &(pmlmepriv->scanned_queue);
|
||||
u8 ret=_SUCCESS;
|
||||
u8 ret =_SUCCESS;
|
||||
|
||||
;
|
||||
|
||||
|
@ -99,7 +99,7 @@ u8 rtw_do_join(struct adapter * padapter)
|
|||
phead = get_list_head(queue);
|
||||
plist = get_next(phead);
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("\n rtw_do_join: phead = %p; plist = %p\n\n\n", phead, plist));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("\n rtw_do_join: phead = %p; plist = %p\n\n\n", phead, plist));
|
||||
|
||||
pmlmepriv->cur_network.join_res = -2;
|
||||
|
||||
|
@ -109,7 +109,7 @@ u8 rtw_do_join(struct adapter * padapter)
|
|||
|
||||
pmlmepriv->to_join = true;
|
||||
|
||||
if (_rtw_queue_empty(queue)== true)
|
||||
if (_rtw_queue_empty(queue) == true)
|
||||
{
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||
|
@ -121,11 +121,11 @@ u8 rtw_do_join(struct adapter * padapter)
|
|||
|| rtw_to_roaming(padapter) > 0
|
||||
)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_do_join(): site survey if scanned_queue is empty\n."));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("rtw_do_join(): site survey if scanned_queue is empty\n."));
|
||||
/* submit site_survey_cmd */
|
||||
if (_SUCCESS!=(ret=rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0)) ) {
|
||||
if (_SUCCESS!=(ret =rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0)) ) {
|
||||
pmlmepriv->to_join = false;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("rtw_do_join(): site survey return error\n."));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("rtw_do_join(): site survey return error\n."));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -140,14 +140,14 @@ u8 rtw_do_join(struct adapter * padapter)
|
|||
{
|
||||
int select_ret;
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
if ((select_ret=rtw_select_and_join_from_scanned_queue(pmlmepriv))==_SUCCESS)
|
||||
if ((select_ret =rtw_select_and_join_from_scanned_queue(pmlmepriv)) ==_SUCCESS)
|
||||
{
|
||||
pmlmepriv->to_join = false;
|
||||
_set_timer(&pmlmepriv->assoc_timer, MAX_JOIN_TIMEOUT);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)==true)
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) ==true)
|
||||
{
|
||||
/* submit createbss_cmd to change to a ADHOC_MASTER */
|
||||
|
||||
|
@ -167,14 +167,14 @@ u8 rtw_do_join(struct adapter * padapter)
|
|||
|
||||
if (rtw_createbss_cmd(padapter)!=_SUCCESS)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("***Error=>do_goin: rtw_createbss_cmd status FAIL***\n "));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("***Error =>do_goin: rtw_createbss_cmd status FAIL***\n "));
|
||||
ret = false;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pmlmepriv->to_join = false;
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("***Error=> rtw_select_and_join_from_scanned_queue FAIL under STA_Mode***\n "));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("***Error => rtw_select_and_join_from_scanned_queue FAIL under STA_Mode***\n "));
|
||||
|
||||
} else {
|
||||
/* can't associate ; reset under-linking */
|
||||
|
@ -182,14 +182,14 @@ u8 rtw_do_join(struct adapter * padapter)
|
|||
|
||||
/* when set_ssid/set_bssid for rtw_do_join(), but there are no desired bss in scanning queue */
|
||||
/* we try to issue sitesurvey firstly */
|
||||
if (pmlmepriv->LinkDetectInfo.bBusyTraffic==false
|
||||
if (pmlmepriv->LinkDetectInfo.bBusyTraffic ==false
|
||||
|| rtw_to_roaming(padapter) > 0
|
||||
)
|
||||
{
|
||||
/* DBG_871X("rtw_do_join() when no desired bss in scanning queue\n"); */
|
||||
if ( _SUCCESS!=(ret=rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0)) ){
|
||||
if ( _SUCCESS!=(ret =rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0)) ){
|
||||
pmlmepriv->to_join = false;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("do_join(): site survey return error\n."));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("do_join(): site survey return error\n."));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -213,7 +213,7 @@ exit:
|
|||
u8 rtw_set_802_11_bssid(struct adapter* padapter, u8 *bssid)
|
||||
{
|
||||
unsigned long irqL;
|
||||
u8 status=_SUCCESS;
|
||||
u8 status =_SUCCESS;
|
||||
u32 cur_time = 0;
|
||||
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
@ -232,7 +232,7 @@ u8 rtw_set_802_11_bssid(struct adapter* padapter, u8 *bssid)
|
|||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
|
||||
DBG_871X("Set BSSID under fw_state=0x%08x\n", get_fwstate(pmlmepriv));
|
||||
DBG_871X("Set BSSID under fw_state =0x%08x\n", get_fwstate(pmlmepriv));
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
|
||||
goto handle_tkip_countermeasure;
|
||||
} else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true) {
|
||||
|
@ -248,9 +248,9 @@ u8 rtw_set_802_11_bssid(struct adapter* padapter, u8 *bssid)
|
|||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == false)
|
||||
goto release_mlme_lock;/* it means driver is in WIFI_ADHOC_MASTER_STATE, we needn't create bss again. */
|
||||
} else {
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("Set BSSID not the same bssid\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("set_bssid="MAC_FMT"\n", MAC_ARG(bssid) ));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("cur_bssid="MAC_FMT"\n", MAC_ARG(pmlmepriv->cur_network.network.MacAddress) ));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("Set BSSID not the same bssid\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("set_bssid ="MAC_FMT"\n", MAC_ARG(bssid) ));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("cur_bssid ="MAC_FMT"\n", MAC_ARG(pmlmepriv->cur_network.network.MacAddress) ));
|
||||
|
||||
rtw_disassoc_cmd(padapter, 0, true);
|
||||
|
||||
|
@ -273,7 +273,7 @@ handle_tkip_countermeasure:
|
|||
}
|
||||
|
||||
memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN);
|
||||
pmlmepriv->assoc_by_bssid=true;
|
||||
pmlmepriv->assoc_by_bssid =true;
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
|
||||
pmlmepriv->to_join = true;
|
||||
|
@ -287,7 +287,7 @@ release_mlme_lock:
|
|||
|
||||
exit:
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
|
||||
("rtw_set_802_11_bssid: status=%d\n", status));
|
||||
("rtw_set_802_11_bssid: status =%d\n", status));
|
||||
|
||||
;
|
||||
|
||||
|
@ -305,19 +305,19 @@ u8 rtw_set_802_11_ssid(struct adapter* padapter, struct ndis_802_11_ssid *ssid)
|
|||
|
||||
;
|
||||
|
||||
DBG_871X_LEVEL(_drv_always_, "set ssid [%s] fw_state=0x%08x\n",
|
||||
DBG_871X_LEVEL(_drv_always_, "set ssid [%s] fw_state =0x%08x\n",
|
||||
ssid->Ssid, get_fwstate(pmlmepriv));
|
||||
|
||||
if (padapter->hw_init_completed==false){
|
||||
if (padapter->hw_init_completed ==false){
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
|
||||
("set_ssid: hw_init_completed==false=>exit!!!\n"));
|
||||
("set_ssid: hw_init_completed ==false =>exit!!!\n"));
|
||||
status = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
DBG_871X("Set SSID under fw_state=0x%08x\n", get_fwstate(pmlmepriv));
|
||||
DBG_871X("Set SSID under fw_state =0x%08x\n", get_fwstate(pmlmepriv));
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
|
||||
goto handle_tkip_countermeasure;
|
||||
} else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true) {
|
||||
|
@ -335,7 +335,7 @@ u8 rtw_set_802_11_ssid(struct adapter* padapter, struct ndis_802_11_ssid *ssid)
|
|||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == false))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
|
||||
("Set SSID is the same ssid, fw_state=0x%08x\n",
|
||||
("Set SSID is the same ssid, fw_state =0x%08x\n",
|
||||
get_fwstate(pmlmepriv)));
|
||||
|
||||
if (rtw_is_same_ibss(padapter, pnetwork) == false) {
|
||||
|
@ -358,9 +358,9 @@ u8 rtw_set_802_11_ssid(struct adapter* padapter, struct ndis_802_11_ssid *ssid)
|
|||
rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_JOINBSS, 1);
|
||||
}
|
||||
} else {
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("Set SSID not the same ssid\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("set_ssid=[%s] len=0x%x\n", ssid->Ssid, (unsigned int)ssid->SsidLength));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("assoc_ssid=[%s] len=0x%x\n", pmlmepriv->assoc_ssid.Ssid, (unsigned int)pmlmepriv->assoc_ssid.SsidLength));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("Set SSID not the same ssid\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("set_ssid =[%s] len =0x%x\n", ssid->Ssid, (unsigned int)ssid->SsidLength));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("assoc_ssid =[%s] len =0x%x\n", pmlmepriv->assoc_ssid.Ssid, (unsigned int)pmlmepriv->assoc_ssid.SsidLength));
|
||||
|
||||
rtw_disassoc_cmd(padapter, 0, true);
|
||||
|
||||
|
@ -388,7 +388,7 @@ handle_tkip_countermeasure:
|
|||
}
|
||||
|
||||
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) {
|
||||
pmlmepriv->to_join = true;
|
||||
|
@ -402,7 +402,7 @@ release_mlme_lock:
|
|||
|
||||
exit:
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
|
||||
("-rtw_set_802_11_ssid: status=%d\n", status));
|
||||
("-rtw_set_802_11_ssid: status =%d\n", status));
|
||||
|
||||
;
|
||||
|
||||
|
@ -434,16 +434,16 @@ u8 rtw_set_802_11_connect(struct adapter* padapter, u8 *bssid, struct ndis_802_1
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (padapter->hw_init_completed==false){
|
||||
if (padapter->hw_init_completed ==false){
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
|
||||
("set_ssid: hw_init_completed==false=>exit!!!\n"));
|
||||
("set_ssid: hw_init_completed ==false =>exit!!!\n"));
|
||||
status = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT" fw_state=0x%08x\n",
|
||||
DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT" fw_state =0x%08x\n",
|
||||
FUNC_ADPT_ARG(padapter), get_fwstate(pmlmepriv));
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
|
||||
|
@ -493,29 +493,29 @@ u8 rtw_set_802_11_infrastructure_mode(struct adapter* padapter,
|
|||
|
||||
;
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_notice_,
|
||||
("+rtw_set_802_11_infrastructure_mode: old=%d new=%d fw_state=0x%08x\n",
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_notice_,
|
||||
("+rtw_set_802_11_infrastructure_mode: old =%d new =%d fw_state =0x%08x\n",
|
||||
*pold_state, networktype, get_fwstate(pmlmepriv)));
|
||||
|
||||
if (*pold_state != networktype)
|
||||
{
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,(" change mode!"));
|
||||
/* DBG_871X("change mode, old_mode=%d, new_mode=%d, fw_state=0x%x\n", *pold_state, networktype, get_fwstate(pmlmepriv)); */
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, (" change mode!"));
|
||||
/* DBG_871X("change mode, old_mode =%d, new_mode =%d, fw_state =0x%x\n", *pold_state, networktype, get_fwstate(pmlmepriv)); */
|
||||
|
||||
if (*pold_state==Ndis802_11APMode) {
|
||||
if (*pold_state ==Ndis802_11APMode) {
|
||||
/* change to other mode from Ndis802_11APMode */
|
||||
cur_network->join_res = -1;
|
||||
|
||||
stop_ap_mode(padapter);
|
||||
}
|
||||
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED)== true) ||(*pold_state==Ndis802_11IBSS))
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) == true) ||(*pold_state ==Ndis802_11IBSS))
|
||||
rtw_disassoc_cmd(padapter, 0, true);
|
||||
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED)== true) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)== true) )
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) == true) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) )
|
||||
rtw_free_assoc_resources(padapter, 1);
|
||||
|
||||
if ((*pold_state == Ndis802_11Infrastructure) ||(*pold_state == Ndis802_11IBSS))
|
||||
|
@ -572,7 +572,7 @@ u8 rtw_set_802_11_disassociate(struct adapter *padapter)
|
|||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("MgntActrtw_set_802_11_disassociate: rtw_indicate_disconnect\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("MgntActrtw_set_802_11_disassociate: rtw_indicate_disconnect\n"));
|
||||
|
||||
rtw_disassoc_cmd(padapter, 0, true);
|
||||
rtw_indicate_disconnect(padapter);
|
||||
|
@ -591,20 +591,20 @@ u8 rtw_set_802_11_disassociate(struct adapter *padapter)
|
|||
u8 rtw_set_802_11_bssid_list_scan(struct adapter* padapter, struct ndis_802_11_ssid *pssid, int ssid_max_num)
|
||||
{
|
||||
unsigned long irqL;
|
||||
struct mlme_priv *pmlmepriv= &padapter->mlmepriv;
|
||||
u8 res=true;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
u8 res =true;
|
||||
|
||||
;
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("+rtw_set_802_11_bssid_list_scan(), fw_state=%x\n", get_fwstate(pmlmepriv)));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("+rtw_set_802_11_bssid_list_scan(), fw_state =%x\n", get_fwstate(pmlmepriv)));
|
||||
|
||||
if (padapter == NULL) {
|
||||
res=false;
|
||||
res =false;
|
||||
goto exit;
|
||||
}
|
||||
if (padapter->hw_init_completed==false){
|
||||
if (padapter->hw_init_completed ==false){
|
||||
res = false;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n===rtw_set_802_11_bssid_list_scan:hw_init_completed==false===\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n ===rtw_set_802_11_bssid_list_scan:hw_init_completed ==false ===\n"));
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
@ -612,13 +612,13 @@ u8 rtw_set_802_11_bssid_list_scan(struct adapter* padapter, struct ndis_802_11_s
|
|||
(pmlmepriv->LinkDetectInfo.bBusyTraffic == true))
|
||||
{
|
||||
/* Scan or linking is in progress, do nothing. */
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("rtw_set_802_11_bssid_list_scan fail since fw_state = %x\n", get_fwstate(pmlmepriv)));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("rtw_set_802_11_bssid_list_scan fail since fw_state = %x\n", get_fwstate(pmlmepriv)));
|
||||
res = true;
|
||||
|
||||
if (check_fwstate(pmlmepriv, (_FW_UNDER_SURVEY|_FW_UNDER_LINKING))== true){
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n###_FW_UNDER_SURVEY|_FW_UNDER_LINKING\n\n"));
|
||||
if (check_fwstate(pmlmepriv, (_FW_UNDER_SURVEY|_FW_UNDER_LINKING)) == true){
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n###_FW_UNDER_SURVEY|_FW_UNDER_LINKING\n\n"));
|
||||
} else {
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n###pmlmepriv->sitesurveyctrl.traffic_busy==true\n\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n###pmlmepriv->sitesurveyctrl.traffic_busy ==true\n\n"));
|
||||
}
|
||||
} else {
|
||||
if (rtw_is_scan_deny(padapter)) {
|
||||
|
@ -644,21 +644,21 @@ u8 rtw_set_802_11_authentication_mode(struct adapter* padapter, enum NDIS_802_11
|
|||
int res;
|
||||
u8 ret;
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("set_802_11_auth.mode(): mode=%x\n", authmode));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("set_802_11_auth.mode(): mode =%x\n", authmode));
|
||||
|
||||
psecuritypriv->ndisauthtype=authmode;
|
||||
psecuritypriv->ndisauthtype =authmode;
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_authentication_mode:psecuritypriv->ndisauthtype=%d", psecuritypriv->ndisauthtype));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("rtw_set_802_11_authentication_mode:psecuritypriv->ndisauthtype =%d", psecuritypriv->ndisauthtype));
|
||||
|
||||
if (psecuritypriv->ndisauthtype>3)
|
||||
psecuritypriv->dot11AuthAlgrthm=dot11AuthAlgrthm_8021X;
|
||||
psecuritypriv->dot11AuthAlgrthm =dot11AuthAlgrthm_8021X;
|
||||
|
||||
res=rtw_set_auth(padapter,psecuritypriv);
|
||||
res =rtw_set_auth(padapter, psecuritypriv);
|
||||
|
||||
if (res==_SUCCESS)
|
||||
ret=true;
|
||||
if (res ==_SUCCESS)
|
||||
ret =true;
|
||||
else
|
||||
ret=false;
|
||||
ret =false;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -667,59 +667,59 @@ u8 rtw_set_802_11_add_wep(struct adapter* padapter, struct ndis_802_11_wep *wep)
|
|||
|
||||
u8 bdefaultkey;
|
||||
u8 btransmitkey;
|
||||
sint keyid,res;
|
||||
struct security_priv* psecuritypriv=&(padapter->securitypriv);
|
||||
u8 ret=_SUCCESS;
|
||||
sint keyid, res;
|
||||
struct security_priv* psecuritypriv =&(padapter->securitypriv);
|
||||
u8 ret =_SUCCESS;
|
||||
|
||||
;
|
||||
|
||||
bdefaultkey=(wep->KeyIndex & 0x40000000) > 0 ? false : true; /* for ??? */
|
||||
btransmitkey= (wep->KeyIndex & 0x80000000) > 0 ? true : false; /* for ??? */
|
||||
keyid=wep->KeyIndex & 0x3fffffff;
|
||||
bdefaultkey =(wep->KeyIndex & 0x40000000) > 0 ? false : true; /* for ??? */
|
||||
btransmitkey = (wep->KeyIndex & 0x80000000) > 0 ? true : false; /* for ??? */
|
||||
keyid =wep->KeyIndex & 0x3fffffff;
|
||||
|
||||
if (keyid>4)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("MgntActrtw_set_802_11_add_wep:keyid>4=>fail\n"));
|
||||
ret=false;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("MgntActrtw_set_802_11_add_wep:keyid>4 =>fail\n"));
|
||||
ret =false;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
switch (wep->KeyLength) {
|
||||
case 5:
|
||||
psecuritypriv->dot11PrivacyAlgrthm=_WEP40_;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("MgntActrtw_set_802_11_add_wep:wep->KeyLength=5\n"));
|
||||
psecuritypriv->dot11PrivacyAlgrthm =_WEP40_;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("MgntActrtw_set_802_11_add_wep:wep->KeyLength =5\n"));
|
||||
break;
|
||||
case 13:
|
||||
psecuritypriv->dot11PrivacyAlgrthm=_WEP104_;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("MgntActrtw_set_802_11_add_wep:wep->KeyLength=13\n"));
|
||||
psecuritypriv->dot11PrivacyAlgrthm =_WEP104_;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("MgntActrtw_set_802_11_add_wep:wep->KeyLength =13\n"));
|
||||
break;
|
||||
default:
|
||||
psecuritypriv->dot11PrivacyAlgrthm=_NO_PRIVACY_;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("MgntActrtw_set_802_11_add_wep:wep->KeyLength!=5 or 13\n"));
|
||||
psecuritypriv->dot11PrivacyAlgrthm =_NO_PRIVACY_;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("MgntActrtw_set_802_11_add_wep:wep->KeyLength!=5 or 13\n"));
|
||||
break;
|
||||
}
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,
|
||||
("rtw_set_802_11_add_wep:befor memcpy, wep->KeyLength=0x%x wep->KeyIndex=0x%x keyid =%x\n",
|
||||
wep->KeyLength,wep->KeyIndex,keyid));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
|
||||
("rtw_set_802_11_add_wep:befor memcpy, wep->KeyLength =0x%x wep->KeyIndex =0x%x keyid =%x\n",
|
||||
wep->KeyLength, wep->KeyIndex, keyid));
|
||||
|
||||
memcpy(&(psecuritypriv->dot11DefKey[keyid].skey[0]),&(wep->KeyMaterial),wep->KeyLength);
|
||||
memcpy(&(psecuritypriv->dot11DefKey[keyid].skey[0]),&(wep->KeyMaterial), wep->KeyLength);
|
||||
|
||||
psecuritypriv->dot11DefKeylen[keyid]=wep->KeyLength;
|
||||
|
||||
psecuritypriv->dot11PrivacyKeyIndex=keyid;
|
||||
psecuritypriv->dot11PrivacyKeyIndex =keyid;
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_add_wep:security key material : %x %x %x %x %x %x %x %x %x %x %x %x %x\n",
|
||||
psecuritypriv->dot11DefKey[keyid].skey[0],psecuritypriv->dot11DefKey[keyid].skey[1],psecuritypriv->dot11DefKey[keyid].skey[2],
|
||||
psecuritypriv->dot11DefKey[keyid].skey[3],psecuritypriv->dot11DefKey[keyid].skey[4],psecuritypriv->dot11DefKey[keyid].skey[5],
|
||||
psecuritypriv->dot11DefKey[keyid].skey[6],psecuritypriv->dot11DefKey[keyid].skey[7],psecuritypriv->dot11DefKey[keyid].skey[8],
|
||||
psecuritypriv->dot11DefKey[keyid].skey[9],psecuritypriv->dot11DefKey[keyid].skey[10],psecuritypriv->dot11DefKey[keyid].skey[11],
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("rtw_set_802_11_add_wep:security key material : %x %x %x %x %x %x %x %x %x %x %x %x %x\n",
|
||||
psecuritypriv->dot11DefKey[keyid].skey[0], psecuritypriv->dot11DefKey[keyid].skey[1], psecuritypriv->dot11DefKey[keyid].skey[2],
|
||||
psecuritypriv->dot11DefKey[keyid].skey[3], psecuritypriv->dot11DefKey[keyid].skey[4], psecuritypriv->dot11DefKey[keyid].skey[5],
|
||||
psecuritypriv->dot11DefKey[keyid].skey[6], psecuritypriv->dot11DefKey[keyid].skey[7], psecuritypriv->dot11DefKey[keyid].skey[8],
|
||||
psecuritypriv->dot11DefKey[keyid].skey[9], psecuritypriv->dot11DefKey[keyid].skey[10], psecuritypriv->dot11DefKey[keyid].skey[11],
|
||||
psecuritypriv->dot11DefKey[keyid].skey[12]));
|
||||
|
||||
res=rtw_set_key(padapter,psecuritypriv, keyid, 1,true);
|
||||
res =rtw_set_key(padapter, psecuritypriv, keyid, 1, true);
|
||||
|
||||
if (res==_FAIL)
|
||||
ret= false;
|
||||
if (res ==_FAIL)
|
||||
ret = false;
|
||||
exit:
|
||||
|
||||
;
|
||||
|
@ -730,35 +730,35 @@ exit:
|
|||
|
||||
u8 rtw_set_802_11_remove_wep(struct adapter* padapter, u32 keyindex){
|
||||
|
||||
u8 ret=_SUCCESS;
|
||||
u8 ret =_SUCCESS;
|
||||
|
||||
;
|
||||
|
||||
if (keyindex >= 0x80000000 || padapter == NULL){
|
||||
|
||||
ret=false;
|
||||
ret =false;
|
||||
goto exit;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
int res;
|
||||
struct security_priv* psecuritypriv=&(padapter->securitypriv);
|
||||
struct security_priv* psecuritypriv =&(padapter->securitypriv);
|
||||
if ( keyindex < 4 ){
|
||||
|
||||
memset(&psecuritypriv->dot11DefKey[keyindex], 0, 16);
|
||||
|
||||
res=rtw_set_key(padapter,psecuritypriv,keyindex, 0,true);
|
||||
res =rtw_set_key(padapter, psecuritypriv, keyindex, 0, true);
|
||||
|
||||
psecuritypriv->dot11DefKeylen[keyindex]=0;
|
||||
|
||||
if (res==_FAIL)
|
||||
ret=_FAIL;
|
||||
if (res ==_FAIL)
|
||||
ret =_FAIL;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ret=_FAIL;
|
||||
ret =_FAIL;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -778,7 +778,7 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key)
|
|||
struct sta_info *stainfo;
|
||||
u8 bgroup = false;
|
||||
u8 bgrouptkey = false;/* can be remove later */
|
||||
u8 ret=_SUCCESS;
|
||||
u8 ret =_SUCCESS;
|
||||
|
||||
;
|
||||
|
||||
|
@ -786,10 +786,10 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key)
|
|||
|
||||
/* It is invalid to clear bit 31 and set bit 30. If the miniport driver encounters this combination, */
|
||||
/* it must fail the request and return NDIS_STATUS_INVALID_DATA. */
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_add_key: ((key->KeyIndex & 0x80000000) == 0)[=%d] ",(int)(key->KeyIndex & 0x80000000) == 0));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_add_key:((key->KeyIndex & 0x40000000) > 0)[=%d]" , (int)(key->KeyIndex & 0x40000000) > 0));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_add_key: key->KeyIndex=%d\n" ,(int)key->KeyIndex));
|
||||
ret= _FAIL;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("rtw_set_802_11_add_key: ((key->KeyIndex & 0x80000000) == 0)[=%d] ", (int)(key->KeyIndex & 0x80000000) == 0));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("rtw_set_802_11_add_key:((key->KeyIndex & 0x40000000) > 0)[=%d]" , (int)(key->KeyIndex & 0x40000000) > 0));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("rtw_set_802_11_add_key: key->KeyIndex =%d\n" , (int)key->KeyIndex));
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
@ -797,189 +797,189 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key)
|
|||
{
|
||||
/* Pairwise key */
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("OID_802_11_ADD_KEY: +++++ Pairwise key +++++\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("OID_802_11_ADD_KEY: +++++ Pairwise key +++++\n"));
|
||||
|
||||
pbssid=get_bssid(&padapter->mlmepriv);
|
||||
stainfo=rtw_get_stainfo(&padapter->stapriv, pbssid);
|
||||
pbssid =get_bssid(&padapter->mlmepriv);
|
||||
stainfo =rtw_get_stainfo(&padapter->stapriv, pbssid);
|
||||
|
||||
if ((stainfo!=NULL)&&(padapter->securitypriv.dot11AuthAlgrthm==dot11AuthAlgrthm_8021X)){
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("OID_802_11_ADD_KEY:( stainfo!=NULL)&&(Adapter->securitypriv.dot11AuthAlgrthm==dot11AuthAlgrthm_8021X)\n"));
|
||||
encryptionalgo=stainfo->dot118021XPrivacy;
|
||||
if ((stainfo!=NULL)&&(padapter->securitypriv.dot11AuthAlgrthm ==dot11AuthAlgrthm_8021X)){
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("OID_802_11_ADD_KEY:( stainfo!=NULL)&&(Adapter->securitypriv.dot11AuthAlgrthm ==dot11AuthAlgrthm_8021X)\n"));
|
||||
encryptionalgo =stainfo->dot118021XPrivacy;
|
||||
}
|
||||
else{
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("OID_802_11_ADD_KEY: stainfo==NULL)||(Adapter->securitypriv.dot11AuthAlgrthm!=dot11AuthAlgrthm_8021X)\n"));
|
||||
encryptionalgo=padapter->securitypriv.dot11PrivacyAlgrthm;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("OID_802_11_ADD_KEY: stainfo ==NULL)||(Adapter->securitypriv.dot11AuthAlgrthm!=dot11AuthAlgrthm_8021X)\n"));
|
||||
encryptionalgo =padapter->securitypriv.dot11PrivacyAlgrthm;
|
||||
}
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("rtw_set_802_11_add_key: (encryptionalgo ==%d)!\n",encryptionalgo ));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("rtw_set_802_11_add_key: (Adapter->securitypriv.dot11PrivacyAlgrthm ==%d)!\n",padapter->securitypriv.dot11PrivacyAlgrthm));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("rtw_set_802_11_add_key: (Adapter->securitypriv.dot11AuthAlgrthm ==%d)!\n",padapter->securitypriv.dot11AuthAlgrthm));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("rtw_set_802_11_add_key: (encryptionalgo ==%d)!\n", encryptionalgo ));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("rtw_set_802_11_add_key: (Adapter->securitypriv.dot11PrivacyAlgrthm ==%d)!\n", padapter->securitypriv.dot11PrivacyAlgrthm));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("rtw_set_802_11_add_key: (Adapter->securitypriv.dot11AuthAlgrthm ==%d)!\n", padapter->securitypriv.dot11AuthAlgrthm));
|
||||
|
||||
if ((stainfo!=NULL)){
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("rtw_set_802_11_add_key: (stainfo->dot118021XPrivacy ==%d)!\n", stainfo->dot118021XPrivacy));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("rtw_set_802_11_add_key: (stainfo->dot118021XPrivacy ==%d)!\n", stainfo->dot118021XPrivacy));
|
||||
}
|
||||
|
||||
if (key->KeyIndex & 0x000000FF){
|
||||
/* The key index is specified in the lower 8 bits by values of zero to 255. */
|
||||
/* The key index should be set to zero for a Pairwise key, and the driver should fail with */
|
||||
/* NDIS_STATUS_INVALID_DATA if the lower 8 bits is not zero */
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,(" key->KeyIndex & 0x000000FF.\n"));
|
||||
ret= _FAIL;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, (" key->KeyIndex & 0x000000FF.\n"));
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/* check BSSID */
|
||||
if (IS_MAC_ADDRESS_BROADCAST(key->BSSID) == true){
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("MacAddr_isBcst(key->BSSID)\n"));
|
||||
ret= false;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("MacAddr_isBcst(key->BSSID)\n"));
|
||||
ret = false;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/* Check key length for TKIP. */
|
||||
/* if (encryptionAlgorithm == RT_ENC_TKIP_ENCRYPTION && key->KeyLength != 32) */
|
||||
if ((encryptionalgo== _TKIP_)&& (key->KeyLength != 32)){
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("TKIP KeyLength:0x%x != 32\n", key->KeyLength));
|
||||
ret=_FAIL;
|
||||
if ((encryptionalgo == _TKIP_)&& (key->KeyLength != 32)){
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("TKIP KeyLength:0x%x != 32\n", key->KeyLength));
|
||||
ret =_FAIL;
|
||||
goto exit;
|
||||
|
||||
}
|
||||
|
||||
/* Check key length for AES. */
|
||||
if ((encryptionalgo== _AES_)&& (key->KeyLength != 16)) {
|
||||
if ((encryptionalgo == _AES_)&& (key->KeyLength != 16)) {
|
||||
/* For our supplicant, EAPPkt9x.vxd, cannot differentiate TKIP and AES case. */
|
||||
if (key->KeyLength == 32) {
|
||||
key->KeyLength = 16;
|
||||
} else {
|
||||
ret= _FAIL;
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check key length for WEP. For NDTEST, 2005.01.27, by rcnjko. */
|
||||
if ((encryptionalgo == _WEP40_ && key->KeyLength != 5) ||
|
||||
(encryptionalgo== _WEP104_ && key->KeyLength != 13)) {
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("WEP KeyLength:0x%x != 5 or 13\n", key->KeyLength));
|
||||
ret=_FAIL;
|
||||
(encryptionalgo == _WEP104_ && key->KeyLength != 13)) {
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("WEP KeyLength:0x%x != 5 or 13\n", key->KeyLength));
|
||||
ret =_FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
bgroup = false;
|
||||
|
||||
/* Check the pairwise key. Added by Annie, 2005-07-06. */
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("------------------------------------------\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("[Pairwise Key set]\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("------------------------------------------\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("key index: 0x%8x(0x%8x)\n", key->KeyIndex,(key->KeyIndex&0x3)));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("key Length: %d\n", key->KeyLength));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("------------------------------------------\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("------------------------------------------\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("[Pairwise Key set]\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("------------------------------------------\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("key index: 0x%8x(0x%8x)\n", key->KeyIndex, (key->KeyIndex&0x3)));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("key Length: %d\n", key->KeyLength));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("------------------------------------------\n"));
|
||||
} else {
|
||||
/* Group key - KeyIndex(BIT30==0) */
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("OID_802_11_ADD_KEY: +++++ Group key +++++\n"));
|
||||
/* Group key - KeyIndex(BIT30 ==0) */
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("OID_802_11_ADD_KEY: +++++ Group key +++++\n"));
|
||||
|
||||
/* when add wep key through add key and didn't assigned encryption type before */
|
||||
if ((padapter->securitypriv.ndisauthtype<=3)&&(padapter->securitypriv.dot118021XGrpPrivacy==0))
|
||||
if ((padapter->securitypriv.ndisauthtype<=3)&&(padapter->securitypriv.dot118021XGrpPrivacy ==0))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("keylen=%d( Adapter->securitypriv.dot11PrivacyAlgrthm=%x )padapter->securitypriv.dot118021XGrpPrivacy(%x)\n", key->KeyLength,padapter->securitypriv.dot11PrivacyAlgrthm,padapter->securitypriv.dot118021XGrpPrivacy));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("keylen =%d( Adapter->securitypriv.dot11PrivacyAlgrthm =%x )padapter->securitypriv.dot118021XGrpPrivacy(%x)\n", key->KeyLength, padapter->securitypriv.dot11PrivacyAlgrthm, padapter->securitypriv.dot118021XGrpPrivacy));
|
||||
|
||||
switch (key->KeyLength)
|
||||
{
|
||||
case 5:
|
||||
padapter->securitypriv.dot11PrivacyAlgrthm=_WEP40_;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("Adapter->securitypriv.dot11PrivacyAlgrthm= %x key->KeyLength=%u\n", padapter->securitypriv.dot11PrivacyAlgrthm,key->KeyLength));
|
||||
padapter->securitypriv.dot11PrivacyAlgrthm =_WEP40_;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("Adapter->securitypriv.dot11PrivacyAlgrthm = %x key->KeyLength =%u\n", padapter->securitypriv.dot11PrivacyAlgrthm, key->KeyLength));
|
||||
break;
|
||||
case 13:
|
||||
padapter->securitypriv.dot11PrivacyAlgrthm=_WEP104_;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("Adapter->securitypriv.dot11PrivacyAlgrthm= %x key->KeyLength=%u\n", padapter->securitypriv.dot11PrivacyAlgrthm,key->KeyLength));
|
||||
padapter->securitypriv.dot11PrivacyAlgrthm =_WEP104_;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("Adapter->securitypriv.dot11PrivacyAlgrthm = %x key->KeyLength =%u\n", padapter->securitypriv.dot11PrivacyAlgrthm, key->KeyLength));
|
||||
break;
|
||||
default:
|
||||
padapter->securitypriv.dot11PrivacyAlgrthm=_NO_PRIVACY_;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("Adapter->securitypriv.dot11PrivacyAlgrthm= %x key->KeyLength=%u\n", padapter->securitypriv.dot11PrivacyAlgrthm,key->KeyLength));
|
||||
padapter->securitypriv.dot11PrivacyAlgrthm =_NO_PRIVACY_;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("Adapter->securitypriv.dot11PrivacyAlgrthm = %x key->KeyLength =%u\n", padapter->securitypriv.dot11PrivacyAlgrthm, key->KeyLength));
|
||||
break;
|
||||
}
|
||||
|
||||
encryptionalgo=padapter->securitypriv.dot11PrivacyAlgrthm;
|
||||
encryptionalgo =padapter->securitypriv.dot11PrivacyAlgrthm;
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,(" Adapter->securitypriv.dot11PrivacyAlgrthm=%x\n", padapter->securitypriv.dot11PrivacyAlgrthm));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, (" Adapter->securitypriv.dot11PrivacyAlgrthm =%x\n", padapter->securitypriv.dot11PrivacyAlgrthm));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
encryptionalgo=padapter->securitypriv.dot118021XGrpPrivacy;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("( Adapter->securitypriv.dot11PrivacyAlgrthm=%x )encryptionalgo(%x)=padapter->securitypriv.dot118021XGrpPrivacy(%x)keylen=%d\n", padapter->securitypriv.dot11PrivacyAlgrthm,encryptionalgo,padapter->securitypriv.dot118021XGrpPrivacy,key->KeyLength));
|
||||
encryptionalgo =padapter->securitypriv.dot118021XGrpPrivacy;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("( Adapter->securitypriv.dot11PrivacyAlgrthm =%x )encryptionalgo(%x) =padapter->securitypriv.dot118021XGrpPrivacy(%x)keylen =%d\n", padapter->securitypriv.dot11PrivacyAlgrthm, encryptionalgo, padapter->securitypriv.dot118021XGrpPrivacy, key->KeyLength));
|
||||
|
||||
}
|
||||
|
||||
if ((check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE)==true) && (IS_MAC_ADDRESS_BROADCAST(key->BSSID) == false)) {
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,(" IBSS but BSSID is not Broadcast Address.\n"));
|
||||
ret= _FAIL;
|
||||
if ((check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE) ==true) && (IS_MAC_ADDRESS_BROADCAST(key->BSSID) == false)) {
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, (" IBSS but BSSID is not Broadcast Address.\n"));
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/* Check key length for TKIP */
|
||||
if ((encryptionalgo== _TKIP_) && (key->KeyLength != 32)) {
|
||||
if ((encryptionalgo == _TKIP_) && (key->KeyLength != 32)) {
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,(" TKIP GTK KeyLength:%u != 32\n", key->KeyLength));
|
||||
ret= _FAIL;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, (" TKIP GTK KeyLength:%u != 32\n", key->KeyLength));
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
|
||||
} else if (encryptionalgo== _AES_ && (key->KeyLength != 16 && key->KeyLength != 32) ) {
|
||||
} else if (encryptionalgo == _AES_ && (key->KeyLength != 16 && key->KeyLength != 32) ) {
|
||||
|
||||
/* Check key length for AES */
|
||||
/* For NDTEST, we allow keylen=32 in this case. 2005.01.27, by rcnjko. */
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("<=== SetInfo, OID_802_11_ADD_KEY: AES GTK KeyLength:%u != 16 or 32\n", key->KeyLength));
|
||||
ret= _FAIL;
|
||||
/* For NDTEST, we allow keylen =32 in this case. 2005.01.27, by rcnjko. */
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("<=== SetInfo, OID_802_11_ADD_KEY: AES GTK KeyLength:%u != 16 or 32\n", key->KeyLength));
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/* Change the key length for EAPPkt9x.vxd. Added by Annie, 2005-11-03. */
|
||||
if ((encryptionalgo== _AES_) && (key->KeyLength == 32) ) {
|
||||
if ((encryptionalgo == _AES_) && (key->KeyLength == 32) ) {
|
||||
key->KeyLength = 16;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("AES key length changed: %u\n", key->KeyLength) );
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("AES key length changed: %u\n", key->KeyLength) );
|
||||
}
|
||||
|
||||
if (key->KeyIndex & 0x8000000) {/* error ??? 0x8000_0000 */
|
||||
bgrouptkey = true;
|
||||
}
|
||||
|
||||
if ((check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE)==true)&&(check_fwstate(&padapter->mlmepriv, _FW_LINKED)==true))
|
||||
if ((check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE) ==true)&&(check_fwstate(&padapter->mlmepriv, _FW_LINKED) ==true))
|
||||
{
|
||||
bgrouptkey = true;
|
||||
}
|
||||
|
||||
bgroup = true;
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("------------------------------------------\n") );
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("[Group Key set]\n") );
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("------------------------------------------\n")) ;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("key index: 0x%8x(0x%8x)\n", key->KeyIndex,(key->KeyIndex&0x3)));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("key Length: %d\n", key->KeyLength)) ;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("------------------------------------------\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("------------------------------------------\n") );
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("[Group Key set]\n") );
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("------------------------------------------\n")) ;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("key index: 0x%8x(0x%8x)\n", key->KeyIndex, (key->KeyIndex&0x3)));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("key Length: %d\n", key->KeyLength)) ;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("------------------------------------------\n"));
|
||||
|
||||
}
|
||||
|
||||
/* If WEP encryption algorithm, just call rtw_set_802_11_add_wep(). */
|
||||
if ((padapter->securitypriv.dot11AuthAlgrthm !=dot11AuthAlgrthm_8021X)&&(encryptionalgo== _WEP40_ || encryptionalgo== _WEP104_))
|
||||
if ((padapter->securitypriv.dot11AuthAlgrthm !=dot11AuthAlgrthm_8021X)&&(encryptionalgo == _WEP40_ || encryptionalgo == _WEP104_))
|
||||
{
|
||||
u8 ret;
|
||||
u32 keyindex;
|
||||
u32 len = FIELD_OFFSET(struct ndis_802_11_key, KeyMaterial) + key->KeyLength;
|
||||
struct ndis_802_11_wep *wep = &padapter->securitypriv.ndiswep;
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("OID_802_11_ADD_KEY: +++++ WEP key +++++\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("OID_802_11_ADD_KEY: +++++ WEP key +++++\n"));
|
||||
|
||||
wep->Length = len;
|
||||
keyindex = key->KeyIndex&0x7fffffff;
|
||||
wep->KeyIndex = keyindex ;
|
||||
wep->KeyLength = key->KeyLength;
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("OID_802_11_ADD_KEY:Before memcpy\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("OID_802_11_ADD_KEY:Before memcpy\n"));
|
||||
|
||||
memcpy(wep->KeyMaterial, key->KeyMaterial, key->KeyLength);
|
||||
memcpy(&(padapter->securitypriv.dot11DefKey[keyindex].skey[0]), key->KeyMaterial, key->KeyLength);
|
||||
|
||||
padapter->securitypriv.dot11DefKeylen[keyindex]=key->KeyLength;
|
||||
padapter->securitypriv.dot11PrivacyKeyIndex=keyindex;
|
||||
padapter->securitypriv.dot11PrivacyKeyIndex =keyindex;
|
||||
|
||||
ret = rtw_set_802_11_add_wep(padapter, wep);
|
||||
|
||||
|
@ -989,15 +989,15 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key)
|
|||
|
||||
if (key->KeyIndex & 0x20000000){
|
||||
/* SetRSC */
|
||||
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)
|
||||
{
|
||||
unsigned long long keysrc=key->KeyRSC & 0x00FFFFFFFFFFFFULL;
|
||||
unsigned long long keysrc =key->KeyRSC & 0x00FFFFFFFFFFFFULL;
|
||||
memcpy(&padapter->securitypriv.dot11Grprxpn, &keysrc, 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned long long keysrc=key->KeyRSC & 0x00FFFFFFFFFFFFULL;
|
||||
unsigned long long keysrc =key->KeyRSC & 0x00FFFFFFFFFFFFULL;
|
||||
memcpy(&padapter->securitypriv.dot11Grptxpn, &keysrc, 8);
|
||||
}
|
||||
|
||||
|
@ -1011,7 +1011,7 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key)
|
|||
|
||||
if (bgrouptkey == true)
|
||||
{
|
||||
padapter->securitypriv.dot118021XGrpKeyid=(u8)key->KeyIndex;
|
||||
padapter->securitypriv.dot118021XGrpKeyid =(u8)key->KeyIndex;
|
||||
}
|
||||
|
||||
if ((key->KeyIndex&0x3) == 0){
|
||||
|
@ -1028,12 +1028,12 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key)
|
|||
memcpy(&padapter->securitypriv.dot118021XGrptxmickey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial + 16, 8);
|
||||
memcpy(&padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial + 24, 8);
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n rtw_set_802_11_add_key:rx mic :0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
|
||||
padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)].skey[0],padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex-1) & 0x03)].skey[1],
|
||||
padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)].skey[2],padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex-1) & 0x03)].skey[3],
|
||||
padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)].skey[4],padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex-1) & 0x03)].skey[5],
|
||||
padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)].skey[6],padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex-1) & 0x03)].skey[7]));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n rtw_set_802_11_add_key:set Group mic key!!!!!!!!\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n rtw_set_802_11_add_key:rx mic :0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
|
||||
padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)].skey[0], padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex-1) & 0x03)].skey[1],
|
||||
padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)].skey[2], padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex-1) & 0x03)].skey[3],
|
||||
padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)].skey[4], padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex-1) & 0x03)].skey[5],
|
||||
padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)].skey[6], padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex-1) & 0x03)].skey[7]));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n rtw_set_802_11_add_key:set Group mic key!!!!!!!!\n"));
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -1041,30 +1041,30 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key)
|
|||
memcpy(&padapter->securitypriv.dot118021XGrptxmickey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial + 24, 8);
|
||||
memcpy(&padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial + 16, 8);
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n rtw_set_802_11_add_key:rx mic :0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
|
||||
padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)].skey[0],padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex-1) & 0x03)].skey[1],
|
||||
padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)].skey[2],padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex-1) & 0x03)].skey[3],
|
||||
padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)].skey[4],padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex-1) & 0x03)].skey[5],
|
||||
padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)].skey[6],padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex-1) & 0x03)].skey[7]));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n rtw_set_802_11_add_key:set Group mic key!!!!!!!!\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n rtw_set_802_11_add_key:rx mic :0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
|
||||
padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)].skey[0], padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex-1) & 0x03)].skey[1],
|
||||
padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)].skey[2], padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex-1) & 0x03)].skey[3],
|
||||
padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)].skey[4], padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex-1) & 0x03)].skey[5],
|
||||
padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)].skey[6], padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex-1) & 0x03)].skey[7]));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n rtw_set_802_11_add_key:set Group mic key!!!!!!!!\n"));
|
||||
|
||||
}
|
||||
|
||||
/* set group key by index */
|
||||
memcpy(&padapter->securitypriv.dot118021XGrpKey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial, key->KeyLength);
|
||||
|
||||
key->KeyIndex=key->KeyIndex & 0x03;
|
||||
key->KeyIndex =key->KeyIndex & 0x03;
|
||||
|
||||
padapter->securitypriv.binstallGrpkey=true;
|
||||
padapter->securitypriv.binstallGrpkey =true;
|
||||
|
||||
padapter->securitypriv.bcheck_grpkey=false;
|
||||
padapter->securitypriv.bcheck_grpkey =false;
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("reset group key"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("reset group key"));
|
||||
|
||||
res=rtw_set_key(padapter,&padapter->securitypriv, key->KeyIndex, 1,true);
|
||||
res =rtw_set_key(padapter,&padapter->securitypriv, key->KeyIndex, 1, true);
|
||||
|
||||
if (res==_FAIL)
|
||||
ret= _FAIL;
|
||||
if (res ==_FAIL)
|
||||
ret = _FAIL;
|
||||
|
||||
goto exit;
|
||||
|
||||
|
@ -1073,8 +1073,8 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key)
|
|||
{
|
||||
u8 res;
|
||||
|
||||
pbssid=get_bssid(&padapter->mlmepriv);
|
||||
stainfo=rtw_get_stainfo(&padapter->stapriv , pbssid );
|
||||
pbssid =get_bssid(&padapter->mlmepriv);
|
||||
stainfo =rtw_get_stainfo(&padapter->stapriv , pbssid );
|
||||
|
||||
if (stainfo!=NULL)
|
||||
{
|
||||
|
@ -1082,13 +1082,13 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key)
|
|||
|
||||
memcpy(&stainfo->dot118021x_UncstKey, key->KeyMaterial, 16);
|
||||
|
||||
if (encryptionalgo== _TKIP_)
|
||||
if (encryptionalgo == _TKIP_)
|
||||
{
|
||||
padapter->securitypriv.busetkipkey=false;
|
||||
padapter->securitypriv.busetkipkey =false;
|
||||
|
||||
/* _set_timer(&padapter->securitypriv.tkip_timer, 50); */
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n ==========_set_timer\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n ==========_set_timer\n"));
|
||||
|
||||
/* if TKIP, save the Receive/Transmit MIC key in KeyMaterial[128-255] */
|
||||
if ((key->KeyIndex & 0x10000000)){
|
||||
|
@ -1111,16 +1111,16 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key)
|
|||
/* Set key to CAM through H2C command */
|
||||
if (bgrouptkey)/* never go to here */
|
||||
{
|
||||
res=rtw_setstakey_cmd(padapter, (unsigned char *)stainfo, false, true);
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n rtw_set_802_11_add_key:rtw_setstakey_cmd(group)\n"));
|
||||
res =rtw_setstakey_cmd(padapter, (unsigned char *)stainfo, false, true);
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n rtw_set_802_11_add_key:rtw_setstakey_cmd(group)\n"));
|
||||
}
|
||||
else{
|
||||
res=rtw_setstakey_cmd(padapter, (unsigned char *)stainfo, true, true);
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n rtw_set_802_11_add_key:rtw_setstakey_cmd(unicast)\n"));
|
||||
res =rtw_setstakey_cmd(padapter, (unsigned char *)stainfo, true, true);
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n rtw_set_802_11_add_key:rtw_setstakey_cmd(unicast)\n"));
|
||||
}
|
||||
|
||||
if (res ==false)
|
||||
ret= _FAIL;
|
||||
ret = _FAIL;
|
||||
|
||||
}
|
||||
|
||||
|
@ -1140,17 +1140,17 @@ u8 rtw_set_802_11_remove_key(struct adapter* padapter, struct ndis_802_11_remove
|
|||
struct sta_info *stainfo;
|
||||
u8 bgroup = (key->KeyIndex & 0x4000000) > 0 ? false: true;
|
||||
u8 keyIndex = (u8)key->KeyIndex & 0x03;
|
||||
u8 ret=_SUCCESS;
|
||||
u8 ret =_SUCCESS;
|
||||
|
||||
;
|
||||
|
||||
if ((key->KeyIndex & 0xbffffffc) > 0) {
|
||||
ret=_FAIL;
|
||||
ret =_FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (bgroup == true) {
|
||||
encryptionalgo= padapter->securitypriv.dot118021XGrpPrivacy;
|
||||
encryptionalgo = padapter->securitypriv.dot118021XGrpPrivacy;
|
||||
/* clear group key by index */
|
||||
/* NdisZeroMemory(Adapter->MgntInfo.SecurityInfo.KeyBuf[keyIndex], MAX_WEP_KEY_LEN); */
|
||||
/* Adapter->MgntInfo.SecurityInfo.KeyLen[keyIndex] = 0; */
|
||||
|
@ -1159,17 +1159,17 @@ u8 rtw_set_802_11_remove_key(struct adapter* padapter, struct ndis_802_11_remove
|
|||
|
||||
/* \todo Send a H2C Command to Firmware for removing this Key in CAM Entry. */
|
||||
} else {
|
||||
pbssid=get_bssid(&padapter->mlmepriv);
|
||||
stainfo=rtw_get_stainfo(&padapter->stapriv , pbssid );
|
||||
pbssid =get_bssid(&padapter->mlmepriv);
|
||||
stainfo =rtw_get_stainfo(&padapter->stapriv , pbssid );
|
||||
if (stainfo !=NULL){
|
||||
encryptionalgo=stainfo->dot118021XPrivacy;
|
||||
encryptionalgo =stainfo->dot118021XPrivacy;
|
||||
|
||||
/* clear key by BSSID */
|
||||
memset(&stainfo->dot118021x_UncstKey, 0, 16);
|
||||
|
||||
/* \todo Send a H2C Command to Firmware for disable this Key in CAM Entry. */
|
||||
} else{
|
||||
ret= _FAIL;
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
@ -1196,8 +1196,8 @@ u16 rtw_get_cur_max_rate(struct adapter *adapter)
|
|||
struct wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network;
|
||||
struct ieee80211_ht_cap *pht_capie;
|
||||
u8 rf_type = 0;
|
||||
u8 bw_40MHz=0, short_GI_20=0, short_GI_40=0;
|
||||
u16 mcs_rate=0;
|
||||
u8 bw_40MHz =0, short_GI_20 =0, short_GI_40 =0;
|
||||
u16 mcs_rate =0;
|
||||
u32 ht_ielen = 0;
|
||||
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) != true)
|
||||
|
|
|
@ -37,7 +37,7 @@ struct xmit_frame *rtw_IOL_accquire_xmit_frame(struct adapter *adapter)
|
|||
{
|
||||
DBG_871X("%s rtw_alloc_xmitbuf return null\n", __FUNCTION__);
|
||||
rtw_free_xmitframe(pxmitpriv, xmit_frame);
|
||||
xmit_frame=NULL;
|
||||
xmit_frame =NULL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ bool rtw_IOL_applied(struct adapter *adapter)
|
|||
|
||||
int rtw_IOL_exec_cmds_sync(struct adapter *adapter, struct xmit_frame *xmit_frame, u32 max_wating_ms, u32 bndy_cnt)
|
||||
{
|
||||
return rtw_hal_iol_cmd(adapter, xmit_frame, max_wating_ms,bndy_cnt);
|
||||
return rtw_hal_iol_cmd(adapter, xmit_frame, max_wating_ms, bndy_cnt);
|
||||
}
|
||||
|
||||
int rtw_IOL_append_LLT_cmd(struct xmit_frame *xmit_frame, u8 page_boundary)
|
||||
|
@ -102,7 +102,7 @@ int rtw_IOL_append_LLT_cmd(struct xmit_frame *xmit_frame, u8 page_boundary)
|
|||
}
|
||||
int _rtw_IOL_append_WB_cmd(struct xmit_frame *xmit_frame, u16 addr, u8 value, u8 mask)
|
||||
{
|
||||
struct ioreg_cfg cmd = {8,IOREG_CMD_WB_REG,0x0, 0x0,0x0};
|
||||
struct ioreg_cfg cmd = {8, IOREG_CMD_WB_REG, 0x0, 0x0, 0x0};
|
||||
|
||||
/* RTW_PUT_LE16((u8*)&cmd.address, addr); */
|
||||
/* RTW_PUT_LE32((u8*)&cmd.value, (u32)value); */
|
||||
|
@ -116,14 +116,14 @@ int _rtw_IOL_append_WB_cmd(struct xmit_frame *xmit_frame, u16 addr, u8 value, u8
|
|||
cmd.mask = cpu_to_le32(mask);
|
||||
}
|
||||
|
||||
/* DBG_871X("%s addr:0x%04x,value:0x%08x,mask:0x%08x\n", __FUNCTION__, addr,value,mask); */
|
||||
/* DBG_871X("%s addr:0x%04x, value:0x%08x, mask:0x%08x\n", __FUNCTION__, addr, value, mask); */
|
||||
|
||||
return rtw_IOL_append_cmds(xmit_frame, (u8*)&cmd, cmd.length);
|
||||
|
||||
}
|
||||
int _rtw_IOL_append_WW_cmd(struct xmit_frame *xmit_frame, u16 addr, u16 value, u16 mask)
|
||||
{
|
||||
struct ioreg_cfg cmd = {8,IOREG_CMD_WW_REG,0x0, 0x0,0x0};
|
||||
struct ioreg_cfg cmd = {8, IOREG_CMD_WW_REG, 0x0, 0x0, 0x0};
|
||||
|
||||
/* RTW_PUT_LE16((u8*)&cmd.address, addr); */
|
||||
/* RTW_PUT_LE32((u8*)&cmd.value, (u32)value); */
|
||||
|
@ -137,14 +137,14 @@ int _rtw_IOL_append_WW_cmd(struct xmit_frame *xmit_frame, u16 addr, u16 value, u
|
|||
cmd.mask = cpu_to_le32(mask);
|
||||
}
|
||||
|
||||
/* DBG_871X("%s addr:0x%04x,value:0x%08x,mask:0x%08x\n", __FUNCTION__, addr,value,mask); */
|
||||
/* DBG_871X("%s addr:0x%04x, value:0x%08x, mask:0x%08x\n", __FUNCTION__, addr, value, mask); */
|
||||
|
||||
return rtw_IOL_append_cmds(xmit_frame, (u8*)&cmd, cmd.length);
|
||||
|
||||
}
|
||||
int _rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr, u32 value, u32 mask)
|
||||
{
|
||||
struct ioreg_cfg cmd = {8,IOREG_CMD_WD_REG,0x0, 0x0,0x0};
|
||||
struct ioreg_cfg cmd = {8, IOREG_CMD_WD_REG, 0x0, 0x0, 0x0};
|
||||
|
||||
/* RTW_PUT_LE16((u8*)&cmd.address, addr); */
|
||||
/* RTW_PUT_LE32((u8*)&cmd.value, (u32)value); */
|
||||
|
@ -158,7 +158,7 @@ int _rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr, u32 value, u
|
|||
cmd.mask = cpu_to_le32(mask);
|
||||
}
|
||||
|
||||
/* DBG_871X("%s addr:0x%04x,value:0x%08x,mask:0x%08x\n", __FU2NCTION__, addr,value,mask); */
|
||||
/* DBG_871X("%s addr:0x%04x, value:0x%08x, mask:0x%08x\n", __FU2NCTION__, addr, value, mask); */
|
||||
|
||||
return rtw_IOL_append_cmds(xmit_frame, (u8*)&cmd, cmd.length);
|
||||
|
||||
|
@ -166,7 +166,7 @@ int _rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr, u32 value, u
|
|||
|
||||
int _rtw_IOL_append_WRF_cmd(struct xmit_frame *xmit_frame, u8 rf_path, u16 addr, u32 value, u32 mask)
|
||||
{
|
||||
struct ioreg_cfg cmd = {8,IOREG_CMD_W_RF,0x0, 0x0,0x0};
|
||||
struct ioreg_cfg cmd = {8, IOREG_CMD_W_RF, 0x0, 0x0, 0x0};
|
||||
|
||||
/* RTW_PUT_LE16((u8*)&cmd.address, addr); */
|
||||
/* RTW_PUT_LE32((u8*)&cmd.value, (u32)value); */
|
||||
|
@ -180,7 +180,7 @@ int _rtw_IOL_append_WRF_cmd(struct xmit_frame *xmit_frame, u8 rf_path, u16 addr,
|
|||
cmd.mask = cpu_to_le32(mask);
|
||||
}
|
||||
|
||||
/* DBG_871X("%s rf_path:0x%02x addr:0x%04x,value:0x%08x,mask:0x%08x\n", __FU2NCTION__,rf_path, addr,value,mask); */
|
||||
/* DBG_871X("%s rf_path:0x%02x addr:0x%04x, value:0x%08x, mask:0x%08x\n", __FU2NCTION__, rf_path, addr, value, mask); */
|
||||
|
||||
return rtw_IOL_append_cmds(xmit_frame, (u8*)&cmd, cmd.length);
|
||||
|
||||
|
@ -190,7 +190,7 @@ int _rtw_IOL_append_WRF_cmd(struct xmit_frame *xmit_frame, u8 rf_path, u16 addr,
|
|||
|
||||
int rtw_IOL_append_DELAY_US_cmd(struct xmit_frame *xmit_frame, u16 us)
|
||||
{
|
||||
struct ioreg_cfg cmd = {4,IOREG_CMD_DELAY_US,0x0, 0x0,0x0};
|
||||
struct ioreg_cfg cmd = {4, IOREG_CMD_DELAY_US, 0x0, 0x0, 0x0};
|
||||
/* RTW_PUT_LE16((u8*)&cmd.address, us); */
|
||||
cmd.address = cpu_to_le16(us);
|
||||
|
||||
|
@ -200,7 +200,7 @@ int rtw_IOL_append_DELAY_US_cmd(struct xmit_frame *xmit_frame, u16 us)
|
|||
|
||||
int rtw_IOL_append_DELAY_MS_cmd(struct xmit_frame *xmit_frame, u16 ms)
|
||||
{
|
||||
struct ioreg_cfg cmd = {4,IOREG_CMD_DELAY_US,0x0, 0x0,0x0};
|
||||
struct ioreg_cfg cmd = {4, IOREG_CMD_DELAY_US, 0x0, 0x0, 0x0};
|
||||
|
||||
/* RTW_PUT_LE16((u8*)&cmd.address, ms); */
|
||||
cmd.address = cpu_to_le16(ms);
|
||||
|
@ -210,7 +210,7 @@ int rtw_IOL_append_DELAY_MS_cmd(struct xmit_frame *xmit_frame, u16 ms)
|
|||
}
|
||||
int rtw_IOL_append_END_cmd(struct xmit_frame *xmit_frame)
|
||||
{
|
||||
struct ioreg_cfg cmd = {4,IOREG_CMD_END, cpu_to_le16(0xFFFF),
|
||||
struct ioreg_cfg cmd = {4, IOREG_CMD_END, cpu_to_le16(0xFFFF),
|
||||
cpu_to_le32(0xFF), 0x0};
|
||||
return rtw_IOL_append_cmds(xmit_frame, (u8*)&cmd, 4);
|
||||
|
||||
|
@ -223,24 +223,24 @@ u8 rtw_IOL_cmd_boundary_handle(struct xmit_frame *pxmit_frame)
|
|||
rtw_IOL_append_END_cmd(pxmit_frame);
|
||||
pxmit_frame->attrib.pktlen = ((((pxmit_frame->attrib.pktlen+32)/256)+1)*256 );
|
||||
|
||||
/* printk("==> %s, pktlen(%d)\n",__FUNCTION__,pxmit_frame->attrib.pktlen); */
|
||||
/* printk("==> %s, pktlen(%d)\n", __FUNCTION__, pxmit_frame->attrib.pktlen); */
|
||||
pxmit_frame->attrib.last_txcmdsz = pxmit_frame->attrib.pktlen;
|
||||
is_cmd_bndy = true;
|
||||
}
|
||||
return is_cmd_bndy;
|
||||
}
|
||||
|
||||
void rtw_IOL_cmd_buf_dump(struct adapter *Adapter,int buf_len,u8 *pbuf)
|
||||
void rtw_IOL_cmd_buf_dump(struct adapter *Adapter, int buf_len, u8 *pbuf)
|
||||
{
|
||||
int i;
|
||||
int j=1;
|
||||
int j =1;
|
||||
|
||||
printk("###### %s ######\n",__FUNCTION__);
|
||||
for (i=0;i< buf_len;i++){
|
||||
printk("###### %s ######\n", __FUNCTION__);
|
||||
for (i =0;i< buf_len;i++){
|
||||
printk("%02x-",*(pbuf+i));
|
||||
|
||||
if (j%32 ==0) printk("\n");j++;
|
||||
}
|
||||
printk("\n");
|
||||
printk("============= ioreg_cmd len = %d ===============\n",buf_len);
|
||||
printk("============= ioreg_cmd len = %d ===============\n", buf_len);
|
||||
}
|
||||
|
|
122
core/rtw_led.c
122
core/rtw_led.c
|
@ -126,12 +126,12 @@ static void SwLedBlink(PLED_871x pLed)
|
|||
if ( pLed->BlinkingLedState == RTW_LED_ON )
|
||||
{
|
||||
SwLedOn(padapter, pLed);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("Blinktimes (%d): turn on\n", pLed->BlinkTimes));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn on\n", pLed->BlinkTimes));
|
||||
}
|
||||
else
|
||||
{
|
||||
SwLedOff(padapter, pLed);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,( "Blinktimes (%d): turn off\n", pLed->BlinkTimes));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ( "Blinktimes (%d): turn off\n", pLed->BlinkTimes));
|
||||
}
|
||||
|
||||
/* Determine if we shall change LED state again. */
|
||||
|
@ -183,11 +183,11 @@ static void SwLedBlink(PLED_871x pLed)
|
|||
{
|
||||
SwLedOff(padapter, pLed);
|
||||
}
|
||||
else if ( (check_fwstate(pmlmepriv, _FW_LINKED)== true) && (pLed->bLedOn == false))
|
||||
else if ( (check_fwstate(pmlmepriv, _FW_LINKED) == true) && (pLed->bLedOn == false))
|
||||
{
|
||||
SwLedOn(padapter, pLed);
|
||||
}
|
||||
else if ( (check_fwstate(pmlmepriv, _FW_LINKED)== true) && pLed->bLedOn == true)
|
||||
else if ( (check_fwstate(pmlmepriv, _FW_LINKED) == true) && pLed->bLedOn == true)
|
||||
{
|
||||
SwLedOff(padapter, pLed);
|
||||
}
|
||||
|
@ -243,12 +243,12 @@ static void SwLedBlink1(PLED_871x pLed)
|
|||
if ( pLed->BlinkingLedState == RTW_LED_ON )
|
||||
{
|
||||
SwLedOn(padapter, pLed);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,( "Blinktimes (%d): turn on\n", pLed->BlinkTimes));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ( "Blinktimes (%d): turn on\n", pLed->BlinkTimes));
|
||||
}
|
||||
else
|
||||
{
|
||||
SwLedOff(padapter, pLed);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("Blinktimes (%d): turn off\n", pLed->BlinkTimes));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn off\n", pLed->BlinkTimes));
|
||||
}
|
||||
|
||||
if (adapter_to_pwrctl(padapter)->rf_pwrstate != rf_on )
|
||||
|
@ -285,7 +285,7 @@ static void SwLedBlink1(PLED_871x pLed)
|
|||
|
||||
if (bStopBlinking)
|
||||
{
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED)== true)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
{
|
||||
pLed->bLedLinkBlinkInProgress = true;
|
||||
pLed->CurrLedState = LED_BLINK_NORMAL;
|
||||
|
@ -294,10 +294,10 @@ static void SwLedBlink1(PLED_871x pLed)
|
|||
else
|
||||
pLed->BlinkingLedState = RTW_LED_ON;
|
||||
_set_timer(&(pLed->BlinkTimer), LED_BLINK_LINK_INTERVAL_ALPHA);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("CurrLedState %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
|
||||
|
||||
}
|
||||
else if (check_fwstate(pmlmepriv, _FW_LINKED)== false)
|
||||
else if (check_fwstate(pmlmepriv, _FW_LINKED) == false)
|
||||
{
|
||||
pLed->bLedNoLinkBlinkInProgress = true;
|
||||
pLed->CurrLedState = LED_BLINK_SLOWLY;
|
||||
|
@ -306,7 +306,7 @@ static void SwLedBlink1(PLED_871x pLed)
|
|||
else
|
||||
pLed->BlinkingLedState = RTW_LED_ON;
|
||||
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("CurrLedState %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
|
||||
}
|
||||
pLed->bLedScanBlinkInProgress = false;
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ static void SwLedBlink1(PLED_871x pLed)
|
|||
}
|
||||
if (bStopBlinking)
|
||||
{
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED)== true)
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
{
|
||||
pLed->bLedLinkBlinkInProgress = true;
|
||||
pLed->CurrLedState = LED_BLINK_NORMAL;
|
||||
|
@ -337,9 +337,9 @@ static void SwLedBlink1(PLED_871x pLed)
|
|||
else
|
||||
pLed->BlinkingLedState = RTW_LED_ON;
|
||||
_set_timer(&(pLed->BlinkTimer), LED_BLINK_LINK_INTERVAL_ALPHA);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("CurrLedState %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
|
||||
}
|
||||
else if (check_fwstate(pmlmepriv, _FW_LINKED)== false)
|
||||
else if (check_fwstate(pmlmepriv, _FW_LINKED) == false)
|
||||
{
|
||||
pLed->bLedNoLinkBlinkInProgress = true;
|
||||
pLed->CurrLedState = LED_BLINK_SLOWLY;
|
||||
|
@ -348,7 +348,7 @@ static void SwLedBlink1(PLED_871x pLed)
|
|||
else
|
||||
pLed->BlinkingLedState = RTW_LED_ON;
|
||||
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("CurrLedState %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
|
||||
}
|
||||
pLed->BlinkTimes = 0;
|
||||
pLed->bLedBlinkInProgress = false;
|
||||
|
@ -386,7 +386,7 @@ static void SwLedBlink1(PLED_871x pLed)
|
|||
else
|
||||
pLed->BlinkingLedState = RTW_LED_ON;
|
||||
_set_timer(&(pLed->BlinkTimer), LED_BLINK_LINK_INTERVAL_ALPHA);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("CurrLedState %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
|
||||
|
||||
pLed->bLedWPSBlinkInProgress = false;
|
||||
}
|
||||
|
@ -412,12 +412,12 @@ static void SwLedBlink2(PLED_871x pLed)
|
|||
if ( pLed->BlinkingLedState == RTW_LED_ON)
|
||||
{
|
||||
SwLedOn(padapter, pLed);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("Blinktimes (%d): turn on\n", pLed->BlinkTimes));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn on\n", pLed->BlinkTimes));
|
||||
}
|
||||
else
|
||||
{
|
||||
SwLedOff(padapter, pLed);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("Blinktimes (%d): turn off\n", pLed->BlinkTimes));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn off\n", pLed->BlinkTimes));
|
||||
}
|
||||
|
||||
switch (pLed->CurrLedState)
|
||||
|
@ -435,20 +435,20 @@ static void SwLedBlink2(PLED_871x pLed)
|
|||
{
|
||||
SwLedOff(padapter, pLed);
|
||||
}
|
||||
else if (check_fwstate(pmlmepriv, _FW_LINKED)== true)
|
||||
else if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
{
|
||||
pLed->CurrLedState = RTW_LED_ON;
|
||||
pLed->BlinkingLedState = RTW_LED_ON;
|
||||
SwLedOn(padapter, pLed);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("stop scan blink CurrLedState %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("stop scan blink CurrLedState %d\n", pLed->CurrLedState));
|
||||
|
||||
}
|
||||
else if (check_fwstate(pmlmepriv, _FW_LINKED)== false)
|
||||
else if (check_fwstate(pmlmepriv, _FW_LINKED) == false)
|
||||
{
|
||||
pLed->CurrLedState = RTW_LED_OFF;
|
||||
pLed->BlinkingLedState = RTW_LED_OFF;
|
||||
SwLedOff(padapter, pLed);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("stop scan blink CurrLedState %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("stop scan blink CurrLedState %d\n", pLed->CurrLedState));
|
||||
}
|
||||
pLed->bLedScanBlinkInProgress = false;
|
||||
}
|
||||
|
@ -481,20 +481,20 @@ static void SwLedBlink2(PLED_871x pLed)
|
|||
{
|
||||
SwLedOff(padapter, pLed);
|
||||
}
|
||||
else if (check_fwstate(pmlmepriv, _FW_LINKED)== true)
|
||||
else if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
{
|
||||
pLed->CurrLedState = RTW_LED_ON;
|
||||
pLed->BlinkingLedState = RTW_LED_ON;
|
||||
SwLedOn(padapter, pLed);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("stop CurrLedState %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("stop CurrLedState %d\n", pLed->CurrLedState));
|
||||
|
||||
}
|
||||
else if (check_fwstate(pmlmepriv, _FW_LINKED)== false)
|
||||
else if (check_fwstate(pmlmepriv, _FW_LINKED) == false)
|
||||
{
|
||||
pLed->CurrLedState = RTW_LED_OFF;
|
||||
pLed->BlinkingLedState = RTW_LED_OFF;
|
||||
SwLedOff(padapter, pLed);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("stop CurrLedState %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("stop CurrLedState %d\n", pLed->CurrLedState));
|
||||
}
|
||||
pLed->bLedBlinkInProgress = false;
|
||||
}
|
||||
|
@ -531,13 +531,13 @@ static void SwLedBlink3(PLED_871x pLed)
|
|||
if ( pLed->BlinkingLedState == RTW_LED_ON )
|
||||
{
|
||||
SwLedOn(padapter, pLed);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("Blinktimes (%d): turn on\n", pLed->BlinkTimes));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn on\n", pLed->BlinkTimes));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pLed->CurrLedState != LED_BLINK_WPS_STOP)
|
||||
SwLedOff(padapter, pLed);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("Blinktimes (%d): turn off\n", pLed->BlinkTimes));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn off\n", pLed->BlinkTimes));
|
||||
}
|
||||
|
||||
switch (pLed->CurrLedState)
|
||||
|
@ -555,23 +555,23 @@ static void SwLedBlink3(PLED_871x pLed)
|
|||
{
|
||||
SwLedOff(padapter, pLed);
|
||||
}
|
||||
else if (check_fwstate(pmlmepriv, _FW_LINKED)== true)
|
||||
else if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
{
|
||||
pLed->CurrLedState = RTW_LED_ON;
|
||||
pLed->BlinkingLedState = RTW_LED_ON;
|
||||
if ( !pLed->bLedOn )
|
||||
SwLedOn(padapter, pLed);
|
||||
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("CurrLedState %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
|
||||
}
|
||||
else if (check_fwstate(pmlmepriv, _FW_LINKED)== false)
|
||||
else if (check_fwstate(pmlmepriv, _FW_LINKED) == false)
|
||||
{
|
||||
pLed->CurrLedState = RTW_LED_OFF;
|
||||
pLed->BlinkingLedState = RTW_LED_OFF;
|
||||
if ( pLed->bLedOn )
|
||||
SwLedOff(padapter, pLed);
|
||||
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("CurrLedState %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
|
||||
}
|
||||
pLed->bLedScanBlinkInProgress = false;
|
||||
}
|
||||
|
@ -604,7 +604,7 @@ static void SwLedBlink3(PLED_871x pLed)
|
|||
{
|
||||
SwLedOff(padapter, pLed);
|
||||
}
|
||||
else if (check_fwstate(pmlmepriv, _FW_LINKED)== true)
|
||||
else if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
{
|
||||
pLed->CurrLedState = RTW_LED_ON;
|
||||
pLed->BlinkingLedState = RTW_LED_ON;
|
||||
|
@ -612,9 +612,9 @@ static void SwLedBlink3(PLED_871x pLed)
|
|||
if ( !pLed->bLedOn )
|
||||
SwLedOn(padapter, pLed);
|
||||
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("CurrLedState %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
|
||||
}
|
||||
else if (check_fwstate(pmlmepriv, _FW_LINKED)== false)
|
||||
else if (check_fwstate(pmlmepriv, _FW_LINKED) == false)
|
||||
{
|
||||
pLed->CurrLedState = RTW_LED_OFF;
|
||||
pLed->BlinkingLedState = RTW_LED_OFF;
|
||||
|
@ -623,7 +623,7 @@ static void SwLedBlink3(PLED_871x pLed)
|
|||
SwLedOff(padapter, pLed);
|
||||
|
||||
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("CurrLedState %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
|
||||
}
|
||||
pLed->bLedBlinkInProgress = false;
|
||||
}
|
||||
|
@ -675,7 +675,7 @@ static void SwLedBlink3(PLED_871x pLed)
|
|||
pLed->CurrLedState = RTW_LED_ON;
|
||||
pLed->BlinkingLedState = RTW_LED_ON;
|
||||
SwLedOn(padapter, pLed);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("CurrLedState %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
|
||||
}
|
||||
pLed->bLedWPSBlinkInProgress = false;
|
||||
}
|
||||
|
@ -699,12 +699,12 @@ static void SwLedBlink4(PLED_871x pLed)
|
|||
if ( pLed->BlinkingLedState == RTW_LED_ON )
|
||||
{
|
||||
SwLedOn(padapter, pLed);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("Blinktimes (%d): turn on\n", pLed->BlinkTimes));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn on\n", pLed->BlinkTimes));
|
||||
}
|
||||
else
|
||||
{
|
||||
SwLedOff(padapter, pLed);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("Blinktimes (%d): turn off\n", pLed->BlinkTimes));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn off\n", pLed->BlinkTimes));
|
||||
}
|
||||
|
||||
if (!pLed1->bLedWPSBlinkInProgress && pLed1->BlinkingLedState == LED_UNKNOWN)
|
||||
|
@ -878,7 +878,7 @@ static void SwLedBlink4(PLED_871x pLed)
|
|||
break;
|
||||
}
|
||||
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("SwLedBlink4 CurrLedState %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("SwLedBlink4 CurrLedState %d\n", pLed->CurrLedState));
|
||||
}
|
||||
|
||||
static void SwLedBlink5(PLED_871x pLed)
|
||||
|
@ -891,12 +891,12 @@ static void SwLedBlink5(PLED_871x pLed)
|
|||
if ( pLed->BlinkingLedState == RTW_LED_ON )
|
||||
{
|
||||
SwLedOn(padapter, pLed);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("Blinktimes (%d): turn on\n", pLed->BlinkTimes));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn on\n", pLed->BlinkTimes));
|
||||
}
|
||||
else
|
||||
{
|
||||
SwLedOff(padapter, pLed);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("Blinktimes (%d): turn off\n", pLed->BlinkTimes));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn off\n", pLed->BlinkTimes));
|
||||
}
|
||||
|
||||
switch (pLed->CurrLedState)
|
||||
|
@ -991,7 +991,7 @@ static void SwLedBlink5(PLED_871x pLed)
|
|||
break;
|
||||
}
|
||||
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("SwLedBlink5 CurrLedState %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("SwLedBlink5 CurrLedState %d\n", pLed->CurrLedState));
|
||||
}
|
||||
|
||||
static void SwLedBlink6(PLED_871x pLed)
|
||||
|
@ -1004,15 +1004,15 @@ static void SwLedBlink6(PLED_871x pLed)
|
|||
if ( pLed->BlinkingLedState == RTW_LED_ON )
|
||||
{
|
||||
SwLedOn(padapter, pLed);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("Blinktimes (%d): turn on\n", pLed->BlinkTimes));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn on\n", pLed->BlinkTimes));
|
||||
}
|
||||
else
|
||||
{
|
||||
SwLedOff(padapter, pLed);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("Blinktimes (%d): turn off\n", pLed->BlinkTimes));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn off\n", pLed->BlinkTimes));
|
||||
}
|
||||
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("<==== blink6\n"));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("<==== blink6\n"));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1125,7 +1125,7 @@ SwLedControlMode0(
|
|||
break;
|
||||
}
|
||||
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("Led %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Led %d\n", pLed->CurrLedState));
|
||||
|
||||
}
|
||||
|
||||
|
@ -1200,7 +1200,7 @@ SwLedControlMode1(
|
|||
break;
|
||||
|
||||
case LED_CTL_SITE_SURVEY:
|
||||
if ((pmlmepriv->LinkDetectInfo.bBusyTraffic) && (check_fwstate(pmlmepriv, _FW_LINKED)== true))
|
||||
if ((pmlmepriv->LinkDetectInfo.bBusyTraffic) && (check_fwstate(pmlmepriv, _FW_LINKED) == true))
|
||||
;
|
||||
else if (pLed->bLedScanBlinkInProgress ==false)
|
||||
{
|
||||
|
@ -1393,7 +1393,7 @@ SwLedControlMode1(
|
|||
|
||||
}
|
||||
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("Led %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Led %d\n", pLed->CurrLedState));
|
||||
}
|
||||
|
||||
/* Arcadyan/Sitecom , added by chiyoko, 20090216 */
|
||||
|
@ -1435,7 +1435,7 @@ SwLedControlMode2(
|
|||
|
||||
case LED_CTL_TX:
|
||||
case LED_CTL_RX:
|
||||
if ((pLed->bLedBlinkInProgress ==false) && (check_fwstate(pmlmepriv, _FW_LINKED)== true))
|
||||
if ((pLed->bLedBlinkInProgress ==false) && (check_fwstate(pmlmepriv, _FW_LINKED) == true))
|
||||
{
|
||||
if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed))
|
||||
{
|
||||
|
@ -1502,7 +1502,7 @@ SwLedControlMode2(
|
|||
pLed->CurrLedState = RTW_LED_ON;
|
||||
pLed->BlinkingLedState = RTW_LED_ON;
|
||||
_set_timer(&(pLed->BlinkTimer), 0);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("CurrLedState %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1517,7 +1517,7 @@ SwLedControlMode2(
|
|||
pLed->CurrLedState = RTW_LED_OFF;
|
||||
pLed->BlinkingLedState = RTW_LED_OFF;
|
||||
_set_timer(&(pLed->BlinkTimer), 0);
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("CurrLedState %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1558,7 +1558,7 @@ SwLedControlMode2(
|
|||
|
||||
}
|
||||
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("CurrLedState %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
|
||||
}
|
||||
|
||||
/* COREGA, added by chiyoko, 20090316 */
|
||||
|
@ -1600,7 +1600,7 @@ SwLedControlMode2(
|
|||
|
||||
case LED_CTL_TX:
|
||||
case LED_CTL_RX:
|
||||
if ((pLed->bLedBlinkInProgress ==false) && (check_fwstate(pmlmepriv, _FW_LINKED)== true))
|
||||
if ((pLed->bLedBlinkInProgress ==false) && (check_fwstate(pmlmepriv, _FW_LINKED) == true))
|
||||
{
|
||||
if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed))
|
||||
{
|
||||
|
@ -1736,7 +1736,7 @@ SwLedControlMode2(
|
|||
|
||||
}
|
||||
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("CurrLedState %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1840,7 +1840,7 @@ SwLedControlMode4(
|
|||
break;
|
||||
|
||||
case LED_CTL_SITE_SURVEY:
|
||||
if ((pmlmepriv->LinkDetectInfo.bBusyTraffic) && (check_fwstate(pmlmepriv, _FW_LINKED)== true))
|
||||
if ((pmlmepriv->LinkDetectInfo.bBusyTraffic) && (check_fwstate(pmlmepriv, _FW_LINKED) == true))
|
||||
;
|
||||
else if (pLed->bLedScanBlinkInProgress ==false)
|
||||
{
|
||||
|
@ -2067,7 +2067,7 @@ SwLedControlMode4(
|
|||
|
||||
}
|
||||
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("Led %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Led %d\n", pLed->CurrLedState));
|
||||
}
|
||||
|
||||
|
||||
|
@ -2095,7 +2095,7 @@ SwLedControlMode5(
|
|||
break;
|
||||
|
||||
case LED_CTL_SITE_SURVEY:
|
||||
if ((pmlmepriv->LinkDetectInfo.bBusyTraffic) && (check_fwstate(pmlmepriv, _FW_LINKED)== true))
|
||||
if ((pmlmepriv->LinkDetectInfo.bBusyTraffic) && (check_fwstate(pmlmepriv, _FW_LINKED) == true))
|
||||
;
|
||||
else if (pLed->bLedScanBlinkInProgress ==false)
|
||||
{
|
||||
|
@ -2152,7 +2152,7 @@ SwLedControlMode5(
|
|||
|
||||
}
|
||||
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("Led %d\n", pLed->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Led %d\n", pLed->CurrLedState));
|
||||
}
|
||||
|
||||
/* WNC-Corega, added by chiyoko, 20090902 */
|
||||
|
@ -2185,7 +2185,7 @@ SwLedControlMode6(
|
|||
break;
|
||||
}
|
||||
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("ledcontrol 6 Led %d\n", pLed0->CurrLedState));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("ledcontrol 6 Led %d\n", pLed0->CurrLedState));
|
||||
}
|
||||
|
||||
/* */
|
||||
|
@ -2198,7 +2198,7 @@ void BlinkHandler(PLED_871x pLed)
|
|||
struct adapter *padapter = pLed->padapter;
|
||||
struct led_priv *ledpriv = &(padapter->ledpriv);
|
||||
|
||||
/* DBG_871X("%s (%s:%d)\n",__FUNCTION__, current->comm, current->pid); */
|
||||
/* DBG_871X("%s (%s:%d)\n", __FUNCTION__, current->comm, current->pid); */
|
||||
|
||||
if ( (padapter->bSurpriseRemoved == true) || ( padapter->bDriverStopped == true))
|
||||
{
|
||||
|
@ -2302,5 +2302,5 @@ LedControl871x(
|
|||
break;
|
||||
}
|
||||
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("LedStrategy:%d, LedAction %d\n", ledpriv->LedStrategy,LedAction));
|
||||
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("LedStrategy:%d, LedAction %d\n", ledpriv->LedStrategy, LedAction));
|
||||
}
|
||||
|
|
446
core/rtw_mlme.c
446
core/rtw_mlme.c
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -111,7 +111,7 @@ int _rtw_odm_dbg_comp_msg(struct adapter *adapter, char *buf, int len)
|
|||
|
||||
rtw_hal_get_def_var(adapter, HW_DEF_ODM_DBG_FLAG, &dbg_comp);
|
||||
cnt += snprintf(buf+cnt, len-cnt, "odm.DebugComponents = 0x%016llx\n", dbg_comp);
|
||||
for (i=0;i<RTW_ODM_COMP_MAX;i++) {
|
||||
for (i =0;i<RTW_ODM_COMP_MAX;i++) {
|
||||
if (odm_comp_str[i])
|
||||
cnt += snprintf(buf+cnt, len-cnt, "%cBIT%-2d %s\n",
|
||||
(BIT0 << i) & dbg_comp ? '+' : ' ', i, odm_comp_str[i]);
|
||||
|
@ -143,7 +143,7 @@ int _rtw_odm_dbg_level_msg(struct adapter *adapter, char *buf, int len)
|
|||
|
||||
rtw_hal_get_def_var(adapter, HW_DEF_ODM_DBG_LEVEL, &dbg_level);
|
||||
cnt += snprintf(buf+cnt, len-cnt, "odm.DebugDebugLevel = %u\n", dbg_level);
|
||||
for (i=0;i<RTW_ODM_DBG_LEVEL_NUM;i++) {
|
||||
for (i =0;i<RTW_ODM_DBG_LEVEL_NUM;i++) {
|
||||
if (odm_dbg_level_str[i])
|
||||
cnt += snprintf(buf+cnt, len-cnt, "%u %s\n", i, odm_dbg_level_str[i]);
|
||||
}
|
||||
|
|
180
core/rtw_p2p.c
180
core/rtw_p2p.c
|
@ -49,7 +49,7 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
{
|
||||
unsigned long irqL;
|
||||
struct list_head *phead, *plist;
|
||||
u32 len=0;
|
||||
u32 len =0;
|
||||
u16 attr_len = 0;
|
||||
u8 tmplen, *pdata_attr, *pstart, *pcur;
|
||||
struct sta_info *psta = NULL;
|
||||
|
@ -159,7 +159,7 @@ static void issue_group_disc_req(struct wifidirect_info *pwdinfo, u8 *da)
|
|||
unsigned char category = RTW_WLAN_CATEGORY_P2P;/* P2P action frame */
|
||||
__be32 p2poui = cpu_to_be32(P2POUI);
|
||||
u8 oui_subtype = P2P_GO_DISC_REQUEST;
|
||||
u8 dialogToken=0;
|
||||
u8 dialogToken =0;
|
||||
|
||||
DBG_871X("[%s]\n", __FUNCTION__);
|
||||
|
||||
|
@ -462,8 +462,8 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
|
|||
u32 build_beacon_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
{
|
||||
u8 p2pie[ MAX_P2P_IE_LEN] = { 0x00 };
|
||||
u16 capability=0;
|
||||
u32 len=0, p2pielen = 0;
|
||||
u16 capability =0;
|
||||
u32 len =0, p2pielen = 0;
|
||||
__le16 le_tmp;
|
||||
|
||||
/* P2P OUI */
|
||||
|
@ -506,7 +506,7 @@ u32 build_beacon_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
u32 build_beacon_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
{
|
||||
u8 wfdie[ MAX_WFD_IE_LEN] = { 0x00 };
|
||||
u32 len=0, wfdielen = 0;
|
||||
u32 len =0, wfdielen = 0;
|
||||
struct adapter *padapter = pwdinfo->padapter;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct wifi_display_info* pwfd_info = padapter->wdinfo.wfd_info;
|
||||
|
@ -623,7 +623,7 @@ u32 build_beacon_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
u32 build_probe_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
{
|
||||
u8 wfdie[ MAX_WFD_IE_LEN] = { 0x00 };
|
||||
u32 len=0, wfdielen = 0;
|
||||
u32 len =0, wfdielen = 0;
|
||||
struct adapter *padapter = pwdinfo->padapter;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct wifi_display_info* pwfd_info = padapter->wdinfo.wfd_info;
|
||||
|
@ -736,7 +736,7 @@ u32 build_probe_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 tunneled)
|
||||
{
|
||||
u8 wfdie[ MAX_WFD_IE_LEN] = { 0x00 };
|
||||
u32 len=0, wfdielen = 0;
|
||||
u32 len =0, wfdielen = 0;
|
||||
struct adapter *padapter = pwdinfo->padapter;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct wifi_display_info* pwfd_info = padapter->wdinfo.wfd_info;
|
||||
|
@ -909,7 +909,7 @@ u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 tunnel
|
|||
u32 build_assoc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
{
|
||||
u8 wfdie[ MAX_WFD_IE_LEN] = { 0x00 };
|
||||
u32 len=0, wfdielen = 0;
|
||||
u32 len =0, wfdielen = 0;
|
||||
struct adapter *padapter = NULL;
|
||||
struct mlme_priv *pmlmepriv = NULL;
|
||||
struct wifi_display_info *pwfd_info = NULL;
|
||||
|
@ -1016,7 +1016,7 @@ u32 build_assoc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
u32 build_assoc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
{
|
||||
u8 wfdie[ MAX_WFD_IE_LEN] = { 0x00 };
|
||||
u32 len=0, wfdielen = 0;
|
||||
u32 len =0, wfdielen = 0;
|
||||
struct adapter *padapter = pwdinfo->padapter;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct wifi_display_info* pwfd_info = padapter->wdinfo.wfd_info;
|
||||
|
@ -1114,7 +1114,7 @@ u32 build_assoc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
u32 build_nego_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
{
|
||||
u8 wfdie[ MAX_WFD_IE_LEN] = { 0x00 };
|
||||
u32 len=0, wfdielen = 0;
|
||||
u32 len =0, wfdielen = 0;
|
||||
struct adapter *padapter = pwdinfo->padapter;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct wifi_display_info* pwfd_info = padapter->wdinfo.wfd_info;
|
||||
|
@ -1212,7 +1212,7 @@ u32 build_nego_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
u32 build_nego_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
{
|
||||
u8 wfdie[ MAX_WFD_IE_LEN] = { 0x00 };
|
||||
u32 len=0, wfdielen = 0;
|
||||
u32 len =0, wfdielen = 0;
|
||||
struct adapter *padapter = pwdinfo->padapter;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct wifi_display_info* pwfd_info = padapter->wdinfo.wfd_info;
|
||||
|
@ -1311,7 +1311,7 @@ u32 build_nego_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
u32 build_nego_confirm_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
{
|
||||
u8 wfdie[ MAX_WFD_IE_LEN] = { 0x00 };
|
||||
u32 len=0, wfdielen = 0;
|
||||
u32 len =0, wfdielen = 0;
|
||||
struct adapter *padapter = pwdinfo->padapter;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct wifi_display_info* pwfd_info = padapter->wdinfo.wfd_info;
|
||||
|
@ -1410,7 +1410,7 @@ u32 build_nego_confirm_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
u32 build_invitation_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
{
|
||||
u8 wfdie[ MAX_WFD_IE_LEN] = { 0x00 };
|
||||
u32 len=0, wfdielen = 0;
|
||||
u32 len =0, wfdielen = 0;
|
||||
struct adapter *padapter = pwdinfo->padapter;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct wifi_display_info* pwfd_info = padapter->wdinfo.wfd_info;
|
||||
|
@ -1523,7 +1523,7 @@ u32 build_invitation_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
u32 build_invitation_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
{
|
||||
u8 wfdie[ MAX_WFD_IE_LEN] = { 0x00 };
|
||||
u32 len=0, wfdielen = 0;
|
||||
u32 len =0, wfdielen = 0;
|
||||
struct adapter *padapter = pwdinfo->padapter;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct wifi_display_info* pwfd_info = padapter->wdinfo.wfd_info;
|
||||
|
@ -1636,7 +1636,7 @@ u32 build_invitation_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
u32 build_provdisc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
{
|
||||
u8 wfdie[ MAX_WFD_IE_LEN] = { 0x00 };
|
||||
u32 len=0, wfdielen = 0;
|
||||
u32 len =0, wfdielen = 0;
|
||||
struct adapter *padapter = pwdinfo->padapter;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct wifi_display_info* pwfd_info = padapter->wdinfo.wfd_info;
|
||||
|
@ -1735,7 +1735,7 @@ u32 build_provdisc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
u32 build_provdisc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
{
|
||||
u8 wfdie[ MAX_WFD_IE_LEN] = { 0x00 };
|
||||
u32 len=0, wfdielen = 0;
|
||||
u32 len =0, wfdielen = 0;
|
||||
struct adapter *padapter = pwdinfo->padapter;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct wifi_display_info* pwfd_info = padapter->wdinfo.wfd_info;
|
||||
|
@ -1836,7 +1836,7 @@ u32 build_provdisc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
{
|
||||
u8 p2pie[ MAX_P2P_IE_LEN] = { 0x00 };
|
||||
u32 len=0, p2pielen = 0;
|
||||
u32 len =0, p2pielen = 0;
|
||||
|
||||
/* P2P OUI */
|
||||
p2pielen = 0;
|
||||
|
@ -1988,7 +1988,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8* pssid, u8 ussidlen, u8* pdev_raddr )
|
||||
{
|
||||
u8 p2pie[ MAX_P2P_IE_LEN] = { 0x00 };
|
||||
u32 len=0, p2pielen = 0;
|
||||
u32 len =0, p2pielen = 0;
|
||||
|
||||
/* P2P OUI */
|
||||
p2pielen = 0;
|
||||
|
@ -2122,7 +2122,7 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8
|
|||
u32 build_assoc_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 status_code)
|
||||
{
|
||||
u8 p2pie[ MAX_P2P_IE_LEN] = { 0x00 };
|
||||
u32 len=0, p2pielen = 0;
|
||||
u32 len =0, p2pielen = 0;
|
||||
|
||||
/* P2P OUI */
|
||||
p2pielen = 0;
|
||||
|
@ -2154,7 +2154,7 @@ u32 build_assoc_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 status
|
|||
|
||||
u32 build_deauth_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
{
|
||||
u32 len=0;
|
||||
u32 len =0;
|
||||
|
||||
return len;
|
||||
}
|
||||
|
@ -2162,10 +2162,10 @@ u32 build_deauth_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint len)
|
||||
{
|
||||
u8 *p;
|
||||
u32 ret=false;
|
||||
u32 ret =false;
|
||||
u8 *p2pie;
|
||||
u32 p2pielen = 0;
|
||||
int ssid_len=0, rate_cnt = 0;
|
||||
int ssid_len =0, rate_cnt = 0;
|
||||
|
||||
p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + _PROBEREQ_IE_OFFSET_, _SUPPORTEDRATES_IE_, (int *)&rate_cnt,
|
||||
len - WLAN_HDR_A3_LEN - _PROBEREQ_IE_OFFSET_);
|
||||
|
@ -2213,7 +2213,7 @@ u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||
ssid_len &= 0xff; /* Just last 1 byte is valid for ssid len of the probe request */
|
||||
if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_DEVICE) || rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO))
|
||||
{
|
||||
if ((p2pie=rtw_get_p2p_ie( pframe + WLAN_HDR_A3_LEN + _PROBEREQ_IE_OFFSET_ , len - WLAN_HDR_A3_LEN - _PROBEREQ_IE_OFFSET_ , NULL, &p2pielen)))
|
||||
if ((p2pie =rtw_get_p2p_ie( pframe + WLAN_HDR_A3_LEN + _PROBEREQ_IE_OFFSET_ , len - WLAN_HDR_A3_LEN - _PROBEREQ_IE_OFFSET_ , NULL, &p2pielen)))
|
||||
{
|
||||
if ( (p != NULL) && _rtw_memcmp( ( void * ) ( p+2 ), ( void * ) pwdinfo->p2p_wildcard_ssid , 7 ))
|
||||
{
|
||||
|
@ -2243,10 +2243,10 @@ u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||
u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint len, struct sta_info *psta)
|
||||
{
|
||||
u8 status_code = P2P_STATUS_SUCCESS;
|
||||
u8 *pbuf, *pattr_content=NULL;
|
||||
u8 *pbuf, *pattr_content =NULL;
|
||||
u32 attr_contentlen = 0;
|
||||
u16 cap_attr=0;
|
||||
unsigned short frame_type, ie_offset=0;
|
||||
u16 cap_attr =0;
|
||||
unsigned short frame_type, ie_offset =0;
|
||||
u8 * ies;
|
||||
u32 ies_len;
|
||||
u8 * p2p_ie;
|
||||
|
@ -2322,7 +2322,7 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||
num_of_secdev_type = *pattr_content;
|
||||
pattr_content += 1;
|
||||
|
||||
if (num_of_secdev_type==0)
|
||||
if (num_of_secdev_type ==0)
|
||||
{
|
||||
psta->num_of_secdev_type = 0;
|
||||
}
|
||||
|
@ -2341,7 +2341,7 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||
|
||||
|
||||
/* dev_name_len = attr_contentlen - ETH_ALEN - 2 - 8 - 1 - (num_of_secdev_type*8); */
|
||||
psta->dev_name_len=0;
|
||||
psta->dev_name_len =0;
|
||||
if (WPS_ATTR_DEVICE_NAME == be16_to_cpu(*(__be16*)pattr_content))
|
||||
{
|
||||
dev_name_len = be16_to_cpu(*(__be16*)(pattr_content+2));
|
||||
|
@ -2381,7 +2381,7 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
|
|||
dialogToken = frame_body[7];
|
||||
status = P2P_STATUS_FAIL_UNKNOWN_P2PGROUP;
|
||||
|
||||
if ( (p2p_ie=rtw_get_p2p_ie( frame_body + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &p2p_ielen)) )
|
||||
if ( (p2p_ie =rtw_get_p2p_ie( frame_body + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &p2p_ielen)) )
|
||||
{
|
||||
u8 groupid[ 38 ] = { 0x00 };
|
||||
u8 dev_addr[ETH_ALEN] = { 0x00 };
|
||||
|
@ -2392,7 +2392,7 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
|
|||
if (_rtw_memcmp(pwdinfo->device_addr, groupid, ETH_ALEN) &&
|
||||
_rtw_memcmp(pwdinfo->p2p_group_ssid, groupid+ETH_ALEN, pwdinfo->p2p_group_ssid_len))
|
||||
{
|
||||
attr_contentlen=0;
|
||||
attr_contentlen =0;
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_ID, dev_addr, &attr_contentlen))
|
||||
{
|
||||
unsigned long irqL;
|
||||
|
@ -2451,7 +2451,7 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
|
|||
issue_p2p_devdisc_resp(pwdinfo, GetAddr2Ptr(pframe), status, dialogToken);
|
||||
|
||||
|
||||
return (status==P2P_STATUS_SUCCESS) ? true:false;
|
||||
return (status ==P2P_STATUS_SUCCESS) ? true:false;
|
||||
|
||||
}
|
||||
|
||||
|
@ -2470,7 +2470,7 @@ u8 process_p2p_provdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||
|
||||
frame_body = (pframe + sizeof(struct rtw_ieee80211_hdr_3addr));
|
||||
|
||||
if ( (wpsie=rtw_get_wps_ie( frame_body + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &wps_ielen)) )
|
||||
if ( (wpsie =rtw_get_wps_ie( frame_body + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &wps_ielen)) )
|
||||
{
|
||||
if ( rtw_get_wps_attr_content( wpsie, wps_ielen, WPS_ATTR_CONF_METHOD , ( u8 *)&be_tmp, &attr_contentlen) )
|
||||
{
|
||||
|
@ -2590,7 +2590,7 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe
|
|||
#endif /* CONFIG_P2P */
|
||||
__be16 be_tmp;
|
||||
|
||||
if ( (wpsie=rtw_get_wps_ie( pframe + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &wps_ielen)) )
|
||||
if ( (wpsie =rtw_get_wps_ie( pframe + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &wps_ielen)) )
|
||||
{
|
||||
/* Commented by Kurt 20120113 */
|
||||
/* If some device wants to do p2p handshake without sending prov_disc_req */
|
||||
|
@ -3117,7 +3117,7 @@ u8 process_p2p_group_negotation_confirm( struct wifidirect_info *pwdinfo, u8 *pf
|
|||
u8 process_p2p_presence_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint len)
|
||||
{
|
||||
u8 *frame_body;
|
||||
u8 dialogToken=0;
|
||||
u8 dialogToken =0;
|
||||
u8 status = P2P_STATUS_SUCCESS;
|
||||
|
||||
frame_body = (unsigned char *)(pframe + sizeof(struct rtw_ieee80211_hdr_3addr));
|
||||
|
@ -3233,7 +3233,7 @@ static void ro_ch_handler(struct adapter *padapter)
|
|||
|
||||
rtw_p2p_set_state(pwdinfo, rtw_p2p_pre_state(pwdinfo));
|
||||
#ifdef CONFIG_DEBUG_CFG80211
|
||||
DBG_871X("%s, role=%d, p2p_state=%d\n", __func__, rtw_p2p_role(pwdinfo), rtw_p2p_state(pwdinfo));
|
||||
DBG_871X("%s, role =%d, p2p_state =%d\n", __func__, rtw_p2p_role(pwdinfo), rtw_p2p_state(pwdinfo));
|
||||
#endif
|
||||
|
||||
pcfg80211_wdinfo->is_ro_ch = false;
|
||||
|
@ -3301,7 +3301,7 @@ static void rtw_change_p2pie_ch_list(struct adapter *padapter, const u8 *frame_b
|
|||
u8 *pattr = NULL;
|
||||
|
||||
/* Check P2P_ATTR_CH_LIST */
|
||||
if ((pattr=rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CH_LIST, NULL, (uint*)&attr_contentlen))!=NULL) {
|
||||
if ((pattr =rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CH_LIST, NULL, (uint*)&attr_contentlen))!=NULL) {
|
||||
int i;
|
||||
u32 num_of_ch;
|
||||
u8 *pattr_temp = pattr + 3 ;
|
||||
|
@ -3311,7 +3311,7 @@ static void rtw_change_p2pie_ch_list(struct adapter *padapter, const u8 *frame_b
|
|||
while (attr_contentlen>0) {
|
||||
num_of_ch = *(pattr_temp+1);
|
||||
|
||||
for (i=0; i<num_of_ch; i++)
|
||||
for (i =0; i<num_of_ch; i++)
|
||||
*(pattr_temp+2+i) = ch;
|
||||
|
||||
pattr_temp += (2+num_of_ch);
|
||||
|
@ -3344,7 +3344,7 @@ static void rtw_cfg80211_adjust_p2pie_channel(struct adapter *padapter, const u8
|
|||
void rtw_append_wfd_ie(struct adapter *padapter, u8 *buf, u32* len)
|
||||
{
|
||||
unsigned char *frame_body;
|
||||
u8 category, action, OUI_Subtype, dialogToken=0;
|
||||
u8 category, action, OUI_Subtype, dialogToken =0;
|
||||
u32 wfdielen = 0;
|
||||
struct rtw_wdev_priv *pwdev_priv = wdev_to_priv(padapter->rtw_wdev);
|
||||
|
||||
|
@ -3423,7 +3423,7 @@ void rtw_append_wfd_ie(struct adapter *padapter, u8 *buf, u32* len)
|
|||
dialogToken = frame_body[6];
|
||||
|
||||
#ifdef CONFIG_DEBUG_CFG80211
|
||||
DBG_871X("ACTION_CATEGORY_P2P: OUI=0x%x, OUI_Subtype=%d, dialogToken=%d\n",
|
||||
DBG_871X("ACTION_CATEGORY_P2P: OUI =0x%x, OUI_Subtype =%d, dialogToken =%d\n",
|
||||
cpu_to_be32( *( ( u32* ) ( frame_body + 1 ) ) ), OUI_Subtype, dialogToken);
|
||||
#endif
|
||||
|
||||
|
@ -3449,7 +3449,7 @@ void rtw_append_wfd_ie(struct adapter *padapter, u8 *buf, u32* len)
|
|||
}
|
||||
else
|
||||
{
|
||||
DBG_871X("%s, action frame category=%d\n", __func__, category);
|
||||
DBG_871X("%s, action frame category =%d\n", __func__, category);
|
||||
/* is_p2p_frame = (-1); */
|
||||
}
|
||||
|
||||
|
@ -3466,7 +3466,7 @@ static u8 *dump_p2p_attr_ch_list(u8 *p2p_ie, uint p2p_ielen, u8 *buf, u32 buf_le
|
|||
u8 ch_list[40];
|
||||
bool continuous = false;
|
||||
|
||||
if ((pattr=rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CH_LIST, NULL, &attr_contentlen))!=NULL) {
|
||||
if ((pattr =rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CH_LIST, NULL, &attr_contentlen))!=NULL) {
|
||||
int i, j;
|
||||
u32 num_of_ch;
|
||||
u8 *pattr_temp = pattr + 3 ;
|
||||
|
@ -3478,8 +3478,8 @@ static u8 *dump_p2p_attr_ch_list(u8 *p2p_ie, uint p2p_ielen, u8 *buf, u32 buf_le
|
|||
while (attr_contentlen>0) {
|
||||
num_of_ch = *(pattr_temp+1);
|
||||
|
||||
for (i=0; i<num_of_ch; i++) {
|
||||
for (j=0;j<ch_cnt;j++) {
|
||||
for (i =0; i<num_of_ch; i++) {
|
||||
for (j =0;j<ch_cnt;j++) {
|
||||
if (ch_list[j] == *(pattr_temp+2+i))
|
||||
break;
|
||||
}
|
||||
|
@ -3492,7 +3492,7 @@ static u8 *dump_p2p_attr_ch_list(u8 *p2p_ie, uint p2p_ielen, u8 *buf, u32 buf_le
|
|||
attr_contentlen -= (2+num_of_ch);
|
||||
}
|
||||
|
||||
for (j=0;j<ch_cnt;j++) {
|
||||
for (j =0;j<ch_cnt;j++) {
|
||||
if (j == 0) {
|
||||
w_sz += snprintf(buf+w_sz, buf_len-w_sz, "%u", ch_list[j]);
|
||||
} else if (ch_list[j] - ch_list[j-1] != 1) {
|
||||
|
@ -3524,7 +3524,7 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
{
|
||||
int is_p2p_frame = (-1);
|
||||
unsigned char *frame_body;
|
||||
u8 category, action, OUI_Subtype, dialogToken=0;
|
||||
u8 category, action, OUI_Subtype, dialogToken =0;
|
||||
u8 *p2p_ie = NULL;
|
||||
uint p2p_ielen = 0;
|
||||
struct rtw_wdev_priv *pwdev_priv = wdev_to_priv(padapter->rtw_wdev);
|
||||
|
@ -3548,7 +3548,7 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
dialogToken = frame_body[7];
|
||||
is_p2p_frame = OUI_Subtype;
|
||||
#ifdef CONFIG_DEBUG_CFG80211
|
||||
DBG_871X("ACTION_CATEGORY_PUBLIC: ACT_PUBLIC_VENDOR, OUI=0x%x, OUI_Subtype=%d, dialogToken=%d\n",
|
||||
DBG_871X("ACTION_CATEGORY_PUBLIC: ACT_PUBLIC_VENDOR, OUI =0x%x, OUI_Subtype =%d, dialogToken =%d\n",
|
||||
cpu_to_be32( *( ( u32* ) ( frame_body + 2 ) ) ), OUI_Subtype, dialogToken);
|
||||
#endif
|
||||
|
||||
|
@ -3591,8 +3591,8 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
nego_info->state = 0;
|
||||
|
||||
dump_p2p_attr_ch_list(p2p_ie, p2p_ielen, ch_list_buf, 128);
|
||||
DBG_871X("RTW_%s:P2P_GO_NEGO_REQ, dialogToken=%d, intent:%u%s, listen_ch:%d, op_ch:%d, ch_list:%s\n",
|
||||
(tx==true)?"Tx":"Rx", dialogToken, (intent>>1), intent&0x1 ? "+" : "-", listen_ch, op_ch, ch_list_buf);
|
||||
DBG_871X("RTW_%s:P2P_GO_NEGO_REQ, dialogToken =%d, intent:%u%s, listen_ch:%d, op_ch:%d, ch_list:%s\n",
|
||||
(tx ==true)?"Tx":"Rx", dialogToken, (intent>>1), intent&0x1 ? "+" : "-", listen_ch, op_ch, ch_list_buf);
|
||||
break;
|
||||
}
|
||||
case P2P_GO_NEGO_RESP:
|
||||
|
@ -3609,8 +3609,8 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
if (nego_info->token == dialogToken && nego_info->state == 0
|
||||
&& _rtw_memcmp(nego_info->peer_mac, tx ? GetAddr1Ptr(buf) : GetAddr2Ptr(buf), ETH_ALEN) == true
|
||||
) {
|
||||
nego_info->status = (status==-1) ? 0xff : status;
|
||||
nego_info->rsp_op_ch= op_ch;
|
||||
nego_info->status = (status ==-1) ? 0xff : status;
|
||||
nego_info->rsp_op_ch = op_ch;
|
||||
nego_info->rsp_intent = intent;
|
||||
nego_info->state = 1;
|
||||
if (status != 0)
|
||||
|
@ -3618,8 +3618,8 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
}
|
||||
|
||||
dump_p2p_attr_ch_list(p2p_ie, p2p_ielen, ch_list_buf, 128);
|
||||
DBG_871X("RTW_%s:P2P_GO_NEGO_RESP, dialogToken=%d, intent:%u%s, status:%d, op_ch:%d, ch_list:%s\n",
|
||||
(tx==true)?"Tx":"Rx", dialogToken, (intent>>1), intent&0x1 ? "+" : "-", status, op_ch, ch_list_buf);
|
||||
DBG_871X("RTW_%s:P2P_GO_NEGO_RESP, dialogToken =%d, intent:%u%s, status:%d, op_ch:%d, ch_list:%s\n",
|
||||
(tx ==true)?"Tx":"Rx", dialogToken, (intent>>1), intent&0x1 ? "+" : "-", status, op_ch, ch_list_buf);
|
||||
|
||||
if (!tx) {
|
||||
pwdev_priv->provdisc_req_issued = false;
|
||||
|
@ -3640,8 +3640,8 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
if (nego_info->token == dialogToken && nego_info->state == 1
|
||||
&& _rtw_memcmp(nego_info->peer_mac, tx ? GetAddr1Ptr(buf) : GetAddr2Ptr(buf), ETH_ALEN) == true
|
||||
) {
|
||||
nego_info->status = (status==-1) ? 0xff : status;
|
||||
nego_info->conf_op_ch = (op_ch==-1) ? 0 : op_ch;
|
||||
nego_info->status = (status ==-1) ? 0xff : status;
|
||||
nego_info->conf_op_ch = (op_ch ==-1) ? 0 : op_ch;
|
||||
nego_info->state = 2;
|
||||
|
||||
if (status == 0) {
|
||||
|
@ -3653,8 +3653,8 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
}
|
||||
|
||||
dump_p2p_attr_ch_list(p2p_ie, p2p_ielen, ch_list_buf, 128);
|
||||
DBG_871X("RTW_%s:P2P_GO_NEGO_CONF, dialogToken=%d, status:%d, op_ch:%d, ch_list:%s\n",
|
||||
(tx==true)?"Tx":"Rx", dialogToken, status, op_ch, ch_list_buf);
|
||||
DBG_871X("RTW_%s:P2P_GO_NEGO_CONF, dialogToken =%d, status:%d, op_ch:%d, ch_list:%s\n",
|
||||
(tx ==true)?"Tx":"Rx", dialogToken, status, op_ch, ch_list_buf);
|
||||
break;
|
||||
}
|
||||
case P2P_INVIT_REQ:
|
||||
|
@ -3673,13 +3673,13 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
memcpy(invit_info->peer_mac, tx ? GetAddr1Ptr(buf) : GetAddr2Ptr(buf), ETH_ALEN);
|
||||
invit_info->active = tx ? 1 : 0;
|
||||
invit_info->token = dialogToken;
|
||||
invit_info->flags = (flags==-1) ? 0x0 : flags;
|
||||
invit_info->req_op_ch= op_ch;
|
||||
invit_info->flags = (flags ==-1) ? 0x0 : flags;
|
||||
invit_info->req_op_ch = op_ch;
|
||||
invit_info->state = 0;
|
||||
|
||||
dump_p2p_attr_ch_list(p2p_ie, p2p_ielen, ch_list_buf, 128);
|
||||
DBG_871X("RTW_%s:P2P_INVIT_REQ, dialogToken=%d, flags:0x%02x, op_ch:%d, ch_list:%s\n",
|
||||
(tx==true)?"Tx":"Rx", dialogToken, flags, op_ch, ch_list_buf);
|
||||
DBG_871X("RTW_%s:P2P_INVIT_REQ, dialogToken =%d, flags:0x%02x, op_ch:%d, ch_list:%s\n",
|
||||
(tx ==true)?"Tx":"Rx", dialogToken, flags, op_ch, ch_list_buf);
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -3690,7 +3690,7 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
if ((cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, NULL, &cont_len)))
|
||||
{
|
||||
#ifdef CONFIG_P2P_INVITE_IOT
|
||||
if (tx && *cont==7)
|
||||
if (tx && *cont ==7)
|
||||
{
|
||||
DBG_871X("TX_P2P_INVITE_RESP, status is no common channel, change to unknown group\n");
|
||||
*cont = 8; /* unknow group status */
|
||||
|
@ -3704,15 +3704,15 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
if (invit_info->token == dialogToken && invit_info->state == 0
|
||||
&& _rtw_memcmp(invit_info->peer_mac, tx ? GetAddr1Ptr(buf) : GetAddr2Ptr(buf), ETH_ALEN) == true
|
||||
) {
|
||||
invit_info->status = (status==-1) ? 0xff : status;
|
||||
invit_info->rsp_op_ch= op_ch;
|
||||
invit_info->status = (status ==-1) ? 0xff : status;
|
||||
invit_info->rsp_op_ch = op_ch;
|
||||
invit_info->state = 1;
|
||||
invit_info->token = 0; /* init */
|
||||
}
|
||||
|
||||
dump_p2p_attr_ch_list(p2p_ie, p2p_ielen, ch_list_buf, 128);
|
||||
DBG_871X("RTW_%s:P2P_INVIT_RESP, dialogToken=%d, status:%d, op_ch:%d, ch_list:%s\n",
|
||||
(tx==true)?"Tx":"Rx", dialogToken, status, op_ch, ch_list_buf);
|
||||
DBG_871X("RTW_%s:P2P_INVIT_RESP, dialogToken =%d, status:%d, op_ch:%d, ch_list:%s\n",
|
||||
(tx ==true)?"Tx":"Rx", dialogToken, status, op_ch, ch_list_buf);
|
||||
|
||||
if (!tx) {
|
||||
}
|
||||
|
@ -3720,11 +3720,11 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
break;
|
||||
}
|
||||
case P2P_DEVDISC_REQ:
|
||||
DBG_871X("RTW_%s:P2P_DEVDISC_REQ, dialogToken=%d\n", (tx==true)?"Tx":"Rx", dialogToken);
|
||||
DBG_871X("RTW_%s:P2P_DEVDISC_REQ, dialogToken =%d\n", (tx ==true)?"Tx":"Rx", dialogToken);
|
||||
break;
|
||||
case P2P_DEVDISC_RESP:
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, NULL, &cont_len);
|
||||
DBG_871X("RTW_%s:P2P_DEVDISC_RESP, dialogToken=%d, status:%d\n", (tx==true)?"Tx":"Rx", dialogToken, cont?*cont:-1);
|
||||
DBG_871X("RTW_%s:P2P_DEVDISC_RESP, dialogToken =%d, status:%d\n", (tx ==true)?"Tx":"Rx", dialogToken, cont?*cont:-1);
|
||||
break;
|
||||
case P2P_PROVISION_DISC_REQ:
|
||||
{
|
||||
|
@ -3733,13 +3733,13 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
uint p2p_ielen = 0;
|
||||
uint contentlen = 0;
|
||||
|
||||
DBG_871X("RTW_%s:P2P_PROVISION_DISC_REQ, dialogToken=%d\n", (tx==true)?"Tx":"Rx", dialogToken);
|
||||
DBG_871X("RTW_%s:P2P_PROVISION_DISC_REQ, dialogToken =%d\n", (tx ==true)?"Tx":"Rx", dialogToken);
|
||||
|
||||
/* if (tx) */
|
||||
{
|
||||
pwdev_priv->provdisc_req_issued = false;
|
||||
|
||||
if ( (p2p_ie=rtw_get_p2p_ie( frame_body + _PUBLIC_ACTION_IE_OFFSET_, frame_body_len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &p2p_ielen)))
|
||||
if ( (p2p_ie =rtw_get_p2p_ie( frame_body + _PUBLIC_ACTION_IE_OFFSET_, frame_body_len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &p2p_ielen)))
|
||||
{
|
||||
|
||||
if (rtw_get_p2p_attr_content( p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, NULL, &contentlen))
|
||||
|
@ -3759,10 +3759,10 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
}
|
||||
break;
|
||||
case P2P_PROVISION_DISC_RESP:
|
||||
DBG_871X("RTW_%s:P2P_PROVISION_DISC_RESP, dialogToken=%d\n", (tx==true)?"Tx":"Rx", dialogToken);
|
||||
DBG_871X("RTW_%s:P2P_PROVISION_DISC_RESP, dialogToken =%d\n", (tx ==true)?"Tx":"Rx", dialogToken);
|
||||
break;
|
||||
default:
|
||||
DBG_871X("RTW_%s:OUI_Subtype=%d, dialogToken=%d\n", (tx==true)?"Tx":"Rx", OUI_Subtype, dialogToken);
|
||||
DBG_871X("RTW_%s:OUI_Subtype =%d, dialogToken =%d\n", (tx ==true)?"Tx":"Rx", OUI_Subtype, dialogToken);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -3775,7 +3775,7 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
dialogToken = frame_body[6];
|
||||
|
||||
#ifdef CONFIG_DEBUG_CFG80211
|
||||
DBG_871X("ACTION_CATEGORY_P2P: OUI=0x%x, OUI_Subtype=%d, dialogToken=%d\n",
|
||||
DBG_871X("ACTION_CATEGORY_P2P: OUI =0x%x, OUI_Subtype =%d, dialogToken =%d\n",
|
||||
cpu_to_be32( *( ( u32* ) ( frame_body + 1 ) ) ), OUI_Subtype, dialogToken);
|
||||
#endif
|
||||
|
||||
|
@ -3784,26 +3784,26 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
switch (OUI_Subtype)
|
||||
{
|
||||
case P2P_NOTICE_OF_ABSENCE:
|
||||
DBG_871X("RTW_%s:P2P_NOTICE_OF_ABSENCE, dialogToken=%d\n", (tx==true)?"TX":"RX", dialogToken);
|
||||
DBG_871X("RTW_%s:P2P_NOTICE_OF_ABSENCE, dialogToken =%d\n", (tx ==true)?"TX":"RX", dialogToken);
|
||||
break;
|
||||
case P2P_PRESENCE_REQUEST:
|
||||
DBG_871X("RTW_%s:P2P_PRESENCE_REQUEST, dialogToken=%d\n", (tx==true)?"TX":"RX", dialogToken);
|
||||
DBG_871X("RTW_%s:P2P_PRESENCE_REQUEST, dialogToken =%d\n", (tx ==true)?"TX":"RX", dialogToken);
|
||||
break;
|
||||
case P2P_PRESENCE_RESPONSE:
|
||||
DBG_871X("RTW_%s:P2P_PRESENCE_RESPONSE, dialogToken=%d\n", (tx==true)?"TX":"RX", dialogToken);
|
||||
DBG_871X("RTW_%s:P2P_PRESENCE_RESPONSE, dialogToken =%d\n", (tx ==true)?"TX":"RX", dialogToken);
|
||||
break;
|
||||
case P2P_GO_DISC_REQUEST:
|
||||
DBG_871X("RTW_%s:P2P_GO_DISC_REQUEST, dialogToken=%d\n", (tx==true)?"TX":"RX", dialogToken);
|
||||
DBG_871X("RTW_%s:P2P_GO_DISC_REQUEST, dialogToken =%d\n", (tx ==true)?"TX":"RX", dialogToken);
|
||||
break;
|
||||
default:
|
||||
DBG_871X("RTW_%s:OUI_Subtype=%d, dialogToken=%d\n", (tx==true)?"TX":"RX", OUI_Subtype, dialogToken);
|
||||
DBG_871X("RTW_%s:OUI_Subtype =%d, dialogToken =%d\n", (tx ==true)?"TX":"RX", OUI_Subtype, dialogToken);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
DBG_871X("RTW_%s:action frame category=%d\n", (tx==true)?"TX":"RX", category);
|
||||
DBG_871X("RTW_%s:action frame category =%d\n", (tx ==true)?"TX":"RX", category);
|
||||
}
|
||||
|
||||
return is_p2p_frame;
|
||||
|
@ -3820,7 +3820,7 @@ void rtw_init_cfg80211_wifidirect_info( struct adapter* padapter)
|
|||
|
||||
void p2p_protocol_wk_hdl(struct adapter *padapter, int intCmdType)
|
||||
{
|
||||
struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
|
||||
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
||||
|
||||
|
||||
switch (intCmdType)
|
||||
|
@ -3962,7 +3962,7 @@ void process_p2p_ps_ie(struct adapter *padapter, u8 *IEs, u32 IELength)
|
|||
void p2p_ps_wk_hdl(struct adapter *padapter, u8 p2p_ps_state)
|
||||
{
|
||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
||||
struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
|
||||
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
||||
|
||||
|
||||
/* Pre action for p2p state */
|
||||
|
@ -4021,7 +4021,7 @@ u8 p2p_ps_wk_cmd(struct adapter*padapter, u8 p2p_ps_state, u8 enqueue)
|
|||
{
|
||||
struct cmd_obj *ph2c;
|
||||
struct drvextra_cmd_parm *pdrvextra_cmd_parm;
|
||||
struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
|
||||
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
||||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
@ -4032,15 +4032,15 @@ u8 p2p_ps_wk_cmd(struct adapter*padapter, u8 p2p_ps_state, u8 enqueue)
|
|||
if (enqueue)
|
||||
{
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c==NULL){
|
||||
res= _FAIL;
|
||||
if (ph2c ==NULL){
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
|
||||
if (pdrvextra_cmd_parm==NULL){
|
||||
if (pdrvextra_cmd_parm ==NULL){
|
||||
rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
|
||||
res= _FAIL;
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
@ -4479,7 +4479,7 @@ void dbg_rtw_p2p_set_role(struct wifidirect_info *wdinfo, enum P2P_ROLE role, co
|
|||
int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role)
|
||||
{
|
||||
int ret = _SUCCESS;
|
||||
struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
|
||||
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
||||
|
||||
if (role == P2P_ROLE_DEVICE || role == P2P_ROLE_CLIENT|| role == P2P_ROLE_GO)
|
||||
{
|
||||
|
@ -4500,9 +4500,9 @@ int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role)
|
|||
/* Enable P2P function */
|
||||
init_wifidirect_info(padapter, role);
|
||||
|
||||
rtw_hal_set_odm_var(padapter,HAL_ODM_P2P_STATE,NULL,true);
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_P2P_STATE, NULL, true);
|
||||
#ifdef CONFIG_P2P
|
||||
rtw_hal_set_odm_var(padapter,HAL_ODM_WIFI_DISPLAY_STATE,NULL,true);
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_WIFI_DISPLAY_STATE, NULL, true);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@ -4532,9 +4532,9 @@ int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role)
|
|||
memset(&pwdinfo->rx_prov_disc_info, 0x00, sizeof(struct rx_provdisc_req_info));
|
||||
}
|
||||
|
||||
rtw_hal_set_odm_var(padapter,HAL_ODM_P2P_STATE,NULL,false);
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_P2P_STATE, NULL, false);
|
||||
#ifdef CONFIG_P2P
|
||||
rtw_hal_set_odm_var(padapter,HAL_ODM_WIFI_DISPLAY_STATE,NULL,false);
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_WIFI_DISPLAY_STATE, NULL, false);
|
||||
#endif
|
||||
|
||||
/* Restore to initial setting. */
|
||||
|
|
|
@ -45,7 +45,7 @@ void _ips_enter(struct adapter * padapter)
|
|||
pwrpriv->ips_mode = pwrpriv->ips_mode_req;
|
||||
|
||||
pwrpriv->ips_enter_cnts++;
|
||||
DBG_871X("==>ips_enter cnts:%d\n",pwrpriv->ips_enter_cnts);
|
||||
DBG_871X("==>ips_enter cnts:%d\n", pwrpriv->ips_enter_cnts);
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
BTDM_TurnOffBtCoexistBeforeEnterIPS(padapter);
|
||||
#endif
|
||||
|
@ -83,14 +83,14 @@ int _ips_leave(struct adapter * padapter)
|
|||
pwrpriv->bips_processing = true;
|
||||
pwrpriv->change_rfpwrstate = rf_on;
|
||||
pwrpriv->ips_leave_cnts++;
|
||||
DBG_871X("==>ips_leave cnts:%d\n",pwrpriv->ips_leave_cnts);
|
||||
DBG_871X("==>ips_leave cnts:%d\n", pwrpriv->ips_leave_cnts);
|
||||
|
||||
if ((result = rtw_ips_pwr_up(padapter)) == _SUCCESS) {
|
||||
pwrpriv->rf_pwrstate = rf_on;
|
||||
}
|
||||
DBG_871X_LEVEL(_drv_always_, "nolinked power save leave\n");
|
||||
|
||||
DBG_871X("==> ips_leave.....LED(0x%08x)...\n",rtw_read32(padapter,0x4c));
|
||||
DBG_871X("==> ips_leave.....LED(0x%08x)...\n", rtw_read32(padapter, 0x4c));
|
||||
pwrpriv->bips_processing = false;
|
||||
|
||||
pwrpriv->bkeepfwalive = false;
|
||||
|
@ -175,7 +175,7 @@ static bool rtw_pwr_unassociated_idle(struct adapter *adapter)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_INTEL_PROXIM
|
||||
if (adapter->proximity.proxim_on==true){
|
||||
if (adapter->proximity.proxim_on ==true){
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
@ -208,7 +208,7 @@ void rtw_ps_processor(struct adapter*padapter)
|
|||
if (pwrpriv->bips_processing == true)
|
||||
goto exit;
|
||||
|
||||
/* DBG_871X("==> fw report state(0x%x)\n",rtw_read8(padapter,0x1ca)); */
|
||||
/* DBG_871X("==> fw report state(0x%x)\n", rtw_read8(padapter, 0x1ca)); */
|
||||
if (pwrpriv->bHWPwrPindetect)
|
||||
{
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
|
@ -220,7 +220,7 @@ void rtw_ps_processor(struct adapter*padapter)
|
|||
pwrpriv->ps_flag = true;
|
||||
|
||||
rfpwrstate = RfOnOffDetect(padapter);
|
||||
DBG_871X("@@@@- #1 %s==> rfstate:%s\n",__FUNCTION__,(rfpwrstate==rf_on)?"rf_on":"rf_off");
|
||||
DBG_871X("@@@@- #1 %s ==> rfstate:%s\n", __FUNCTION__, (rfpwrstate ==rf_on)?"rf_on":"rf_off");
|
||||
if (rfpwrstate!= pwrpriv->rf_pwrstate)
|
||||
{
|
||||
if (rfpwrstate == rf_off)
|
||||
|
@ -239,7 +239,7 @@ void rtw_ps_processor(struct adapter*padapter)
|
|||
#endif /* CONFIG_AUTOSUSPEND */
|
||||
{
|
||||
rfpwrstate = RfOnOffDetect(padapter);
|
||||
DBG_871X("@@@@- #2 %s==> rfstate:%s\n",__FUNCTION__,(rfpwrstate==rf_on)?"rf_on":"rf_off");
|
||||
DBG_871X("@@@@- #2 %s ==> rfstate:%s\n", __FUNCTION__, (rfpwrstate ==rf_on)?"rf_on":"rf_off");
|
||||
|
||||
if (rfpwrstate!= pwrpriv->rf_pwrstate)
|
||||
{
|
||||
|
@ -255,7 +255,7 @@ void rtw_ps_processor(struct adapter*padapter)
|
|||
pwrpriv->change_rfpwrstate = rf_on;
|
||||
rtw_hw_resume(padapter );
|
||||
}
|
||||
DBG_871X("current rf_pwrstate(%s)\n",(pwrpriv->rf_pwrstate == rf_off)?"rf_off":"rf_on");
|
||||
DBG_871X("current rf_pwrstate(%s)\n", (pwrpriv->rf_pwrstate == rf_off)?"rf_off":"rf_on");
|
||||
}
|
||||
}
|
||||
pwrpriv->pwr_state_check_cnts ++;
|
||||
|
@ -267,9 +267,9 @@ void rtw_ps_processor(struct adapter*padapter)
|
|||
if (rtw_pwr_unassociated_idle(padapter) == false)
|
||||
goto exit;
|
||||
|
||||
if ((pwrpriv->rf_pwrstate == rf_on) && ((pwrpriv->pwr_state_check_cnts%4)==0))
|
||||
if ((pwrpriv->rf_pwrstate == rf_on) && ((pwrpriv->pwr_state_check_cnts%4) ==0))
|
||||
{
|
||||
DBG_871X("==>%s .fw_state(%x)\n",__FUNCTION__,get_fwstate(pmlmepriv));
|
||||
DBG_871X("==>%s .fw_state(%x)\n", __FUNCTION__, get_fwstate(pmlmepriv));
|
||||
#if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||
#else
|
||||
pwrpriv->change_rfpwrstate = rf_off;
|
||||
|
@ -284,12 +284,12 @@ void rtw_ps_processor(struct adapter*padapter)
|
|||
pwrpriv->ps_flag = true;
|
||||
|
||||
#if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||
if (true==pwrpriv->bInternalAutoSuspend) {
|
||||
DBG_871X("<==%s .pwrpriv->bInternalAutoSuspend)(%x)\n",__FUNCTION__,pwrpriv->bInternalAutoSuspend);
|
||||
if (true ==pwrpriv->bInternalAutoSuspend) {
|
||||
DBG_871X("<==%s .pwrpriv->bInternalAutoSuspend)(%x)\n", __FUNCTION__, pwrpriv->bInternalAutoSuspend);
|
||||
} else {
|
||||
pwrpriv->change_rfpwrstate = rf_off;
|
||||
padapter->bCardDisableWOHSM = true;
|
||||
DBG_871X("<==%s .pwrpriv->bInternalAutoSuspend)(%x) call autosuspend_enter\n",__FUNCTION__,pwrpriv->bInternalAutoSuspend);
|
||||
DBG_871X("<==%s .pwrpriv->bInternalAutoSuspend)(%x) call autosuspend_enter\n", __FUNCTION__, pwrpriv->bInternalAutoSuspend);
|
||||
autosuspend_enter(padapter);
|
||||
}
|
||||
#else
|
||||
|
@ -352,8 +352,8 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv)
|
|||
}
|
||||
|
||||
if ((pwrpriv->rpwm == pslv)) {
|
||||
RT_TRACE(_module_rtl871x_pwrctrl_c_,_drv_err_,
|
||||
("%s: Already set rpwm[0x%02X], new=0x%02X!\n", __FUNCTION__, pwrpriv->rpwm, pslv));
|
||||
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_err_,
|
||||
("%s: Already set rpwm[0x%02X], new =0x%02X!\n", __FUNCTION__, pwrpriv->rpwm, pslv));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -383,7 +383,7 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv)
|
|||
|
||||
rpwm = pslv | pwrpriv->tog;
|
||||
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_,
|
||||
("rtw_set_rpwm: rpwm=0x%02x cpwm=0x%02x\n", rpwm, pwrpriv->cpwm));
|
||||
("rtw_set_rpwm: rpwm =0x%02x cpwm =0x%02x\n", rpwm, pwrpriv->cpwm));
|
||||
|
||||
pwrpriv->rpwm = pslv;
|
||||
|
||||
|
@ -471,11 +471,11 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a
|
|||
#endif /* CONFIG_P2P */
|
||||
|
||||
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_,
|
||||
("%s: PowerMode=%d Smart_PS=%d\n",
|
||||
("%s: PowerMode =%d Smart_PS =%d\n",
|
||||
__FUNCTION__, ps_mode, smart_ps));
|
||||
|
||||
if (ps_mode > PM_Card_Disable) {
|
||||
RT_TRACE(_module_rtl871x_pwrctrl_c_,_drv_err_,("ps_mode:%d error\n", ps_mode));
|
||||
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_err_, ("ps_mode:%d error\n", ps_mode));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -634,7 +634,7 @@ void LeaveAllPowerSaveMode(struct adapter *Adapter)
|
|||
|
||||
;
|
||||
|
||||
/* DBG_871X("%s.....\n",__FUNCTION__); */
|
||||
/* DBG_871X("%s.....\n", __FUNCTION__); */
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
{ /* connect */
|
||||
#ifdef CONFIG_P2P
|
||||
|
@ -643,14 +643,14 @@ void LeaveAllPowerSaveMode(struct adapter *Adapter)
|
|||
|
||||
rtw_lps_ctrl_wk_cmd(Adapter, LPS_CTRL_LEAVE, enqueue);
|
||||
} else {
|
||||
if (adapter_to_pwrctl(Adapter)->rf_pwrstate== rf_off)
|
||||
if (adapter_to_pwrctl(Adapter)->rf_pwrstate == rf_off)
|
||||
{
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
if (Adapter->registrypriv.usbss_enable)
|
||||
{
|
||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,35))
|
||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2, 6, 35))
|
||||
usb_disable_autosuspend(adapter_to_dvobj(Adapter)->pusbdev);
|
||||
#elif (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,22) && LINUX_VERSION_CODE<=KERNEL_VERSION(2,6,34))
|
||||
#elif (LINUX_VERSION_CODE>=KERNEL_VERSION(2, 6, 22) && LINUX_VERSION_CODE<=KERNEL_VERSION(2, 6, 34))
|
||||
adapter_to_dvobj(Adapter)->pusbdev->autosuspend_disabled = Adapter->bDisableAutosuspend;/* autosuspend disabled by the user */
|
||||
#endif
|
||||
}
|
||||
|
@ -667,8 +667,8 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter)
|
|||
|
||||
_init_pwrlock(&pwrctrlpriv->lock);
|
||||
pwrctrlpriv->rf_pwrstate = rf_on;
|
||||
pwrctrlpriv->ips_enter_cnts=0;
|
||||
pwrctrlpriv->ips_leave_cnts=0;
|
||||
pwrctrlpriv->ips_enter_cnts =0;
|
||||
pwrctrlpriv->ips_leave_cnts =0;
|
||||
pwrctrlpriv->bips_processing = false;
|
||||
|
||||
pwrctrlpriv->ips_mode = padapter->registrypriv.ips_mode;
|
||||
|
@ -750,7 +750,7 @@ extern int rtw_resume_process(struct adapter *padapter);
|
|||
static void rtw_early_suspend(struct early_suspend *h)
|
||||
{
|
||||
struct pwrctrl_priv *pwrpriv = container_of(h, struct pwrctrl_priv, early_suspend);
|
||||
DBG_871X("%s\n",__FUNCTION__);
|
||||
DBG_871X("%s\n", __FUNCTION__);
|
||||
|
||||
rtw_set_do_late_resume(pwrpriv, false);
|
||||
}
|
||||
|
@ -761,7 +761,7 @@ static void rtw_late_resume(struct early_suspend *h)
|
|||
struct dvobj_priv *dvobj = pwrctl_to_dvobj(pwrpriv);
|
||||
struct adapter *adapter = dvobj->if1;
|
||||
|
||||
DBG_871X("%s\n",__FUNCTION__);
|
||||
DBG_871X("%s\n", __FUNCTION__);
|
||||
if (pwrpriv->do_late_resume) {
|
||||
rtw_set_do_late_resume(pwrpriv, false);
|
||||
rtw_resume_process(adapter);
|
||||
|
@ -798,7 +798,7 @@ extern int rtw_resume_process(struct adapter *padapter);
|
|||
static void rtw_early_suspend(android_early_suspend_t *h)
|
||||
{
|
||||
struct pwrctrl_priv *pwrpriv = container_of(h, struct pwrctrl_priv, early_suspend);
|
||||
DBG_871X("%s\n",__FUNCTION__);
|
||||
DBG_871X("%s\n", __FUNCTION__);
|
||||
|
||||
rtw_set_do_late_resume(pwrpriv, false);
|
||||
}
|
||||
|
@ -809,7 +809,7 @@ static void rtw_late_resume(android_early_suspend_t *h)
|
|||
struct dvobj_priv *dvobj = pwrctl_to_dvobj(pwrpriv);
|
||||
struct adapter *adapter = dvobj->if1;
|
||||
|
||||
DBG_871X("%s\n",__FUNCTION__);
|
||||
DBG_871X("%s\n", __FUNCTION__);
|
||||
if (pwrpriv->do_late_resume) {
|
||||
rtw_set_do_late_resume(pwrpriv, false);
|
||||
rtw_resume_process(adapter);
|
||||
|
@ -841,10 +841,10 @@ void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv)
|
|||
}
|
||||
#endif /* CONFIG_ANDROID_POWER */
|
||||
|
||||
u8 rtw_interface_ps_func(struct adapter *padapter, enum HAL_INTF_PS_FUNC efunc_id,u8* val)
|
||||
u8 rtw_interface_ps_func(struct adapter *padapter, enum HAL_INTF_PS_FUNC efunc_id, u8* val)
|
||||
{
|
||||
u8 bResult = true;
|
||||
rtw_hal_intf_ps_func(padapter,efunc_id,val);
|
||||
rtw_hal_intf_ps_func(padapter, efunc_id, val);
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
@ -923,14 +923,14 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
|
|||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
{
|
||||
#if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||
if (true==pwrpriv->bInternalAutoSuspend){
|
||||
if (0==pwrpriv->autopm_cnt){
|
||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,33))
|
||||
if (true ==pwrpriv->bInternalAutoSuspend){
|
||||
if (0 ==pwrpriv->autopm_cnt){
|
||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2, 6, 33))
|
||||
if (usb_autopm_get_interface(adapter_to_dvobj(padapter)->pusbintf) < 0)
|
||||
{
|
||||
DBG_871X( "can't get autopm:\n");
|
||||
}
|
||||
#elif (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,20))
|
||||
#elif (LINUX_VERSION_CODE>=KERNEL_VERSION(2, 6, 20))
|
||||
usb_autopm_disable(adapter_to_dvobj(padapter)->pusbintf);
|
||||
#else
|
||||
usb_autoresume_device(adapter_to_dvobj(padapter)->pusbdev, 1);
|
||||
|
@ -948,7 +948,7 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
|
|||
if (rf_off == pwrpriv->rf_pwrstate )
|
||||
{
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
if (pwrpriv->brfoffbyhw==true)
|
||||
if (pwrpriv->brfoffbyhw ==true)
|
||||
{
|
||||
DBG_8192C("hw still in rf_off state ...........\n");
|
||||
ret = _FAIL;
|
||||
|
@ -956,7 +956,7 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
|
|||
}
|
||||
else if (padapter->registrypriv.usbss_enable)
|
||||
{
|
||||
DBG_8192C("%s call autoresume_enter....\n",__FUNCTION__);
|
||||
DBG_8192C("%s call autoresume_enter....\n", __FUNCTION__);
|
||||
if (_FAIL == autoresume_enter(padapter))
|
||||
{
|
||||
DBG_8192C("======> autoresume fail.............\n");
|
||||
|
@ -967,7 +967,7 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
|
|||
else
|
||||
#endif
|
||||
{
|
||||
DBG_8192C("%s call ips_leave....\n",__FUNCTION__);
|
||||
DBG_8192C("%s call ips_leave....\n", __FUNCTION__);
|
||||
if (_FAIL == ips_leave(padapter))
|
||||
{
|
||||
DBG_8192C("======> ips_leave fail.............\n");
|
||||
|
@ -982,12 +982,12 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
|
|||
|| !padapter->bup
|
||||
|| !padapter->hw_init_completed
|
||||
){
|
||||
DBG_8192C("%s: bDriverStopped=%d, bup=%d, hw_init_completed=%u\n"
|
||||
DBG_8192C("%s: bDriverStopped =%d, bup =%d, hw_init_completed =%u\n"
|
||||
, caller
|
||||
, padapter->bDriverStopped
|
||||
, padapter->bup
|
||||
, padapter->hw_init_completed);
|
||||
ret= false;
|
||||
ret = false;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
|
492
core/rtw_recv.c
492
core/rtw_recv.c
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -54,21 +54,21 @@ u8 sreset_get_wifi_status(struct adapter *padapter)
|
|||
{
|
||||
return status;
|
||||
}
|
||||
val32 =rtw_read32(padapter,REG_TXDMA_STATUS);
|
||||
if (val32==0xeaeaeaea){
|
||||
val32 =rtw_read32(padapter, REG_TXDMA_STATUS);
|
||||
if (val32 ==0xeaeaeaea){
|
||||
psrtpriv->Wifi_Error_Status = WIFI_IF_NOT_EXIST;
|
||||
}
|
||||
else if (val32!=0){
|
||||
DBG_8192C("txdmastatu(%x)\n",val32);
|
||||
DBG_8192C("txdmastatu(%x)\n", val32);
|
||||
psrtpriv->Wifi_Error_Status = WIFI_MAC_TXDMA_ERROR;
|
||||
}
|
||||
|
||||
if (WIFI_STATUS_SUCCESS !=psrtpriv->Wifi_Error_Status)
|
||||
{
|
||||
DBG_8192C("==>%s error_status(0x%x)\n",__FUNCTION__,psrtpriv->Wifi_Error_Status);
|
||||
DBG_8192C("==>%s error_status(0x%x)\n", __FUNCTION__, psrtpriv->Wifi_Error_Status);
|
||||
status = (psrtpriv->Wifi_Error_Status &( ~(USB_READ_PORT_FAIL|USB_WRITE_PORT_FAIL)));
|
||||
}
|
||||
DBG_8192C("==> %s wifi_status(0x%x)\n",__FUNCTION__,status);
|
||||
DBG_8192C("==> %s wifi_status(0x%x)\n", __FUNCTION__, status);
|
||||
|
||||
/* status restore */
|
||||
psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
|
||||
|
@ -101,7 +101,7 @@ static void sreset_restore_security_station(struct adapter *padapter)
|
|||
struct mlme_priv *mlmepriv = &padapter->mlmepriv;
|
||||
struct sta_priv * pstapriv = &padapter->stapriv;
|
||||
struct sta_info *psta;
|
||||
struct security_priv* psecuritypriv=&(padapter->securitypriv);
|
||||
struct security_priv* psecuritypriv =&(padapter->securitypriv);
|
||||
struct mlme_ext_info *pmlmeinfo = &padapter->mlmeextpriv.mlmext_info;
|
||||
|
||||
{
|
||||
|
@ -125,9 +125,9 @@ static void sreset_restore_security_station(struct adapter *padapter)
|
|||
else
|
||||
{
|
||||
/* pairwise key */
|
||||
rtw_setstakey_cmd(padapter, (unsigned char *)psta, true,false);
|
||||
rtw_setstakey_cmd(padapter, (unsigned char *)psta, true, false);
|
||||
/* group key */
|
||||
rtw_set_key(padapter,&padapter->securitypriv,padapter->securitypriv.dot118021XGrpKeyid, 0,false);
|
||||
rtw_set_key(padapter,&padapter->securitypriv, padapter->securitypriv.dot118021XGrpKeyid, 0, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -138,14 +138,14 @@ static void sreset_restore_network_station(struct adapter *padapter)
|
|||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
||||
rtw_setopmode_cmd(padapter, Ndis802_11Infrastructure,false);
|
||||
rtw_setopmode_cmd(padapter, Ndis802_11Infrastructure, false);
|
||||
|
||||
{
|
||||
u8 threshold;
|
||||
/* TH=1 => means that invalidate usb rx aggregation */
|
||||
/* TH=0 => means that validate usb rx aggregation, use init value. */
|
||||
/* TH =1 => means that invalidate usb rx aggregation */
|
||||
/* TH =0 => means that validate usb rx aggregation, use init value. */
|
||||
if (mlmepriv->htpriv.ht_option) {
|
||||
if (padapter->registrypriv.wifi_spec==1)
|
||||
if (padapter->registrypriv.wifi_spec ==1)
|
||||
threshold = 1;
|
||||
else
|
||||
threshold = 0;
|
||||
|
@ -172,7 +172,7 @@ static void sreset_restore_network_station(struct adapter *padapter)
|
|||
|
||||
mlmeext_joinbss_event_callback(padapter, 1);
|
||||
/* restore Sequence No. */
|
||||
rtw_write8(padapter,0x4dc,padapter->xmitpriv.nqos_ssn);
|
||||
rtw_write8(padapter, 0x4dc, padapter->xmitpriv.nqos_ssn);
|
||||
|
||||
sreset_restore_security_station(padapter);
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ static void rtw_mfree_all_stainfo(struct sta_priv *pstapriv )
|
|||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info ,list);
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info , list);
|
||||
plist = get_next(plist);
|
||||
}
|
||||
|
||||
|
@ -218,10 +218,10 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
|
|||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
int i;
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info ,hash_list);
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info , hash_list);
|
||||
plist = get_next(plist);
|
||||
|
||||
for (i=0; i < 16 ; i++)
|
||||
for (i =0; i < 16 ; i++)
|
||||
{
|
||||
preorder_ctrl = &psta->recvreorder_ctrl[i];
|
||||
_cancel_timer_ex(&preorder_ctrl->reordering_ctrl_timer);
|
||||
|
@ -276,11 +276,11 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
|
||||
index = wifi_mac_hash(hwaddr);
|
||||
|
||||
RT_TRACE(_module_rtl871x_sta_mgt_c_,_drv_info_,("rtw_alloc_stainfo: index = %x", index));
|
||||
RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_info_, ("rtw_alloc_stainfo: index = %x", index));
|
||||
|
||||
if (index >= NUM_STA){
|
||||
RT_TRACE(_module_rtl871x_sta_mgt_c_,_drv_err_,("ERROR=> rtw_alloc_stainfo: index >= NUM_STA"));
|
||||
psta= NULL;
|
||||
RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_, ("ERROR => rtw_alloc_stainfo: index >= NUM_STA"));
|
||||
psta = NULL;
|
||||
goto exit;
|
||||
}
|
||||
phash_list = &(pstapriv->sta_hash[index]);
|
||||
|
@ -297,13 +297,13 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
for ( i = 0; i < 16; i++ )
|
||||
memcpy( &psta->sta_recvpriv.rxcache.tid_rxseq[ i ], &wRxSeqInitialValue, 2 );
|
||||
|
||||
RT_TRACE(_module_rtl871x_sta_mgt_c_,_drv_info_,("alloc number_%d stainfo with hwaddr = %x %x %x %x %x %x \n",
|
||||
pstapriv->asoc_sta_count , hwaddr[0], hwaddr[1], hwaddr[2],hwaddr[3],hwaddr[4],hwaddr[5]));
|
||||
RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_info_, ("alloc number_%d stainfo with hwaddr = %x %x %x %x %x %x \n",
|
||||
pstapriv->asoc_sta_count , hwaddr[0], hwaddr[1], hwaddr[2], hwaddr[3], hwaddr[4], hwaddr[5]));
|
||||
|
||||
init_addba_retry_timer(pstapriv->padapter, psta);
|
||||
|
||||
/* for A-MPDU Rx reordering buffer control */
|
||||
for (i=0; i < 16 ; i++) {
|
||||
for (i =0; i < 16 ; i++) {
|
||||
preorder_ctrl = &psta->recvreorder_ctrl[i];
|
||||
|
||||
preorder_ctrl->padapter = pstapriv->padapter;
|
||||
|
@ -315,7 +315,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
DBG_871X("DBG_RX_SEQ %s:%d IndicateSeq: %d\n", __FUNCTION__, __LINE__,
|
||||
preorder_ctrl->indicate_seq);
|
||||
#endif
|
||||
preorder_ctrl->wend_b= 0xffff;
|
||||
preorder_ctrl->wend_b = 0xffff;
|
||||
/* preorder_ctrl->wsize_b = (NR_RECVBUFF-2); */
|
||||
preorder_ctrl->wsize_b = 64;/* 64; */
|
||||
|
||||
|
@ -345,7 +345,7 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
|
|||
struct __queue *pfree_sta_queue;
|
||||
struct recv_reorder_ctrl *preorder_ctrl;
|
||||
struct sta_xmit_priv *pstaxmitpriv;
|
||||
struct xmit_priv *pxmitpriv= &padapter->xmitpriv;
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct hw_xmit *phwxmit;
|
||||
|
||||
|
@ -409,12 +409,12 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
|
|||
spin_unlock_bh(&pxmitpriv->lock);
|
||||
|
||||
rtw_list_delete(&psta->hash_list);
|
||||
RT_TRACE(_module_rtl871x_sta_mgt_c_,_drv_err_,("\n free number_%d stainfo with hwaddr = 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x \n",pstapriv->asoc_sta_count , psta->hwaddr[0], psta->hwaddr[1], psta->hwaddr[2],psta->hwaddr[3],psta->hwaddr[4],psta->hwaddr[5]));
|
||||
RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_, ("\n free number_%d stainfo with hwaddr = 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x \n", pstapriv->asoc_sta_count , psta->hwaddr[0], psta->hwaddr[1], psta->hwaddr[2], psta->hwaddr[3], psta->hwaddr[4], psta->hwaddr[5]));
|
||||
pstapriv->asoc_sta_count --;
|
||||
_cancel_timer_ex(&psta->addba_retry_timer);
|
||||
|
||||
/* for A-MPDU Rx reordering buffer control, cancel reordering_ctrl_timer */
|
||||
for (i=0; i < 16 ; i++)
|
||||
for (i =0; i < 16 ; i++)
|
||||
{
|
||||
unsigned long irqL;
|
||||
struct list_head *phead, *plist;
|
||||
|
@ -505,19 +505,19 @@ void rtw_free_all_stainfo(struct adapter *padapter)
|
|||
|
||||
;
|
||||
|
||||
if (pstapriv->asoc_sta_count==1)
|
||||
if (pstapriv->asoc_sta_count ==1)
|
||||
goto exit;
|
||||
|
||||
spin_lock_bh(&pstapriv->sta_hash_lock);
|
||||
|
||||
for (index=0; index< NUM_STA; index++)
|
||||
for (index =0; index< NUM_STA; index++)
|
||||
{
|
||||
phead = &(pstapriv->sta_hash[index]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info ,hash_list);
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info , hash_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
|
||||
|
@ -549,11 +549,11 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
|
||||
u8 *addr;
|
||||
|
||||
u8 bc_addr[ETH_ALEN] = {0xff,0xff,0xff,0xff,0xff,0xff};
|
||||
u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
||||
|
||||
;
|
||||
|
||||
if (hwaddr==NULL)
|
||||
if (hwaddr ==NULL)
|
||||
return NULL;
|
||||
|
||||
if (IS_MCAST(hwaddr))
|
||||
|
@ -578,11 +578,11 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
|
||||
if ((_rtw_memcmp(psta->hwaddr, addr, ETH_ALEN))== true)
|
||||
if ((_rtw_memcmp(psta->hwaddr, addr, ETH_ALEN)) == true)
|
||||
{ /* if found the matched address */
|
||||
break;
|
||||
}
|
||||
psta=NULL;
|
||||
psta =NULL;
|
||||
plist = get_next(plist);
|
||||
}
|
||||
|
||||
|
@ -597,8 +597,8 @@ u32 rtw_init_bcmc_stainfo(struct adapter* padapter)
|
|||
|
||||
struct sta_info *psta;
|
||||
struct tx_servq *ptxservq;
|
||||
u32 res=_SUCCESS;
|
||||
u8 bcast_addr[ETH_ALEN] = {0xff,0xff,0xff,0xff,0xff,0xff};
|
||||
u32 res =_SUCCESS;
|
||||
u8 bcast_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
||||
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
|
||||
|
@ -606,16 +606,16 @@ u32 rtw_init_bcmc_stainfo(struct adapter* padapter)
|
|||
|
||||
psta = rtw_alloc_stainfo(pstapriv, bcast_addr);
|
||||
|
||||
if (psta==NULL){
|
||||
res=_FAIL;
|
||||
RT_TRACE(_module_rtl871x_sta_mgt_c_,_drv_err_,("rtw_alloc_stainfo fail"));
|
||||
if (psta ==NULL){
|
||||
res =_FAIL;
|
||||
RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_, ("rtw_alloc_stainfo fail"));
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/* default broadcast & multicast use macid 1 */
|
||||
psta->mac_id = 1;
|
||||
|
||||
ptxservq= &(psta->sta_xmitpriv.be_q);
|
||||
ptxservq = &(psta->sta_xmitpriv.be_q);
|
||||
|
||||
exit:
|
||||
return _SUCCESS;
|
||||
|
@ -624,7 +624,7 @@ exit:
|
|||
struct sta_info* rtw_get_bcmc_stainfo(struct adapter* padapter)
|
||||
{
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
u8 bc_addr[ETH_ALEN] = {0xff,0xff,0xff,0xff,0xff,0xff};
|
||||
u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
||||
|
||||
return rtw_get_stainfo(pstapriv, bc_addr);
|
||||
}
|
||||
|
|
|
@ -310,7 +310,7 @@ void UpdateBrateTbl(
|
|||
u8 rate;
|
||||
|
||||
/* 1M, 2M, 5.5M, 11M, 6M, 12M, 24M are mandatory. */
|
||||
for (i=0;i<NDIS_802_11_LENGTH_RATES_EX;i++)
|
||||
for (i =0;i<NDIS_802_11_LENGTH_RATES_EX;i++)
|
||||
{
|
||||
rate = mBratesOS[i] & 0x7f;
|
||||
switch (rate)
|
||||
|
@ -334,7 +334,7 @@ void UpdateBrateTblForSoftAP(u8 *bssrateset, u32 bssratelen)
|
|||
u8 i;
|
||||
u8 rate;
|
||||
|
||||
for (i=0;i<bssratelen;i++)
|
||||
for (i =0;i<bssratelen;i++)
|
||||
{
|
||||
rate = bssrateset[i] & 0x7f;
|
||||
switch (rate)
|
||||
|
@ -617,20 +617,20 @@ void invalidate_cam_all(struct adapter *padapter)
|
|||
rtw_hal_set_hwreg(padapter, HW_VAR_CAM_INVALID_ALL, NULL);
|
||||
}
|
||||
|
||||
void read_cam(struct adapter *padapter ,u8 entry)
|
||||
void read_cam(struct adapter *padapter , u8 entry)
|
||||
{
|
||||
u32 j,count = 0, addr;
|
||||
u32 j, count = 0, addr;
|
||||
u32 cam_val[2]; /* cam_val[0] is read_val, cam_val[1] is the address */
|
||||
addr = entry << 3;
|
||||
|
||||
DBG_8192C("********* DUMP CAM Entry_#%02d***************\n",entry);
|
||||
DBG_8192C("********* DUMP CAM Entry_#%02d***************\n", entry);
|
||||
for (j = 0; j < 6; j++)
|
||||
{
|
||||
/* cmd = _ReadCAM(padapter ,addr+j); */
|
||||
/* cmd = _ReadCAM(padapter , addr+j); */
|
||||
/* HW_VAR_CAM_READ */
|
||||
cam_val[1]=addr+j;
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_CAM_READ, (u8 *)cam_val);
|
||||
DBG_8192C("offset:0x%02x => 0x%08x\n",addr+j,cam_val[0]);
|
||||
DBG_8192C("offset:0x%02x => 0x%08x\n", addr+j, cam_val[0]);
|
||||
}
|
||||
DBG_8192C("*********************************\n");
|
||||
}
|
||||
|
@ -669,7 +669,7 @@ void write_cam(struct adapter *padapter, u8 entry, u16 ctrl, u8 *mac, u8 *key)
|
|||
void clear_cam_entry(struct adapter *padapter, u8 entry)
|
||||
{
|
||||
unsigned char null_sta[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
unsigned char null_key[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00};
|
||||
unsigned char null_key[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
write_cam(padapter, entry, 0, null_sta, null_key);
|
||||
}
|
||||
|
@ -743,7 +743,7 @@ int WMM_param_handler(struct adapter *padapter, struct ndis_802_11_variable_ies
|
|||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
||||
if (pmlmepriv->qospriv.qos_option==0)
|
||||
if (pmlmepriv->qospriv.qos_option ==0)
|
||||
{
|
||||
pmlmeinfo->WMM_enable = 0;
|
||||
return _FAIL;
|
||||
|
@ -830,14 +830,14 @@ void WMMOnAssocRsp(struct adapter *padapter)
|
|||
|
||||
inx[0] = 0; inx[1] = 1; inx[2] = 2; inx[3] = 3;
|
||||
|
||||
if (pregpriv->wifi_spec==1)
|
||||
if (pregpriv->wifi_spec ==1)
|
||||
{
|
||||
u32 j, tmp, change_inx;
|
||||
|
||||
/* entry indx: 0->vo, 1->vi, 2->be, 3->bk. */
|
||||
for (i=0; i<4; i++)
|
||||
for (i =0; i<4; i++)
|
||||
{
|
||||
for (j=i+1; j<4; j++)
|
||||
for (j =i+1; j<4; j++)
|
||||
{
|
||||
/* compare CW and AIFS */
|
||||
if ((edca[j] & 0xFFFF) < (edca[i] & 0xFFFF))
|
||||
|
@ -867,7 +867,7 @@ void WMMOnAssocRsp(struct adapter *padapter)
|
|||
}
|
||||
}
|
||||
|
||||
for (i=0; i<4; i++) {
|
||||
for (i =0; i<4; i++) {
|
||||
pxmitpriv->wmm_para_seq[i] = inx[i];
|
||||
DBG_871X("wmm_para_seq(%d): %d\n", i, pxmitpriv->wmm_para_seq[i]);
|
||||
}
|
||||
|
@ -981,7 +981,7 @@ void HT_caps_handler(struct adapter *padapter, struct ndis_802_11_variable_ies *
|
|||
struct ht_priv *phtpriv = &pmlmepriv->htpriv;
|
||||
struct registry_priv *pregistrypriv = &padapter->registrypriv;
|
||||
|
||||
if (pIE==NULL) return;
|
||||
if (pIE ==NULL) return;
|
||||
|
||||
if (phtpriv->ht_option == false) return;
|
||||
|
||||
|
@ -1044,7 +1044,7 @@ void HT_info_handler(struct adapter *padapter, struct ndis_802_11_variable_ies *
|
|||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct ht_priv *phtpriv = &pmlmepriv->htpriv;
|
||||
|
||||
if (pIE==NULL) return;
|
||||
if (pIE ==NULL) return;
|
||||
|
||||
if (phtpriv->ht_option == false) return;
|
||||
|
||||
|
@ -1159,8 +1159,8 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
|
|||
unsigned char *p;
|
||||
unsigned short val16, subtype;
|
||||
struct wlan_network *cur_network = &(Adapter->mlmepriv.cur_network);
|
||||
/* u8 wpa_ie[255],rsn_ie[255]; */
|
||||
u16 wpa_len=0,rsn_len=0;
|
||||
/* u8 wpa_ie[255], rsn_ie[255]; */
|
||||
u16 wpa_len =0, rsn_len =0;
|
||||
u8 encryp_protocol = 0;
|
||||
struct wlan_bssid_ex *bssid;
|
||||
int group_cipher = 0, pairwise_cipher = 0, is_8021x = 0;
|
||||
|
@ -1168,7 +1168,7 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
|
|||
u32 wpa_ielen = 0;
|
||||
u8 *pbssid = GetAddr3Ptr(pframe);
|
||||
u32 hidden_ssid = 0;
|
||||
u8 cur_network_type, network_type=0;
|
||||
u8 cur_network_type, network_type =0;
|
||||
struct HT_info_element *pht_info = NULL;
|
||||
struct ieee80211_ht_cap *pht_cap = NULL;
|
||||
u32 bcn_channel;
|
||||
|
@ -1197,7 +1197,7 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
|
|||
|
||||
subtype = GetFrameSubType(pframe) >> 4;
|
||||
|
||||
if (subtype==WIFI_BEACON)
|
||||
if (subtype ==WIFI_BEACON)
|
||||
bssid->Reserved[0] = 1;
|
||||
|
||||
bssid->Length = sizeof(struct wlan_bssid_ex) - MAX_IE_SZ + len;
|
||||
|
@ -1274,7 +1274,7 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
|
|||
bssid->Ssid.Ssid[0] = '\0';
|
||||
}
|
||||
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("%s bssid.Ssid.Ssid:%s bssid.Ssid.SsidLength:%d "
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("%s bssid.Ssid.Ssid:%s bssid.Ssid.SsidLength:%d "
|
||||
"cur_network->network.Ssid.Ssid:%s len:%d\n", __func__, bssid->Ssid.Ssid,
|
||||
bssid->Ssid.SsidLength, cur_network->network.Ssid.Ssid,
|
||||
cur_network->network.Ssid.SsidLength));
|
||||
|
@ -1295,15 +1295,15 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
|
|||
else
|
||||
bssid->Privacy = 0;
|
||||
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
|
||||
("%s(): cur_network->network.Privacy is %d, bssid.Privacy is %d\n",
|
||||
__func__, cur_network->network.Privacy,bssid->Privacy));
|
||||
__func__, cur_network->network.Privacy, bssid->Privacy));
|
||||
if (cur_network->network.Privacy != bssid->Privacy) {
|
||||
DBG_871X("%s(), privacy is not match return FAIL\n",__func__);
|
||||
DBG_871X("%s(), privacy is not match return FAIL\n", __func__);
|
||||
goto _mismatch;
|
||||
}
|
||||
|
||||
rtw_get_sec_ie(bssid->IEs, bssid->IELength, NULL,&rsn_len,NULL,&wpa_len);
|
||||
rtw_get_sec_ie(bssid->IEs, bssid->IELength, NULL,&rsn_len, NULL,&wpa_len);
|
||||
|
||||
if (rsn_len > 0) {
|
||||
encryp_protocol = ENCRYP_PROTOCOL_WPA2;
|
||||
|
@ -1315,7 +1315,7 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
|
|||
}
|
||||
|
||||
if (cur_network->BcnInfo.encryp_protocol != encryp_protocol) {
|
||||
DBG_871X("%s(): enctyp is not match ,return FAIL\n",__func__);
|
||||
DBG_871X("%s(): enctyp is not match , return FAIL\n", __func__);
|
||||
goto _mismatch;
|
||||
}
|
||||
|
||||
|
@ -1323,7 +1323,7 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
|
|||
pbuf = rtw_get_wpa_ie(&bssid->IEs[12], &wpa_ielen, bssid->IELength-12);
|
||||
if (pbuf && (wpa_ielen>0)) {
|
||||
if (_SUCCESS == rtw_parse_wpa_ie(pbuf, wpa_ielen+2, &group_cipher, &pairwise_cipher, &is_8021x)) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
|
||||
("%s pnetwork->pairwise_cipher: %d, group_cipher is %d, is_8021x is %d\n", __func__,
|
||||
pairwise_cipher, group_cipher, is_8021x));
|
||||
}
|
||||
|
@ -1332,24 +1332,24 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
|
|||
|
||||
if (pbuf && (wpa_ielen>0)) {
|
||||
if (_SUCCESS == rtw_parse_wpa2_ie(pbuf, wpa_ielen+2, &group_cipher, &pairwise_cipher, &is_8021x)) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
|
||||
("%s pnetwork->pairwise_cipher: %d, pnetwork->group_cipher is %d, is_802x is %d\n",
|
||||
__func__, pairwise_cipher, group_cipher, is_8021x));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,
|
||||
("%s cur_network->group_cipher is %d: %d\n",__func__, cur_network->BcnInfo.group_cipher, group_cipher));
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
|
||||
("%s cur_network->group_cipher is %d: %d\n", __func__, cur_network->BcnInfo.group_cipher, group_cipher));
|
||||
if (pairwise_cipher != cur_network->BcnInfo.pairwise_cipher || group_cipher != cur_network->BcnInfo.group_cipher) {
|
||||
DBG_871X("%s pairwise_cipher(%x:%x) or group_cipher(%x:%x) is not match ,return FAIL\n",__func__,
|
||||
DBG_871X("%s pairwise_cipher(%x:%x) or group_cipher(%x:%x) is not match , return FAIL\n", __func__,
|
||||
pairwise_cipher, cur_network->BcnInfo.pairwise_cipher,
|
||||
group_cipher, cur_network->BcnInfo.group_cipher);
|
||||
goto _mismatch;
|
||||
}
|
||||
|
||||
if (is_8021x != cur_network->BcnInfo.is_8021x) {
|
||||
DBG_871X("%s authentication is not match ,return FAIL\n", __func__);
|
||||
DBG_871X("%s authentication is not match , return FAIL\n", __func__);
|
||||
goto _mismatch;
|
||||
}
|
||||
}
|
||||
|
@ -1668,9 +1668,9 @@ int support_short_GI(struct adapter *padapter, struct HT_caps_element *pHT_caps)
|
|||
unsigned char get_highest_rate_idx(u32 mask)
|
||||
{
|
||||
int i;
|
||||
unsigned char rate_idx=0;
|
||||
unsigned char rate_idx =0;
|
||||
|
||||
for (i=27; i>=0; i--)
|
||||
for (i =27; i>=0; i--)
|
||||
{
|
||||
if (mask & BIT(i))
|
||||
{
|
||||
|
@ -1800,7 +1800,7 @@ unsigned char check_assoc_AP(u8 *pframe, uint len)
|
|||
DBG_871X("link to Realtek 96B\n");
|
||||
return HT_IOT_PEER_REALTEK;
|
||||
}
|
||||
else if (_rtw_memcmp(pIE->data, AIRGOCAP_OUI,3))
|
||||
else if (_rtw_memcmp(pIE->data, AIRGOCAP_OUI, 3))
|
||||
{
|
||||
DBG_871X("link to Airgo Cap\n");
|
||||
return HT_IOT_PEER_AIRGO;
|
||||
|
@ -2099,13 +2099,13 @@ int rtw_handle_dualmac(struct adapter *adapter, bool init)
|
|||
if (init) {
|
||||
if (pbuddy_padapter == NULL) {
|
||||
pbuddy_padapter = adapter;
|
||||
DBG_871X("%s(): pbuddy_padapter == NULL, Set pbuddy_padapter\n",__FUNCTION__);
|
||||
DBG_871X("%s(): pbuddy_padapter == NULL, Set pbuddy_padapter\n", __FUNCTION__);
|
||||
} else {
|
||||
adapter->pbuddy_adapter = pbuddy_padapter;
|
||||
pbuddy_padapter->pbuddy_adapter = adapter;
|
||||
/* clear global value */
|
||||
pbuddy_padapter = NULL;
|
||||
DBG_871X("%s(): pbuddy_padapter exist, Exchange Information\n",__FUNCTION__);
|
||||
DBG_871X("%s(): pbuddy_padapter exist, Exchange Information\n", __FUNCTION__);
|
||||
}
|
||||
}else {
|
||||
pbuddy_padapter = NULL;
|
||||
|
|
354
core/rtw_xmit.c
354
core/rtw_xmit.c
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue