mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-22 20:43:40 +00:00
rtl8188eu: Remove double blank lines in core/*.h
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
51e6fae39e
commit
11ab93f073
21 changed files with 0 additions and 462 deletions
|
@ -24,7 +24,6 @@
|
||||||
#include <drv_types.h>
|
#include <drv_types.h>
|
||||||
#include <wifi.h>
|
#include <wifi.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
|
|
||||||
extern unsigned char RTW_WPA_OUI[];
|
extern unsigned char RTW_WPA_OUI[];
|
||||||
|
@ -40,7 +39,6 @@ void init_mlme_ap_info(struct adapter *padapter)
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
||||||
|
|
||||||
|
|
||||||
spin_lock_init(&pmlmepriv->bcn_update_lock);
|
spin_lock_init(&pmlmepriv->bcn_update_lock);
|
||||||
|
|
||||||
/* for ACL */
|
/* for ACL */
|
||||||
|
@ -144,7 +142,6 @@ static void update_BCNTIM(struct adapter *padapter)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (remainder_ielen>0)
|
if (remainder_ielen>0)
|
||||||
{
|
{
|
||||||
pbackup_remainder_ie = rtw_malloc(remainder_ielen);
|
pbackup_remainder_ie = rtw_malloc(remainder_ielen);
|
||||||
|
@ -373,7 +370,6 @@ void expire_timeout_chk(struct adapter *padapter)
|
||||||
|
|
||||||
psta = NULL;
|
psta = NULL;
|
||||||
|
|
||||||
|
|
||||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||||
|
|
||||||
phead = &pstapriv->asoc_list;
|
phead = &pstapriv->asoc_list;
|
||||||
|
@ -597,7 +593,6 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
|
||||||
/* arg[5] = Short GI */
|
/* arg[5] = Short GI */
|
||||||
rtw_hal_add_ra_tid(padapter, tx_ra_bitmap, arg, rssi_level);
|
rtw_hal_add_ra_tid(padapter, tx_ra_bitmap, arg, rssi_level);
|
||||||
|
|
||||||
|
|
||||||
if (shortGIrate ==true)
|
if (shortGIrate ==true)
|
||||||
init_rate |= BIT(6);
|
init_rate |= BIT(6);
|
||||||
|
|
||||||
|
@ -741,7 +736,6 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)
|
||||||
else
|
else
|
||||||
psta->ieee8021x_blocked = false;
|
psta->ieee8021x_blocked = false;
|
||||||
|
|
||||||
|
|
||||||
/* update sta's cap */
|
/* update sta's cap */
|
||||||
|
|
||||||
/* ERP */
|
/* ERP */
|
||||||
|
@ -806,7 +800,6 @@ static void update_hw_ht_param(struct adapter *padapter)
|
||||||
|
|
||||||
DBG_871X("%s\n", __FUNCTION__);
|
DBG_871X("%s\n", __FUNCTION__);
|
||||||
|
|
||||||
|
|
||||||
/* handle A-MPDU parameter field */
|
/* handle A-MPDU parameter field */
|
||||||
/*
|
/*
|
||||||
AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k
|
AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k
|
||||||
|
@ -860,7 +853,6 @@ static void start_bss_network(struct adapter *padapter, u8 *pbuf)
|
||||||
cur_bwmode = HT_CHANNEL_WIDTH_20;;
|
cur_bwmode = HT_CHANNEL_WIDTH_20;;
|
||||||
cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
|
cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
|
||||||
|
|
||||||
|
|
||||||
/* check if there is wps ie, */
|
/* check if there is wps ie, */
|
||||||
/* if there is wpsie in beacon, the hostapd will update beacon twice when stating hostapd, */
|
/* if there is wpsie in beacon, the hostapd will update beacon twice when stating hostapd, */
|
||||||
/* and at first time the security ie ( RSN/WPA IE) will not include in beacon. */
|
/* and at first time the security ie ( RSN/WPA IE) will not include in beacon. */
|
||||||
|
@ -914,7 +906,6 @@ static void start_bss_network(struct adapter *padapter, u8 *pbuf)
|
||||||
/* Beacon Control related register */
|
/* Beacon Control related register */
|
||||||
rtw_hal_set_hwreg(padapter, HW_VAR_BEACON_INTERVAL, (u8 *)(&bcn_interval));
|
rtw_hal_set_hwreg(padapter, HW_VAR_BEACON_INTERVAL, (u8 *)(&bcn_interval));
|
||||||
|
|
||||||
|
|
||||||
UpdateBrateTbl(padapter, pnetwork->SupportedRates);
|
UpdateBrateTbl(padapter, pnetwork->SupportedRates);
|
||||||
rtw_hal_set_hwreg(padapter, HW_VAR_BASIC_RATE, pnetwork->SupportedRates);
|
rtw_hal_set_hwreg(padapter, HW_VAR_BASIC_RATE, pnetwork->SupportedRates);
|
||||||
|
|
||||||
|
@ -1016,7 +1007,6 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
u8 *ie = pbss_network->IEs;
|
u8 *ie = pbss_network->IEs;
|
||||||
|
|
||||||
|
|
||||||
/* SSID */
|
/* SSID */
|
||||||
/* Supported rates */
|
/* Supported rates */
|
||||||
/* DS Params */
|
/* DS Params */
|
||||||
|
@ -1033,7 +1023,6 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
||||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true)
|
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true)
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
|
|
||||||
|
|
||||||
if (len>MAX_IE_SZ)
|
if (len>MAX_IE_SZ)
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
|
|
||||||
|
@ -1043,7 +1032,6 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
||||||
|
|
||||||
memcpy(ie, pbuf, pbss_network->IELength);
|
memcpy(ie, pbuf, pbss_network->IELength);
|
||||||
|
|
||||||
|
|
||||||
if (pbss_network->InfrastructureMode!=Ndis802_11APMode)
|
if (pbss_network->InfrastructureMode!=Ndis802_11APMode)
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
|
|
||||||
|
@ -1079,7 +1067,6 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
||||||
|
|
||||||
pbss_network->Configuration.DSConfig = channel;
|
pbss_network->Configuration.DSConfig = channel;
|
||||||
|
|
||||||
|
|
||||||
memset(supportRate, 0, NDIS_802_11_LENGTH_RATES_EX);
|
memset(supportRate, 0, NDIS_802_11_LENGTH_RATES_EX);
|
||||||
/* get supported rates */
|
/* get supported rates */
|
||||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SUPPORTEDRATES_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SUPPORTEDRATES_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||||
|
@ -1102,7 +1089,6 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
||||||
|
|
||||||
rtw_set_supported_rate(pbss_network->SupportedRates, network_type);
|
rtw_set_supported_rate(pbss_network->SupportedRates, network_type);
|
||||||
|
|
||||||
|
|
||||||
/* parsing ERP_IE */
|
/* parsing ERP_IE */
|
||||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _ERPINFO_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _ERPINFO_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||||
if (p && ie_len>0)
|
if (p && ie_len>0)
|
||||||
|
@ -1211,11 +1197,9 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
||||||
|
|
||||||
pHT_caps_ie =p;
|
pHT_caps_ie =p;
|
||||||
|
|
||||||
|
|
||||||
ht_cap = true;
|
ht_cap = true;
|
||||||
network_type |= WIRELESS_11_24N;
|
network_type |= WIRELESS_11_24N;
|
||||||
|
|
||||||
|
|
||||||
rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
|
rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
|
||||||
|
|
||||||
if ((psecuritypriv->wpa_pairwise_cipher & WPA_CIPHER_CCMP) ||
|
if ((psecuritypriv->wpa_pairwise_cipher & WPA_CIPHER_CCMP) ||
|
||||||
|
@ -1295,7 +1279,6 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
||||||
/* issue beacon to start bss network */
|
/* issue beacon to start bss network */
|
||||||
start_bss_network(padapter, (u8*)pbss_network);
|
start_bss_network(padapter, (u8*)pbss_network);
|
||||||
|
|
||||||
|
|
||||||
/* alloc sta_info for ap itself */
|
/* alloc sta_info for ap itself */
|
||||||
psta = rtw_get_stainfo(&padapter->stapriv, pbss_network->MacAddress);
|
psta = rtw_get_stainfo(&padapter->stapriv, pbss_network->MacAddress);
|
||||||
if (!psta)
|
if (!psta)
|
||||||
|
@ -1344,7 +1327,6 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
|
||||||
if ((NUM_ACL-1) < pacl_list->num)
|
if ((NUM_ACL-1) < pacl_list->num)
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
|
|
||||||
spin_lock_bh(&(pacl_node_q->lock));
|
spin_lock_bh(&(pacl_node_q->lock));
|
||||||
|
|
||||||
phead = get_list_head(pacl_node_q);
|
phead = get_list_head(pacl_node_q);
|
||||||
|
@ -1368,11 +1350,9 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
|
||||||
|
|
||||||
spin_unlock_bh(&(pacl_node_q->lock));
|
spin_unlock_bh(&(pacl_node_q->lock));
|
||||||
|
|
||||||
|
|
||||||
if (added == true)
|
if (added == true)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
||||||
spin_lock_bh(&(pacl_node_q->lock));
|
spin_lock_bh(&(pacl_node_q->lock));
|
||||||
|
|
||||||
for (i =0; i< NUM_ACL; i++)
|
for (i =0; i< NUM_ACL; i++)
|
||||||
|
@ -1527,7 +1507,6 @@ static void update_bcn_wps_ie(struct adapter *padapter)
|
||||||
unsigned char *ie = pnetwork->IEs;
|
unsigned char *ie = pnetwork->IEs;
|
||||||
u32 ielen = pnetwork->IELength;
|
u32 ielen = pnetwork->IELength;
|
||||||
|
|
||||||
|
|
||||||
DBG_871X("%s\n", __FUNCTION__);
|
DBG_871X("%s\n", __FUNCTION__);
|
||||||
|
|
||||||
pwps_ie = rtw_get_wps_ie(ie+_FIXED_IE_LENGTH_, ielen-_FIXED_IE_LENGTH_, NULL, &wps_ielen);
|
pwps_ie = rtw_get_wps_ie(ie+_FIXED_IE_LENGTH_, ielen-_FIXED_IE_LENGTH_, NULL, &wps_ielen);
|
||||||
|
@ -1548,12 +1527,10 @@ static void update_bcn_wps_ie(struct adapter *padapter)
|
||||||
memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen);
|
memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pwps_ie_src = pmlmepriv->wps_beacon_ie;
|
pwps_ie_src = pmlmepriv->wps_beacon_ie;
|
||||||
if (pwps_ie_src == NULL)
|
if (pwps_ie_src == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
wps_ielen = (uint)pwps_ie_src[1];/* to get ie data len */
|
wps_ielen = (uint)pwps_ie_src[1];/* to get ie data len */
|
||||||
if ((wps_offset+wps_ielen+2+remainder_ielen)<=MAX_IE_SZ)
|
if ((wps_offset+wps_ielen+2+remainder_ielen)<=MAX_IE_SZ)
|
||||||
{
|
{
|
||||||
|
@ -1602,7 +1579,6 @@ static void update_bcn_vendor_spec_ie(struct adapter *padapter, u8*oui)
|
||||||
DBG_871X("unknown OUI type!\n");
|
DBG_871X("unknown OUI type!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
|
void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
|
||||||
|
@ -2043,14 +2019,12 @@ u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta, bool active, u16
|
||||||
psta->htpriv.agg_enable_bitmap = 0x0;/* reset */
|
psta->htpriv.agg_enable_bitmap = 0x0;/* reset */
|
||||||
psta->htpriv.candidate_tid_bitmap = 0x0;/* reset */
|
psta->htpriv.candidate_tid_bitmap = 0x0;/* reset */
|
||||||
|
|
||||||
|
|
||||||
/* report_del_sta_event(padapter, psta->hwaddr, reason); */
|
/* report_del_sta_event(padapter, psta->hwaddr, reason); */
|
||||||
|
|
||||||
/* clear cam entry / key */
|
/* clear cam entry / key */
|
||||||
/* clear_cam_entry(padapter, (psta->mac_id + 3)); */
|
/* clear_cam_entry(padapter, (psta->mac_id + 3)); */
|
||||||
rtw_clearstakey_cmd(padapter, (u8*)psta, (u8)(psta->mac_id + 3), true);
|
rtw_clearstakey_cmd(padapter, (u8*)psta, (u8)(psta->mac_id + 3), true);
|
||||||
|
|
||||||
|
|
||||||
spin_lock_bh(&psta->lock);
|
spin_lock_bh(&psta->lock);
|
||||||
psta->state &= ~_FW_LINKED;
|
psta->state &= ~_FW_LINKED;
|
||||||
spin_unlock_bh(&psta->lock);
|
spin_unlock_bh(&psta->lock);
|
||||||
|
@ -2146,7 +2120,6 @@ int rtw_sta_flush(struct adapter *padapter)
|
||||||
}
|
}
|
||||||
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
||||||
|
|
||||||
|
|
||||||
/* For each sta in chk_alive_list, call ap_free_sta */
|
/* For each sta in chk_alive_list, call ap_free_sta */
|
||||||
for (i = 0; i < chk_alive_num; i++) {
|
for (i = 0; i < chk_alive_num; i++) {
|
||||||
psta = rtw_get_stainfo_by_offset(pstapriv, chk_alive_list[i]);
|
psta = rtw_get_stainfo_by_offset(pstapriv, chk_alive_list[i]);
|
||||||
|
@ -2167,7 +2140,6 @@ void sta_info_update(struct adapter *padapter, struct sta_info *psta)
|
||||||
int flags = psta->flags;
|
int flags = psta->flags;
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
|
|
||||||
|
|
||||||
/* update wmm cap. */
|
/* update wmm cap. */
|
||||||
if (WLAN_STA_WME&flags)
|
if (WLAN_STA_WME&flags)
|
||||||
psta->qos_option = 1;
|
psta->qos_option = 1;
|
||||||
|
@ -2310,7 +2282,6 @@ void start_ap_mode(struct adapter *padapter)
|
||||||
pmlmepriv->p2p_beacon_ie = NULL;
|
pmlmepriv->p2p_beacon_ie = NULL;
|
||||||
pmlmepriv->p2p_probe_resp_ie = NULL;
|
pmlmepriv->p2p_probe_resp_ie = NULL;
|
||||||
|
|
||||||
|
|
||||||
/* for ACL */
|
/* for ACL */
|
||||||
_rtw_init_listhead(&(pacl_list->acl_node_q.queue));
|
_rtw_init_listhead(&(pacl_list->acl_node_q.queue));
|
||||||
pacl_list->num = 0;
|
pacl_list->num = 0;
|
||||||
|
|
|
@ -69,7 +69,6 @@
|
||||||
PPPoE |type| SID | AC MAC |
|
PPPoE |type| SID | AC MAC |
|
||||||
-----------------------------------------------------------------*/
|
-----------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
/* Find a tag in pppoe frame and return the pointer */
|
/* Find a tag in pppoe frame and return the pointer */
|
||||||
static __inline__ unsigned char *__nat25_find_pppoe_tag(struct pppoe_hdr *ph, unsigned short type)
|
static __inline__ unsigned char *__nat25_find_pppoe_tag(struct pppoe_hdr *ph, unsigned short type)
|
||||||
{
|
{
|
||||||
|
@ -88,7 +87,6 @@ static __inline__ unsigned char *__nat25_find_pppoe_tag(struct pppoe_hdr *ph, un
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static __inline__ int __nat25_add_pppoe_tag(struct sk_buff *skb, struct pppoe_tag *tag)
|
static __inline__ int __nat25_add_pppoe_tag(struct sk_buff *skb, struct pppoe_tag *tag)
|
||||||
{
|
{
|
||||||
struct pppoe_hdr *ph = (struct pppoe_hdr *)(skb->data + ETH_HLEN);
|
struct pppoe_hdr *ph = (struct pppoe_hdr *)(skb->data + ETH_HLEN);
|
||||||
|
@ -138,7 +136,6 @@ static __inline__ unsigned long __nat25_timeout(struct adapter *priv)
|
||||||
return timeout;
|
return timeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static __inline__ int __nat25_has_expired(struct adapter *priv,
|
static __inline__ int __nat25_has_expired(struct adapter *priv,
|
||||||
struct nat25_network_db_entry *fdb)
|
struct nat25_network_db_entry *fdb)
|
||||||
{
|
{
|
||||||
|
@ -148,7 +145,6 @@ static __inline__ int __nat25_has_expired(struct adapter *priv,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static __inline__ void __nat25_generate_ipv4_network_addr(unsigned char *networkAddr,
|
static __inline__ void __nat25_generate_ipv4_network_addr(unsigned char *networkAddr,
|
||||||
unsigned int *ipAddr)
|
unsigned int *ipAddr)
|
||||||
{
|
{
|
||||||
|
@ -158,7 +154,6 @@ static __inline__ void __nat25_generate_ipv4_network_addr(unsigned char *network
|
||||||
memcpy(networkAddr+7, (unsigned char *)ipAddr, 4);
|
memcpy(networkAddr+7, (unsigned char *)ipAddr, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static __inline__ void __nat25_generate_ipx_network_addr_with_node(unsigned char *networkAddr,
|
static __inline__ void __nat25_generate_ipx_network_addr_with_node(unsigned char *networkAddr,
|
||||||
__be32 *ipxNetAddr, unsigned char *ipxNodeAddr)
|
__be32 *ipxNetAddr, unsigned char *ipxNodeAddr)
|
||||||
{
|
{
|
||||||
|
@ -169,7 +164,6 @@ static __inline__ void __nat25_generate_ipx_network_addr_with_node(unsigned char
|
||||||
memcpy(networkAddr+5, ipxNodeAddr, 6);
|
memcpy(networkAddr+5, ipxNodeAddr, 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static __inline__ void __nat25_generate_ipx_network_addr_with_socket(unsigned char *networkAddr,
|
static __inline__ void __nat25_generate_ipx_network_addr_with_socket(unsigned char *networkAddr,
|
||||||
__be32 *ipxNetAddr, __be16 *ipxSocketAddr)
|
__be32 *ipxNetAddr, __be16 *ipxSocketAddr)
|
||||||
{
|
{
|
||||||
|
@ -180,7 +174,6 @@ static __inline__ void __nat25_generate_ipx_network_addr_with_socket(unsigned ch
|
||||||
memcpy(networkAddr+5, (unsigned char *)ipxSocketAddr, 2);
|
memcpy(networkAddr+5, (unsigned char *)ipxSocketAddr, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static __inline__ void __nat25_generate_apple_network_addr(unsigned char *networkAddr,
|
static __inline__ void __nat25_generate_apple_network_addr(unsigned char *networkAddr,
|
||||||
__be16 *network, unsigned char *node)
|
__be16 *network, unsigned char *node)
|
||||||
{
|
{
|
||||||
|
@ -191,7 +184,6 @@ static __inline__ void __nat25_generate_apple_network_addr(unsigned char *networ
|
||||||
networkAddr[3] = *node;
|
networkAddr[3] = *node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static __inline__ void __nat25_generate_pppoe_network_addr(unsigned char *networkAddr,
|
static __inline__ void __nat25_generate_pppoe_network_addr(unsigned char *networkAddr,
|
||||||
unsigned char *ac_mac, __be16 *sid)
|
unsigned char *ac_mac, __be16 *sid)
|
||||||
{
|
{
|
||||||
|
@ -202,7 +194,6 @@ static __inline__ void __nat25_generate_pppoe_network_addr(unsigned char *networ
|
||||||
memcpy(networkAddr+3, (unsigned char *)ac_mac, 6);
|
memcpy(networkAddr+3, (unsigned char *)ac_mac, 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef CL_IPV6_PASS
|
#ifdef CL_IPV6_PASS
|
||||||
static void __nat25_generate_ipv6_network_addr(unsigned char *networkAddr,
|
static void __nat25_generate_ipv6_network_addr(unsigned char *networkAddr,
|
||||||
unsigned int *ipAddr)
|
unsigned int *ipAddr)
|
||||||
|
@ -213,7 +204,6 @@ static void __nat25_generate_ipv6_network_addr(unsigned char *networkAddr,
|
||||||
memcpy(networkAddr+1, (unsigned char *)ipAddr, 16);
|
memcpy(networkAddr+1, (unsigned char *)ipAddr, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static unsigned char *scan_tlv(unsigned char *data, int len, unsigned char tag, unsigned char len8b)
|
static unsigned char *scan_tlv(unsigned char *data, int len, unsigned char tag, unsigned char len8b)
|
||||||
{
|
{
|
||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
|
@ -226,7 +216,6 @@ static unsigned char *scan_tlv(unsigned char *data, int len, unsigned char tag,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int update_nd_link_layer_addr(unsigned char *data, int len, unsigned char *replace_mac)
|
static int update_nd_link_layer_addr(unsigned char *data, int len, unsigned char *replace_mac)
|
||||||
{
|
{
|
||||||
struct icmp6hdr *icmphdr = (struct icmp6hdr *)data;
|
struct icmp6hdr *icmphdr = (struct icmp6hdr *)data;
|
||||||
|
@ -295,7 +284,6 @@ static int update_nd_link_layer_addr(unsigned char *data, int len, unsigned char
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void convert_ipv6_mac_to_mc(struct sk_buff *skb)
|
static void convert_ipv6_mac_to_mc(struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
struct ipv6hdr *iph = (struct ipv6hdr *)(skb->data + ETH_HLEN);
|
struct ipv6hdr *iph = (struct ipv6hdr *)(skb->data + ETH_HLEN);
|
||||||
|
@ -314,7 +302,6 @@ static void convert_ipv6_mac_to_mc(struct sk_buff *skb)
|
||||||
}
|
}
|
||||||
#endif /* CL_IPV6_PASS */
|
#endif /* CL_IPV6_PASS */
|
||||||
|
|
||||||
|
|
||||||
static __inline__ int __nat25_network_hash(unsigned char *networkAddr)
|
static __inline__ int __nat25_network_hash(unsigned char *networkAddr)
|
||||||
{
|
{
|
||||||
if (networkAddr[0] == NAT25_IPV4)
|
if (networkAddr[0] == NAT25_IPV4)
|
||||||
|
@ -375,7 +362,6 @@ static __inline__ int __nat25_network_hash(unsigned char *networkAddr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static __inline__ void __network_hash_link(struct adapter *priv,
|
static __inline__ void __network_hash_link(struct adapter *priv,
|
||||||
struct nat25_network_db_entry *ent, int hash)
|
struct nat25_network_db_entry *ent, int hash)
|
||||||
{
|
{
|
||||||
|
@ -392,7 +378,6 @@ static __inline__ void __network_hash_link(struct adapter *priv,
|
||||||
/* spin_unlock_bh(&priv->br_ext_lock); */
|
/* spin_unlock_bh(&priv->br_ext_lock); */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static __inline__ void __network_hash_unlink(struct nat25_network_db_entry *ent)
|
static __inline__ void __network_hash_unlink(struct nat25_network_db_entry *ent)
|
||||||
{
|
{
|
||||||
/* Caller must spin_lock_bh already! */
|
/* Caller must spin_lock_bh already! */
|
||||||
|
@ -408,7 +393,6 @@ static __inline__ void __network_hash_unlink(struct nat25_network_db_entry *ent)
|
||||||
/* spin_unlock_bh(&priv->br_ext_lock); */
|
/* spin_unlock_bh(&priv->br_ext_lock); */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int __nat25_db_network_lookup_and_replace(struct adapter *priv,
|
static int __nat25_db_network_lookup_and_replace(struct adapter *priv,
|
||||||
struct sk_buff *skb, unsigned char *networkAddr)
|
struct sk_buff *skb, unsigned char *networkAddr)
|
||||||
{
|
{
|
||||||
|
@ -485,7 +469,6 @@ static int __nat25_db_network_lookup_and_replace(struct adapter *priv,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void __nat25_db_network_insert(struct adapter *priv,
|
static void __nat25_db_network_insert(struct adapter *priv,
|
||||||
unsigned char *macAddr, unsigned char *networkAddr)
|
unsigned char *macAddr, unsigned char *networkAddr)
|
||||||
{
|
{
|
||||||
|
@ -525,7 +508,6 @@ static void __nat25_db_network_insert(struct adapter *priv,
|
||||||
spin_unlock_bh(&priv->br_ext_lock);
|
spin_unlock_bh(&priv->br_ext_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void __nat25_db_print(struct adapter *priv)
|
static void __nat25_db_print(struct adapter *priv)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -564,7 +546,6 @@ void nat25_db_cleanup(struct adapter *priv)
|
||||||
spin_unlock_bh(&priv->br_ext_lock);
|
spin_unlock_bh(&priv->br_ext_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void nat25_db_expire(struct adapter *priv)
|
void nat25_db_expire(struct adapter *priv)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -606,7 +587,6 @@ void nat25_db_expire(struct adapter *priv)
|
||||||
spin_unlock_bh(&priv->br_ext_lock);
|
spin_unlock_bh(&priv->br_ext_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef SUPPORT_TX_MCAST2UNI
|
#ifdef SUPPORT_TX_MCAST2UNI
|
||||||
static int checkIPMcAndReplace(struct adapter *priv, struct sk_buff *skb, unsigned int *dst_ip)
|
static int checkIPMcAndReplace(struct adapter *priv, struct sk_buff *skb, unsigned int *dst_ip)
|
||||||
{
|
{
|
||||||
|
@ -1318,7 +1298,6 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
||||||
iph->daddr.s6_addr16[0], iph->daddr.s6_addr16[1], iph->daddr.s6_addr16[2], iph->daddr.s6_addr16[3],
|
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]);
|
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);
|
__nat25_generate_ipv6_network_addr(networkAddr, (unsigned int *)&iph->daddr);
|
||||||
if (!__nat25_db_network_lookup_and_replace(priv, skb, networkAddr)) {
|
if (!__nat25_db_network_lookup_and_replace(priv, skb, networkAddr)) {
|
||||||
#ifdef SUPPORT_RX_UNI2MCAST
|
#ifdef SUPPORT_RX_UNI2MCAST
|
||||||
|
@ -1337,7 +1316,6 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int nat25_handle_frame(struct adapter *priv, struct sk_buff *skb)
|
int nat25_handle_frame(struct adapter *priv, struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
if (!(skb->data[0] & 1))
|
if (!(skb->data[0] & 1))
|
||||||
|
@ -1470,7 +1448,6 @@ void dhcp_flag_bcast(struct adapter *priv, struct sk_buff *skb)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void *scdb_findEntry(struct adapter *priv, unsigned char *macAddr,
|
void *scdb_findEntry(struct adapter *priv, unsigned char *macAddr,
|
||||||
unsigned char *ipAddr)
|
unsigned char *ipAddr)
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,7 +48,6 @@ sint _rtw_init_cmd_priv (struct cmd_priv *pcmdpriv)
|
||||||
/* _rtw_init_sema(&(pcmdpriv->cmd_done_sema), 0); */
|
/* _rtw_init_sema(&(pcmdpriv->cmd_done_sema), 0); */
|
||||||
_rtw_init_sema(&(pcmdpriv->terminate_cmdthread_sema), 0);
|
_rtw_init_sema(&(pcmdpriv->terminate_cmdthread_sema), 0);
|
||||||
|
|
||||||
|
|
||||||
_rtw_init_queue(&(pcmdpriv->cmd_queue));
|
_rtw_init_queue(&(pcmdpriv->cmd_queue));
|
||||||
|
|
||||||
/* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */
|
/* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */
|
||||||
|
@ -271,8 +270,6 @@ static int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
|
u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
|
||||||
{
|
{
|
||||||
int res = _FAIL;
|
int res = _FAIL;
|
||||||
|
@ -345,7 +342,6 @@ void rtw_free_cmd_obj(struct cmd_obj *pcmd)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void rtw_stop_cmd_thread(struct adapter *adapter)
|
void rtw_stop_cmd_thread(struct adapter *adapter)
|
||||||
{
|
{
|
||||||
if (adapter->cmdThread && adapter->cmdpriv.cmdthd_running == true
|
if (adapter->cmdThread && adapter->cmdpriv.cmdthd_running == true
|
||||||
|
@ -478,7 +474,6 @@ post_process:
|
||||||
}
|
}
|
||||||
pcmdpriv->cmdthd_running =false;
|
pcmdpriv->cmdthd_running =false;
|
||||||
|
|
||||||
|
|
||||||
/* free all cmd_obj resources */
|
/* free all cmd_obj resources */
|
||||||
do{
|
do{
|
||||||
pcmd = rtw_dequeue_cmd(pcmdpriv);
|
pcmd = rtw_dequeue_cmd(pcmdpriv);
|
||||||
|
@ -694,7 +689,6 @@ exit:
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
unsigned char rtw_setphy_cmd(unsigned char *adapter)
|
unsigned char rtw_setphy_cmd(unsigned char *adapter)
|
||||||
|
|
||||||
|
@ -1004,7 +998,6 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network* pnetwork)
|
||||||
/* for IEs is fix buf size */
|
/* for IEs is fix buf size */
|
||||||
t_len = sizeof(struct wlan_bssid_ex);
|
t_len = sizeof(struct wlan_bssid_ex);
|
||||||
|
|
||||||
|
|
||||||
/* for hidden ap to set fw_state here */
|
/* for hidden ap to set fw_state here */
|
||||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) != true)
|
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) != true)
|
||||||
{
|
{
|
||||||
|
@ -1065,7 +1058,6 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network* pnetwork)
|
||||||
|
|
||||||
psecnetwork->IELength = rtw_restruct_sec_ie(padapter, &pnetwork->network.IEs[0], &psecnetwork->IEs[0], pnetwork->network.IELength);
|
psecnetwork->IELength = rtw_restruct_sec_ie(padapter, &pnetwork->network.IEs[0], &psecnetwork->IEs[0], pnetwork->network.IELength);
|
||||||
|
|
||||||
|
|
||||||
pqospriv->qos_option = 0;
|
pqospriv->qos_option = 0;
|
||||||
|
|
||||||
if (pregistrypriv->wmm_enable)
|
if (pregistrypriv->wmm_enable)
|
||||||
|
@ -1525,7 +1517,6 @@ u8 rtw_reset_securitypriv_cmd(struct adapter*padapter)
|
||||||
|
|
||||||
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
|
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
|
||||||
|
|
||||||
|
|
||||||
/* rtw_enqueue_cmd(pcmdpriv, ph2c); */
|
/* rtw_enqueue_cmd(pcmdpriv, ph2c); */
|
||||||
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
||||||
|
|
||||||
|
@ -1565,7 +1556,6 @@ u8 rtw_free_assoc_resources_cmd(struct adapter*padapter)
|
||||||
|
|
||||||
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
|
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
|
||||||
|
|
||||||
|
|
||||||
/* rtw_enqueue_cmd(pcmdpriv, ph2c); */
|
/* rtw_enqueue_cmd(pcmdpriv, ph2c); */
|
||||||
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
||||||
|
|
||||||
|
@ -1603,7 +1593,6 @@ u8 rtw_dynamic_chk_wk_cmd(struct adapter*padapter)
|
||||||
|
|
||||||
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
|
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
|
||||||
|
|
||||||
|
|
||||||
/* rtw_enqueue_cmd(pcmdpriv, ph2c); */
|
/* rtw_enqueue_cmd(pcmdpriv, ph2c); */
|
||||||
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
||||||
|
|
||||||
|
@ -2625,7 +2614,6 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
|
||||||
|
|
||||||
spin_lock_bh(&pmlmepriv->lock);
|
spin_lock_bh(&pmlmepriv->lock);
|
||||||
|
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) )
|
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) )
|
||||||
{
|
{
|
||||||
psta = rtw_get_stainfo(&padapter->stapriv, pnetwork->MacAddress);
|
psta = rtw_get_stainfo(&padapter->stapriv, pnetwork->MacAddress);
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
#define _RTW_DEBUG_C_
|
#define _RTW_DEBUG_C_
|
||||||
|
|
||||||
|
|
||||||
#include <rtw_debug.h>
|
#include <rtw_debug.h>
|
||||||
#include <rtw_sreset.h>
|
#include <rtw_sreset.h>
|
||||||
|
|
||||||
|
@ -270,7 +269,6 @@ int proc_get_rf_info(char *page, char **start,
|
||||||
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);
|
pmlmeext->cur_channel, pmlmeext->cur_bwmode, pmlmeext->cur_ch_offset);
|
||||||
|
|
||||||
|
|
||||||
*eof = 1;
|
*eof = 1;
|
||||||
return len;
|
return len;
|
||||||
|
|
||||||
|
@ -527,7 +525,6 @@ int proc_get_rf_reg_dump1(char *page, char **start,
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int proc_get_rf_reg_dump2(char *page, char **start,
|
int proc_get_rf_reg_dump2(char *page, char **start,
|
||||||
off_t offset, int count,
|
off_t offset, int count,
|
||||||
int *eof, void *data)
|
int *eof, void *data)
|
||||||
|
@ -553,7 +550,6 @@ int proc_get_rf_reg_dump2(char *page, char **start,
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int proc_get_rf_reg_dump3(char *page, char **start,
|
int proc_get_rf_reg_dump3(char *page, char **start,
|
||||||
off_t offset, int count,
|
off_t offset, int count,
|
||||||
int *eof, void *data)
|
int *eof, void *data)
|
||||||
|
@ -580,7 +576,6 @@ int proc_get_rf_reg_dump3(char *page, char **start,
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int proc_get_rf_reg_dump4(char *page, char **start,
|
int proc_get_rf_reg_dump4(char *page, char **start,
|
||||||
off_t offset, int count,
|
off_t offset, int count,
|
||||||
int *eof, void *data)
|
int *eof, void *data)
|
||||||
|
@ -606,8 +601,6 @@ int proc_get_rf_reg_dump4(char *page, char **start,
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int proc_get_rx_signal(char *page, char **start,
|
int proc_get_rx_signal(char *page, char **start,
|
||||||
off_t offset, int count,
|
off_t offset, int count,
|
||||||
int *eof, void *data)
|
int *eof, void *data)
|
||||||
|
@ -930,7 +923,6 @@ int proc_set_rssi_disp(struct file *file, const char __user *buffer,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
|
|
||||||
int proc_get_all_sta_info(char *page, char **start,
|
int proc_get_all_sta_info(char *page, char **start,
|
||||||
|
@ -946,7 +938,6 @@ int proc_get_all_sta_info(char *page, char **start,
|
||||||
struct recv_reorder_ctrl *preorder_ctrl;
|
struct recv_reorder_ctrl *preorder_ctrl;
|
||||||
int len = 0;
|
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);
|
spin_lock_bh(&pstapriv->sta_hash_lock);
|
||||||
|
|
|
@ -25,8 +25,6 @@
|
||||||
|
|
||||||
#include <rtw_efuse.h>
|
#include <rtw_efuse.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*------------------------Define local variable------------------------------*/
|
/*------------------------Define local variable------------------------------*/
|
||||||
u8 fakeEfuseBank =0;
|
u8 fakeEfuseBank =0;
|
||||||
u32 fakeEfuseUsedBytes =0;
|
u32 fakeEfuseUsedBytes =0;
|
||||||
|
@ -225,7 +223,6 @@ ReadEFuseByte(
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
/* Description: */
|
/* Description: */
|
||||||
/* 1. Execute E-Fuse read byte operation according as map offset and */
|
/* 1. Execute E-Fuse read byte operation according as map offset and */
|
||||||
|
@ -524,7 +521,6 @@ Efuse_PgPacketWrite(struct adapter *pAdapter,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
Efuse_PgPacketWrite_BT(struct adapter *pAdapter,
|
Efuse_PgPacketWrite_BT(struct adapter *pAdapter,
|
||||||
u8 offset,
|
u8 offset,
|
||||||
|
@ -583,7 +579,6 @@ efuse_WordEnableDataRead(u8 word_en,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
u8
|
u8
|
||||||
Efuse_WordEnableDataWrite( struct adapter *pAdapter,
|
Efuse_WordEnableDataWrite( struct adapter *pAdapter,
|
||||||
u16 efuse_addr,
|
u16 efuse_addr,
|
||||||
|
@ -797,7 +792,6 @@ exit:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
u8 rtw_BT_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
|
u8 rtw_BT_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
|
||||||
{
|
{
|
||||||
|
@ -998,7 +992,6 @@ efuse_ShadowRead4Byte(
|
||||||
|
|
||||||
} /* efuse_ShadowRead4Byte */
|
} /* efuse_ShadowRead4Byte */
|
||||||
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------
|
/*-----------------------------------------------------------------------------
|
||||||
* Function: efuse_ShadowWrite1Byte
|
* Function: efuse_ShadowWrite1Byte
|
||||||
* efuse_ShadowWrite2Byte
|
* efuse_ShadowWrite2Byte
|
||||||
|
@ -1165,7 +1158,6 @@ EFUSE_ShadowWrite(
|
||||||
if ( pAdapter->registrypriv.mp_mode == 0)
|
if ( pAdapter->registrypriv.mp_mode == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
if (Type == 1)
|
if (Type == 1)
|
||||||
efuse_ShadowWrite1Byte(pAdapter, Offset, (u8)Value);
|
efuse_ShadowWrite1Byte(pAdapter, Offset, (u8)Value);
|
||||||
else if (Type == 2)
|
else if (Type == 2)
|
||||||
|
|
|
@ -66,7 +66,6 @@ static u8 WIFI_OFDMRATES[] =
|
||||||
IEEE80211_OFDM_RATE_48MB,
|
IEEE80211_OFDM_RATE_48MB,
|
||||||
IEEE80211_OFDM_RATE_54MB};
|
IEEE80211_OFDM_RATE_54MB};
|
||||||
|
|
||||||
|
|
||||||
int rtw_get_bit_value_from_ieee_value(u8 val)
|
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!! */
|
||||||
|
@ -265,7 +264,6 @@ u8 *rtw_get_ie_ex(u8 *in_ie, uint in_len, u8 eid, u8 *oui, u8 oui_len, u8 *ie, u
|
||||||
uint cnt;
|
uint cnt;
|
||||||
u8 *target_ie = NULL;
|
u8 *target_ie = NULL;
|
||||||
|
|
||||||
|
|
||||||
if (ielen)
|
if (ielen)
|
||||||
*ielen = 0;
|
*ielen = 0;
|
||||||
|
|
||||||
|
@ -460,7 +458,6 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv)
|
||||||
/* DS parameter set */
|
/* DS parameter set */
|
||||||
ie = rtw_set_ie(ie, _DSSET_IE_, 1, (u8 *)&(pdev_network->Configuration.DSConfig), &sz);
|
ie = rtw_set_ie(ie, _DSSET_IE_, 1, (u8 *)&(pdev_network->Configuration.DSConfig), &sz);
|
||||||
|
|
||||||
|
|
||||||
/* IBSS Parameter Set */
|
/* IBSS Parameter Set */
|
||||||
|
|
||||||
ie = rtw_set_ie(ie, _IBSS_PARA_IE_, 2, (u8 *)&(pdev_network->Configuration.ATIMWindow), &sz);
|
ie = rtw_set_ie(ie, _IBSS_PARA_IE_, 2, (u8 *)&(pdev_network->Configuration.ATIMWindow), &sz);
|
||||||
|
@ -576,7 +573,6 @@ int rtw_get_wpa2_cipher_suite(u8 *s)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int rtw_parse_wpa_ie(u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwise_cipher, int *is_8021x)
|
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;
|
||||||
|
@ -589,7 +585,6 @@ int rtw_parse_wpa_ie(u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwis
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((*wpa_ie != _WPA_IE_ID_) || (*(wpa_ie+1) != (u8)(wpa_ie_len - 2)) ||
|
if ((*wpa_ie != _WPA_IE_ID_) || (*(wpa_ie+1) != (u8)(wpa_ie_len - 2)) ||
|
||||||
(_rtw_memcmp(wpa_ie+2, RTW_WPA_OUI_TYPE, WPA_SELECTOR_LEN) != true) )
|
(_rtw_memcmp(wpa_ie+2, RTW_WPA_OUI_TYPE, WPA_SELECTOR_LEN) != true) )
|
||||||
{
|
{
|
||||||
|
@ -601,7 +596,6 @@ int rtw_parse_wpa_ie(u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwis
|
||||||
pos += 8;
|
pos += 8;
|
||||||
left = wpa_ie_len - 8;
|
left = wpa_ie_len - 8;
|
||||||
|
|
||||||
|
|
||||||
/* group_cipher */
|
/* group_cipher */
|
||||||
if (left >= WPA_SELECTOR_LEN) {
|
if (left >= WPA_SELECTOR_LEN) {
|
||||||
|
|
||||||
|
@ -618,7 +612,6 @@ int rtw_parse_wpa_ie(u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwis
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* pairwise_cipher */
|
/* pairwise_cipher */
|
||||||
if (left >= 2)
|
if (left >= 2)
|
||||||
{
|
{
|
||||||
|
@ -674,7 +667,6 @@ int rtw_parse_wpa2_ie(u8* rsn_ie, int rsn_ie_len, int *group_cipher, int *pairwi
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((*rsn_ie!= _WPA2_IE_ID_) || (*(rsn_ie+1) != (u8)(rsn_ie_len - 2)))
|
if ((*rsn_ie!= _WPA2_IE_ID_) || (*(rsn_ie+1) != (u8)(rsn_ie_len - 2)))
|
||||||
{
|
{
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
|
@ -1699,7 +1691,6 @@ int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
|
||||||
uint cnt = 0;
|
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 )
|
if ( in_len < 0 )
|
||||||
|
@ -1784,7 +1775,6 @@ int rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id , u8
|
||||||
uint cnt = 0;
|
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_ ) ||
|
if ( ( wfd_ie[ 0 ] != _VENDOR_SPECIFIC_IE_ ) ||
|
||||||
|
|
|
@ -27,7 +27,6 @@ b. provides the protocol engine
|
||||||
|
|
||||||
c. provides the software interface between caller and the hardware interface
|
c. provides the software interface between caller and the hardware interface
|
||||||
|
|
||||||
|
|
||||||
Compiler Flag Option:
|
Compiler Flag Option:
|
||||||
|
|
||||||
a. USE_ASYNC_IRP: Both sync/async operations are provided.
|
a. USE_ASYNC_IRP: Both sync/async operations are provided.
|
||||||
|
@ -183,7 +182,6 @@ void _rtw_read_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
|
||||||
struct io_priv *pio_priv = &adapter->iopriv;
|
struct io_priv *pio_priv = &adapter->iopriv;
|
||||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||||
|
|
||||||
|
|
||||||
if (adapter->bDriverStopped || adapter->bSurpriseRemoved) {
|
if (adapter->bDriverStopped || adapter->bSurpriseRemoved) {
|
||||||
RT_TRACE(_module_rtl871x_io_c_, _drv_info_,
|
RT_TRACE(_module_rtl871x_io_c_, _drv_info_,
|
||||||
("rtw_read_mem:bDriverStopped(%d) OR bSurpriseRemoved(%d)",
|
("rtw_read_mem:bDriverStopped(%d) OR bSurpriseRemoved(%d)",
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
#define _RTW_IOCTL_SET_C_
|
#define _RTW_IOCTL_SET_C_
|
||||||
|
|
||||||
|
|
||||||
#include <drv_conf.h>
|
#include <drv_conf.h>
|
||||||
#include <osdep_service.h>
|
#include <osdep_service.h>
|
||||||
#include <drv_types.h>
|
#include <drv_types.h>
|
||||||
|
@ -231,7 +230,6 @@ u8 rtw_set_802_11_bssid(struct adapter* padapter, u8 *bssid)
|
||||||
|
|
||||||
spin_lock_bh(&pmlmepriv->lock);
|
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) {
|
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
|
||||||
goto handle_tkip_countermeasure;
|
goto handle_tkip_countermeasure;
|
||||||
|
@ -560,7 +558,6 @@ u8 rtw_set_802_11_infrastructure_mode(struct adapter* padapter,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
u8 rtw_set_802_11_disassociate(struct adapter *padapter)
|
u8 rtw_set_802_11_disassociate(struct adapter *padapter)
|
||||||
{
|
{
|
||||||
unsigned long irqL;
|
unsigned long irqL;
|
||||||
|
@ -1107,7 +1104,6 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Set key to CAM through H2C command */
|
/* Set key to CAM through H2C command */
|
||||||
if (bgrouptkey)/* never go to here */
|
if (bgrouptkey)/* never go to here */
|
||||||
{
|
{
|
||||||
|
|
|
@ -56,7 +56,6 @@ exit:
|
||||||
return xmit_frame;
|
return xmit_frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int rtw_IOL_append_cmds(struct xmit_frame *xmit_frame, u8 *IOL_cmds, u32 cmd_len)
|
int rtw_IOL_append_cmds(struct xmit_frame *xmit_frame, u8 *IOL_cmds, u32 cmd_len)
|
||||||
{
|
{
|
||||||
struct pkt_attrib *pattrib = &xmit_frame->attrib;
|
struct pkt_attrib *pattrib = &xmit_frame->attrib;
|
||||||
|
@ -186,8 +185,6 @@ 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)
|
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};
|
||||||
|
|
|
@ -94,7 +94,6 @@ InitLed871x(
|
||||||
_init_workitem(&(pLed->BlinkWorkItem), BlinkWorkItemCallback, pLed);
|
_init_workitem(&(pLed->BlinkWorkItem), BlinkWorkItemCallback, pLed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
/* Description: */
|
/* Description: */
|
||||||
/* DeInitialize an LED_871x object. */
|
/* DeInitialize an LED_871x object. */
|
||||||
|
@ -109,7 +108,6 @@ DeInitLed871x(
|
||||||
ResetLedStatus(pLed);
|
ResetLedStatus(pLed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
/* Description: */
|
/* Description: */
|
||||||
/* Implementation of LED blinking behavior. */
|
/* Implementation of LED blinking behavior. */
|
||||||
|
@ -169,7 +167,6 @@ static void SwLedBlink(PLED_871x pLed)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
bStopBlinking = true;
|
bStopBlinking = true;
|
||||||
break;
|
break;
|
||||||
|
@ -622,7 +619,6 @@ static void SwLedBlink3(PLED_871x pLed)
|
||||||
if ( pLed->bLedOn )
|
if ( pLed->bLedOn )
|
||||||
SwLedOff(padapter, 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;
|
pLed->bLedBlinkInProgress = false;
|
||||||
|
@ -681,7 +677,6 @@ static void SwLedBlink3(PLED_871x pLed)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -873,7 +868,6 @@ static void SwLedBlink4(PLED_871x pLed)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -943,7 +937,6 @@ static void SwLedBlink5(PLED_871x pLed)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case LED_BLINK_TXRX:
|
case LED_BLINK_TXRX:
|
||||||
pLed->BlinkTimes--;
|
pLed->BlinkTimes--;
|
||||||
if ( pLed->BlinkTimes == 0 )
|
if ( pLed->BlinkTimes == 0 )
|
||||||
|
@ -1120,7 +1113,6 @@ SwLedControlMode0(
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1296,7 +1288,6 @@ SwLedControlMode1(
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case LED_CTL_STOP_WPS:
|
case LED_CTL_STOP_WPS:
|
||||||
if (pLed->bLedNoLinkBlinkInProgress == true)
|
if (pLed->bLedNoLinkBlinkInProgress == true)
|
||||||
{
|
{
|
||||||
|
@ -1739,7 +1730,6 @@ 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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Edimax-Belkin, added by chiyoko, 20090413 */
|
/* Edimax-Belkin, added by chiyoko, 20090413 */
|
||||||
static void
|
static void
|
||||||
SwLedControlMode4(
|
SwLedControlMode4(
|
||||||
|
@ -2070,8 +2060,6 @@ 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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Sercomm-Belkin, added by chiyoko, 20090415 */
|
/* Sercomm-Belkin, added by chiyoko, 20090415 */
|
||||||
static void
|
static void
|
||||||
SwLedControlMode5(
|
SwLedControlMode5(
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
#define _RTW_MLME_C_
|
#define _RTW_MLME_C_
|
||||||
|
|
||||||
|
|
||||||
#include <drv_conf.h>
|
#include <drv_conf.h>
|
||||||
#include <osdep_service.h>
|
#include <osdep_service.h>
|
||||||
#include <drv_types.h>
|
#include <drv_types.h>
|
||||||
|
@ -267,7 +266,6 @@ void _rtw_free_network(struct mlme_priv *pmlmepriv , struct wlan_network *pnetwo
|
||||||
|
|
||||||
pmlmepriv->num_of_scanned --;
|
pmlmepriv->num_of_scanned --;
|
||||||
|
|
||||||
|
|
||||||
/* DBG_871X("_rtw_free_network:SSID =%s\n", pnetwork->network.Ssid.Ssid); */
|
/* DBG_871X("_rtw_free_network:SSID =%s\n", pnetwork->network.Ssid.Ssid); */
|
||||||
|
|
||||||
spin_unlock_bh(&free_queue->lock);
|
spin_unlock_bh(&free_queue->lock);
|
||||||
|
@ -307,7 +305,6 @@ exit:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
return the wlan_network with the matching addr
|
return the wlan_network with the matching addr
|
||||||
|
|
||||||
|
@ -356,7 +353,6 @@ exit:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
|
void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
|
||||||
{
|
{
|
||||||
unsigned long irqL;
|
unsigned long irqL;
|
||||||
|
@ -367,7 +363,6 @@ void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
spin_lock_bh(&scanned_queue->lock);
|
spin_lock_bh(&scanned_queue->lock);
|
||||||
|
|
||||||
phead = get_list_head(scanned_queue);
|
phead = get_list_head(scanned_queue);
|
||||||
|
@ -390,9 +385,6 @@ void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sint rtw_if_up(struct adapter *padapter) {
|
sint rtw_if_up(struct adapter *padapter) {
|
||||||
|
|
||||||
sint res;
|
sint res;
|
||||||
|
@ -410,7 +402,6 @@ sint rtw_if_up(struct adapter *padapter) {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void rtw_generate_random_ibss(u8* pibss)
|
void rtw_generate_random_ibss(u8* pibss)
|
||||||
{
|
{
|
||||||
u32 curtime = rtw_get_current_time();
|
u32 curtime = rtw_get_current_time();
|
||||||
|
@ -431,7 +422,6 @@ u8 *rtw_get_capability_from_ie(u8 *ie)
|
||||||
return (ie + 8 + 2);
|
return (ie + 8 + 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
u16 rtw_get_capability(struct wlan_bssid_ex *bss)
|
u16 rtw_get_capability(struct wlan_bssid_ex *bss)
|
||||||
{
|
{
|
||||||
__le16 val;
|
__le16 val;
|
||||||
|
@ -450,7 +440,6 @@ u8 *rtw_get_beacon_interval_from_ie(u8 *ie)
|
||||||
return (ie + 8);
|
return (ie + 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int rtw_init_mlme_priv (struct adapter *padapter)/* struct mlme_priv *pmlmepriv) */
|
int rtw_init_mlme_priv (struct adapter *padapter)/* struct mlme_priv *pmlmepriv) */
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
|
@ -502,7 +491,6 @@ void rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *p
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void rtw_free_network_queue(struct adapter* dev, u8 isfreeall)
|
void rtw_free_network_queue(struct adapter* dev, u8 isfreeall)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
|
@ -562,7 +550,6 @@ int is_same_network(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst, u8 fea
|
||||||
memcpy((u8 *)&ls_cap, rtw_get_capability_from_ie(src->IEs), 2);
|
memcpy((u8 *)&ls_cap, rtw_get_capability_from_ie(src->IEs), 2);
|
||||||
memcpy((u8 *)&ld_cap, rtw_get_capability_from_ie(dst->IEs), 2);
|
memcpy((u8 *)&ld_cap, rtw_get_capability_from_ie(dst->IEs), 2);
|
||||||
|
|
||||||
|
|
||||||
s_cap = le16_to_cpu(ls_cap);
|
s_cap = le16_to_cpu(ls_cap);
|
||||||
d_cap = le16_to_cpu(ld_cap);
|
d_cap = le16_to_cpu(ld_cap);
|
||||||
|
|
||||||
|
@ -705,12 +692,10 @@ static void update_current_network(struct adapter *adapter, struct wlan_bssid_ex
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
Caller must hold pmlmepriv->lock first.
|
Caller must hold pmlmepriv->lock first.
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *target)
|
void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *target)
|
||||||
{
|
{
|
||||||
|
@ -764,7 +749,6 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* If we didn't find a match, then get a new network slot to initialize
|
/* If we didn't find a match, then get a new network slot to initialize
|
||||||
* with this beacon's information */
|
* with this beacon's information */
|
||||||
/* if (rtw_end_of_queue_search(phead, plist) == true) { */
|
/* if (rtw_end_of_queue_search(phead, plist) == true) { */
|
||||||
|
@ -910,7 +894,6 @@ int rtw_is_desired_network(struct adapter *adapter, struct wlan_network *pnetwor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((desired_encmode != Ndis802_11EncryptionDisabled) && (privacy == 0)) {
|
if ((desired_encmode != Ndis802_11EncryptionDisabled) && (privacy == 0)) {
|
||||||
DBG_871X("desired_encmode: %d, privacy: %d\n", desired_encmode, privacy);
|
DBG_871X("desired_encmode: %d, privacy: %d\n", desired_encmode, privacy);
|
||||||
bselected = false;
|
bselected = false;
|
||||||
|
@ -922,7 +905,6 @@ int rtw_is_desired_network(struct adapter *adapter, struct wlan_network *pnetwor
|
||||||
bselected = false;
|
bselected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return bselected;
|
return bselected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -936,7 +918,6 @@ void rtw_atimdone_event_callback(struct adapter *adapter , u8 *pbuf)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf)
|
void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
{
|
{
|
||||||
unsigned long irqL;
|
unsigned long irqL;
|
||||||
|
@ -957,7 +938,6 @@ void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
spin_lock_bh(&pmlmepriv->lock);
|
spin_lock_bh(&pmlmepriv->lock);
|
||||||
|
|
||||||
/* update IBSS_network 's timestamp */
|
/* update IBSS_network 's timestamp */
|
||||||
|
@ -1001,8 +981,6 @@ exit:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
|
void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
{
|
{
|
||||||
unsigned long irqL;
|
unsigned long irqL;
|
||||||
|
@ -1046,7 +1024,6 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
if (timer_cancelled)
|
if (timer_cancelled)
|
||||||
_cancel_timer(&pmlmepriv->scan_to_timer, &timer_cancelled);
|
_cancel_timer(&pmlmepriv->scan_to_timer, &timer_cancelled);
|
||||||
|
|
||||||
|
|
||||||
spin_lock_bh(&pmlmepriv->lock);
|
spin_lock_bh(&pmlmepriv->lock);
|
||||||
|
|
||||||
rtw_set_signal_stat_timer(&adapter->recvpriv);
|
rtw_set_signal_stat_timer(&adapter->recvpriv);
|
||||||
|
@ -1254,7 +1231,6 @@ void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue)
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("rtw_free_assoc_resources : pwlan == NULL\n\n"));
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("rtw_free_assoc_resources : pwlan == NULL\n\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) && (adapter->stapriv.asoc_sta_count == 1))
|
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) && (adapter->stapriv.asoc_sta_count == 1))
|
||||||
/*||check_fwstate(pmlmepriv, WIFI_STATION_STATE)*/)
|
/*||check_fwstate(pmlmepriv, WIFI_STATION_STATE)*/)
|
||||||
{
|
{
|
||||||
|
@ -1287,7 +1263,6 @@ void rtw_indicate_connect(struct adapter *padapter)
|
||||||
|
|
||||||
rtw_led_control(padapter, LED_CTL_LINK);
|
rtw_led_control(padapter, LED_CTL_LINK);
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_DRVEXT_MODULE
|
#ifdef CONFIG_DRVEXT_MODULE
|
||||||
if (padapter->drvextpriv.enable_wpa)
|
if (padapter->drvextpriv.enable_wpa)
|
||||||
{
|
{
|
||||||
|
@ -1439,7 +1414,6 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, str
|
||||||
padapter->securitypriv.wps_ie_len = 0;
|
padapter->securitypriv.wps_ie_len = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* for A-MPDU Rx reordering buffer control for bmc_sta & sta_info */
|
/* for A-MPDU Rx reordering buffer control for bmc_sta & sta_info */
|
||||||
/* if A-MPDU Rx is enabled, reseting rx_ordering_ctrl wstart_b(indicate_seq) to default value =0xffff */
|
/* if A-MPDU Rx is enabled, reseting rx_ordering_ctrl wstart_b(indicate_seq) to default value =0xffff */
|
||||||
/* todo: check if AP can send A-MPDU packets */
|
/* todo: check if AP can send A-MPDU packets */
|
||||||
|
@ -1457,7 +1431,6 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, str
|
||||||
preorder_ctrl->wsize_b = 64;/* max_ampdu_sz; ex. 32(kbytes) -> wsize_b =32 */
|
preorder_ctrl->wsize_b = 64;/* max_ampdu_sz; ex. 32(kbytes) -> wsize_b =32 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bmc_sta = rtw_get_bcmc_stainfo(padapter);
|
bmc_sta = rtw_get_bcmc_stainfo(padapter);
|
||||||
if (bmc_sta)
|
if (bmc_sta)
|
||||||
{
|
{
|
||||||
|
@ -1476,7 +1449,6 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, str
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* misc. */
|
/* misc. */
|
||||||
update_sta_info(padapter, psta);
|
update_sta_info(padapter, psta);
|
||||||
|
|
||||||
|
@ -1498,7 +1470,6 @@ static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_net
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("\nfw_state:%x, BSSID:"MAC_FMT"\n"
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("\nfw_state:%x, BSSID:"MAC_FMT"\n"
|
||||||
, get_fwstate(pmlmepriv), MAC_ARG(pnetwork->network.MacAddress)));
|
, get_fwstate(pmlmepriv), MAC_ARG(pnetwork->network.MacAddress)));
|
||||||
|
|
||||||
|
|
||||||
/* why not use ptarget_wlan?? */
|
/* why not use ptarget_wlan?? */
|
||||||
memcpy(&cur_network->network, &pnetwork->network, pnetwork->network.Length);
|
memcpy(&cur_network->network, &pnetwork->network, pnetwork->network.Length);
|
||||||
/* some IEs in pnetwork is wrong, so we should use ptarget_wlan IEs */
|
/* some IEs in pnetwork is wrong, so we should use ptarget_wlan IEs */
|
||||||
|
@ -1507,7 +1478,6 @@ static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_net
|
||||||
|
|
||||||
cur_network->aid = pnetwork->join_res;
|
cur_network->aid = pnetwork->join_res;
|
||||||
|
|
||||||
|
|
||||||
rtw_set_signal_stat_timer(&padapter->recvpriv);
|
rtw_set_signal_stat_timer(&padapter->recvpriv);
|
||||||
padapter->recvpriv.signal_strength = ptarget_wlan->network.PhyInfo.SignalStrength;
|
padapter->recvpriv.signal_strength = ptarget_wlan->network.PhyInfo.SignalStrength;
|
||||||
padapter->recvpriv.signal_qual = ptarget_wlan->network.PhyInfo.SignalQuality;
|
padapter->recvpriv.signal_qual = ptarget_wlan->network.PhyInfo.SignalQuality;
|
||||||
|
@ -1573,7 +1543,6 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
||||||
|
|
||||||
rtw_get_encrypt_decrypt_from_registrypriv(adapter);
|
rtw_get_encrypt_decrypt_from_registrypriv(adapter);
|
||||||
|
|
||||||
|
|
||||||
if (pmlmepriv->assoc_ssid.SsidLength == 0)
|
if (pmlmepriv->assoc_ssid.SsidLength == 0)
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("@@@@@ joinbss event call back for Any SSid\n"));
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("@@@@@ joinbss event call back for Any SSid\n"));
|
||||||
else
|
else
|
||||||
|
@ -1634,7 +1603,6 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
||||||
goto exit_unlock;
|
goto exit_unlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* s3. find ptarget_sta & update ptarget_sta after update cur_network only for station mode */
|
/* s3. find ptarget_sta & update ptarget_sta after update cur_network only for station mode */
|
||||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
|
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
|
||||||
ptarget_sta = rtw_joinbss_update_stainfo(adapter, pnetwork);
|
ptarget_sta = rtw_joinbss_update_stainfo(adapter, pnetwork);
|
||||||
|
@ -1860,7 +1828,6 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
if (adapter->securitypriv.dot11AuthAlgrthm ==dot11AuthAlgrthm_8021X)
|
if (adapter->securitypriv.dot11AuthAlgrthm ==dot11AuthAlgrthm_8021X)
|
||||||
psta->dot118021XPrivacy = adapter->securitypriv.dot11PrivacyAlgrthm;
|
psta->dot118021XPrivacy = adapter->securitypriv.dot11PrivacyAlgrthm;
|
||||||
|
|
||||||
|
|
||||||
psta->ieee8021x_blocked = false;
|
psta->ieee8021x_blocked = false;
|
||||||
|
|
||||||
spin_lock_bh(&pmlmepriv->lock);
|
spin_lock_bh(&pmlmepriv->lock);
|
||||||
|
@ -1882,7 +1849,6 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
|
|
||||||
spin_unlock_bh(&pmlmepriv->lock);
|
spin_unlock_bh(&pmlmepriv->lock);
|
||||||
|
|
||||||
|
|
||||||
mlmeext_sta_add_event_callback(adapter, psta);
|
mlmeext_sta_add_event_callback(adapter, psta);
|
||||||
exit:
|
exit:
|
||||||
|
|
||||||
|
@ -1926,7 +1892,6 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
mlmeext_sta_del_event_callback(adapter);
|
mlmeext_sta_del_event_callback(adapter);
|
||||||
|
|
||||||
spin_lock_bh(&pmlmepriv->lock);
|
spin_lock_bh(&pmlmepriv->lock);
|
||||||
|
@ -2003,7 +1968,6 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2032,7 +1996,6 @@ void _rtw_join_timeout_handler (struct adapter *adapter)
|
||||||
if (adapter->bDriverStopped ||adapter->bSurpriseRemoved)
|
if (adapter->bDriverStopped ||adapter->bSurpriseRemoved)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
spin_lock_bh(&pmlmepriv->lock);
|
spin_lock_bh(&pmlmepriv->lock);
|
||||||
|
|
||||||
if (rtw_to_roaming(adapter) > 0) { /* join timeout caused by roaming */
|
if (rtw_to_roaming(adapter) > 0) { /* join timeout caused by roaming */
|
||||||
|
@ -2061,7 +2024,6 @@ void _rtw_join_timeout_handler (struct adapter *adapter)
|
||||||
|
|
||||||
spin_unlock_bh(&pmlmepriv->lock);
|
spin_unlock_bh(&pmlmepriv->lock);
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_DRVEXT_MODULE_WSC
|
#ifdef CONFIG_DRVEXT_MODULE_WSC
|
||||||
drvext_assoc_fail_indicate(&adapter->drvextpriv);
|
drvext_assoc_fail_indicate(&adapter->drvextpriv);
|
||||||
#endif
|
#endif
|
||||||
|
@ -2184,7 +2146,6 @@ void rtw_dynamic_check_timer_handlder(struct adapter *adapter)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool rtw_is_scan_deny(struct adapter *adapter)
|
inline bool rtw_is_scan_deny(struct adapter *adapter)
|
||||||
{
|
{
|
||||||
struct mlme_priv *mlmepriv = &adapter->mlmepriv;
|
struct mlme_priv *mlmepriv = &adapter->mlmepriv;
|
||||||
|
@ -2228,7 +2189,6 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
|
||||||
int updated = false;
|
int updated = false;
|
||||||
struct adapter *adapter = container_of(pmlmepriv, struct adapter, mlmepriv);
|
struct adapter *adapter = container_of(pmlmepriv, struct adapter, mlmepriv);
|
||||||
|
|
||||||
|
|
||||||
/* check bssid, if needed */
|
/* check bssid, if needed */
|
||||||
if (pmlmepriv->assoc_by_bssid ==true) {
|
if (pmlmepriv->assoc_by_bssid ==true) {
|
||||||
if (_rtw_memcmp(competitor->network.MacAddress, pmlmepriv->assoc_bssid, ETH_ALEN) ==false)
|
if (_rtw_memcmp(competitor->network.MacAddress, pmlmepriv->assoc_bssid, ETH_ALEN) ==false)
|
||||||
|
@ -2283,7 +2243,6 @@ The caller must hold the following spinlock
|
||||||
|
|
||||||
pmlmepriv->lock
|
pmlmepriv->lock
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv )
|
int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv )
|
||||||
|
@ -2330,7 +2289,6 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv )
|
||||||
candidate->network.Configuration.DSConfig);
|
candidate->network.Configuration.DSConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* check for situation of _FW_LINKED */
|
/* check for situation of _FW_LINKED */
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
|
||||||
DBG_871X("%s: _FW_LINKED while ask_for_joinbss!!!\n", __FUNCTION__);
|
DBG_871X("%s: _FW_LINKED while ask_for_joinbss!!!\n", __FUNCTION__);
|
||||||
|
@ -2392,7 +2350,6 @@ sint rtw_set_auth(struct adapter * adapter, struct security_priv *psecuritypriv)
|
||||||
pcmd->rsp = NULL;
|
pcmd->rsp = NULL;
|
||||||
pcmd->rspsz = 0;
|
pcmd->rspsz = 0;
|
||||||
|
|
||||||
|
|
||||||
_rtw_init_listhead(&pcmd->list);
|
_rtw_init_listhead(&pcmd->list);
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("after enqueue set_auth_cmd, auth_mode =%x\n", psecuritypriv->dot11AuthAlgrthm));
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("after enqueue set_auth_cmd, auth_mode =%x\n", psecuritypriv->dot11AuthAlgrthm));
|
||||||
|
@ -2407,7 +2364,6 @@ exit:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sint rtw_set_key(struct adapter * adapter, struct security_priv *psecuritypriv, sint keyid, u8 set_tx, bool enqueue)
|
sint rtw_set_key(struct adapter * adapter, struct security_priv *psecuritypriv, sint keyid, u8 set_tx, bool enqueue)
|
||||||
{
|
{
|
||||||
u8 keylen;
|
u8 keylen;
|
||||||
|
@ -2470,7 +2426,6 @@ sint rtw_set_key(struct adapter * adapter, struct security_priv *psecuritypriv,
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (enqueue) {
|
if (enqueue) {
|
||||||
pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||||
if (pcmd == NULL) {
|
if (pcmd == NULL) {
|
||||||
|
@ -2501,7 +2456,6 @@ exit:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* adjust IEs for rtw_joinbss_cmd in WMM */
|
/* adjust IEs for rtw_joinbss_cmd in WMM */
|
||||||
int rtw_restruct_wmm_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_len, uint initial_out_len)
|
int rtw_restruct_wmm_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_len, uint initial_out_len)
|
||||||
{
|
{
|
||||||
|
@ -2535,7 +2489,6 @@ int rtw_restruct_wmm_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
/* Ported from 8185: IsInPreAuthKeyList(). (Renamed from SecIsInPreAuthKeyList(), 2006-10-13.) */
|
/* Ported from 8185: IsInPreAuthKeyList(). (Renamed from SecIsInPreAuthKeyList(), 2006-10-13.) */
|
||||||
/* Added by Annie, 2006-05-07. */
|
/* Added by Annie, 2006-05-07. */
|
||||||
|
@ -2698,7 +2651,6 @@ void rtw_init_registrypriv_dev_network( struct adapter* adapter)
|
||||||
pdev_network->Configuration.FHConfig.HopSet = 0;
|
pdev_network->Configuration.FHConfig.HopSet = 0;
|
||||||
pdev_network->Configuration.FHConfig.DwellTime = 0;
|
pdev_network->Configuration.FHConfig.DwellTime = 0;
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2810,7 +2762,6 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_
|
||||||
struct qos_priv *pqospriv = &pmlmepriv->qospriv;
|
struct qos_priv *pqospriv = &pmlmepriv->qospriv;
|
||||||
struct ht_priv *phtpriv = &pmlmepriv->htpriv;
|
struct ht_priv *phtpriv = &pmlmepriv->htpriv;
|
||||||
|
|
||||||
|
|
||||||
phtpriv->ht_option = false;
|
phtpriv->ht_option = false;
|
||||||
|
|
||||||
p = rtw_get_ie(in_ie+12, _HT_CAPABILITY_IE_, &ielen, in_len-12);
|
p = rtw_get_ie(in_ie+12, _HT_CAPABILITY_IE_, &ielen, in_len-12);
|
||||||
|
@ -2834,7 +2785,6 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_
|
||||||
IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_TX_STBC |
|
IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_TX_STBC |
|
||||||
IEEE80211_HT_CAP_DSSSCCK40);
|
IEEE80211_HT_CAP_DSSSCCK40);
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
u32 rx_packet_offset, max_recvbuf_sz;
|
u32 rx_packet_offset, max_recvbuf_sz;
|
||||||
rtw_hal_get_def_var(padapter, HAL_DEF_RX_PACKET_OFFSET, &rx_packet_offset);
|
rtw_hal_get_def_var(padapter, HAL_DEF_RX_PACKET_OFFSET, &rx_packet_offset);
|
||||||
|
@ -2849,7 +2799,6 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_
|
||||||
else
|
else
|
||||||
ht_capie.ampdu_params_info |= (IEEE80211_HT_CAP_AMPDU_DENSITY&0x00);
|
ht_capie.ampdu_params_info |= (IEEE80211_HT_CAP_AMPDU_DENSITY&0x00);
|
||||||
|
|
||||||
|
|
||||||
pframe = rtw_set_ie(out_ie+out_len, _HT_CAPABILITY_IE_,
|
pframe = rtw_set_ie(out_ie+out_len, _HT_CAPABILITY_IE_,
|
||||||
sizeof(struct ieee80211_ht_cap), (unsigned char*)&ht_capie, pout_len);
|
sizeof(struct ieee80211_ht_cap), (unsigned char*)&ht_capie, pout_len);
|
||||||
|
|
||||||
|
@ -2885,7 +2834,6 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len)
|
||||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||||
|
|
||||||
|
|
||||||
if (!phtpriv->ht_option)
|
if (!phtpriv->ht_option)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -2911,7 +2859,6 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len)
|
||||||
phtpriv->ampdu_enable = true;
|
phtpriv->ampdu_enable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* check Max Rx A-MPDU Size */
|
/* check Max Rx A-MPDU Size */
|
||||||
len = 0;
|
len = 0;
|
||||||
p = rtw_get_ie(pie+sizeof (struct ndis_802_11_fixed_ies), _HT_CAPABILITY_IE_, &len, ie_len-sizeof (struct ndis_802_11_fixed_ies));
|
p = rtw_get_ie(pie+sizeof (struct ndis_802_11_fixed_ies), _HT_CAPABILITY_IE_, &len, ie_len-sizeof (struct ndis_802_11_fixed_ies));
|
||||||
|
@ -2926,7 +2873,6 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
len =0;
|
len =0;
|
||||||
p = rtw_get_ie(pie+sizeof (struct ndis_802_11_fixed_ies), _HT_ADD_INFO_IE_, &len, ie_len-sizeof (struct ndis_802_11_fixed_ies));
|
p = rtw_get_ie(pie+sizeof (struct ndis_802_11_fixed_ies), _HT_ADD_INFO_IE_, &len, ie_len-sizeof (struct ndis_802_11_fixed_ies));
|
||||||
if (p && len>0)
|
if (p && len>0)
|
||||||
|
@ -2935,7 +2881,6 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len)
|
||||||
/* todo: */
|
/* todo: */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* update cur_bwmode & cur_ch_offset */
|
/* update cur_bwmode & cur_ch_offset */
|
||||||
if ((pregistrypriv->cbw40_enable) &&
|
if ((pregistrypriv->cbw40_enable) &&
|
||||||
(le16_to_cpu(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info) & BIT(1)) &&
|
(le16_to_cpu(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info) & BIT(1)) &&
|
||||||
|
@ -3020,7 +2965,6 @@ void rtw_issue_addbareq_cmd(struct adapter *padapter, struct xmit_frame *pxmitfr
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
phtpriv = &psta->htpriv;
|
phtpriv = &psta->htpriv;
|
||||||
|
|
||||||
if ((phtpriv->ht_option ==true) && (phtpriv->ampdu_enable ==true))
|
if ((phtpriv->ht_option ==true) && (phtpriv->ampdu_enable ==true))
|
||||||
|
|
|
@ -77,7 +77,6 @@ static struct action_handler OnAction_tbl[]={
|
||||||
{RTW_WLAN_CATEGORY_P2P, "ACTION_P2P", &OnAction_p2p},
|
{RTW_WLAN_CATEGORY_P2P, "ACTION_P2P", &OnAction_p2p},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static u8 null_addr[ETH_ALEN]= {0, 0, 0, 0, 0, 0};
|
static u8 null_addr[ETH_ALEN]= {0, 0, 0, 0, 0, 0};
|
||||||
|
|
||||||
/**************************************************
|
/**************************************************
|
||||||
|
@ -713,7 +712,6 @@ static u32 p2p_listen_state_process(struct adapter *padapter, unsigned char *da)
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|
||||||
Following are the callback functions for each subtype of the management frames
|
Following are the callback functions for each subtype of the management frames
|
||||||
|
@ -824,7 +822,6 @@ unsigned int OnProbeRsp(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_PROVISION_DIS_REQ))
|
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_PROVISION_DIS_REQ))
|
||||||
{
|
{
|
||||||
|
@ -878,7 +875,6 @@ unsigned int OnProbeRsp(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
|
|
||||||
|
|
||||||
if (pmlmeext->sitesurvey_res.state == SCAN_PROCESS)
|
if (pmlmeext->sitesurvey_res.state == SCAN_PROCESS)
|
||||||
{
|
{
|
||||||
report_survey_event(padapter, precv_frame);
|
report_survey_event(padapter, precv_frame);
|
||||||
|
@ -1196,7 +1192,6 @@ unsigned int OnAuth(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Now, we are going to issue_auth... */
|
/* Now, we are going to issue_auth... */
|
||||||
pstat->auth_seq = seq + 1;
|
pstat->auth_seq = seq + 1;
|
||||||
|
|
||||||
|
@ -1205,7 +1200,6 @@ unsigned int OnAuth(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
if (pstat->state & WIFI_FW_AUTH_SUCCESS)
|
if (pstat->state & WIFI_FW_AUTH_SUCCESS)
|
||||||
pstat->auth_seq = 0;
|
pstat->auth_seq = 0;
|
||||||
|
|
||||||
|
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
|
|
||||||
auth_fail:
|
auth_fail:
|
||||||
|
@ -1374,7 +1368,6 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
ie_offset = _REASOCREQ_IE_OFFSET_;
|
ie_offset = _REASOCREQ_IE_OFFSET_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (pkt_len < IEEE80211_3ADDR_LEN + ie_offset) {
|
if (pkt_len < IEEE80211_3ADDR_LEN + ie_offset) {
|
||||||
DBG_871X("handle_assoc(reassoc =%d) - too short payload (len =%lu)"
|
DBG_871X("handle_assoc(reassoc =%d) - too short payload (len =%lu)"
|
||||||
"\n", reassoc, (unsigned long)pkt_len);
|
"\n", reassoc, (unsigned long)pkt_len);
|
||||||
|
@ -1396,7 +1389,6 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
left = pkt_len - (IEEE80211_3ADDR_LEN + ie_offset);
|
left = pkt_len - (IEEE80211_3ADDR_LEN + ie_offset);
|
||||||
pos = pframe + (IEEE80211_3ADDR_LEN + ie_offset);
|
pos = pframe + (IEEE80211_3ADDR_LEN + ie_offset);
|
||||||
|
|
||||||
|
|
||||||
DBG_871X("%s\n", __FUNCTION__);
|
DBG_871X("%s\n", __FUNCTION__);
|
||||||
|
|
||||||
/* check if this stat has been successfully authenticated/assocated */
|
/* check if this stat has been successfully authenticated/assocated */
|
||||||
|
@ -1575,7 +1567,6 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
pstat->flags |= WLAN_STA_MAYBE_WPS;
|
pstat->flags |= WLAN_STA_MAYBE_WPS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* AP support WPA/RSN, and sta is going to do WPS, but AP is not ready */
|
/* AP support WPA/RSN, and sta is going to do WPS, but AP is not ready */
|
||||||
/* that the selected registrar of AP is _FLASE */
|
/* that the selected registrar of AP is _FLASE */
|
||||||
if ((psecuritypriv->wpa_psk >0)
|
if ((psecuritypriv->wpa_psk >0)
|
||||||
|
@ -1626,13 +1617,11 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
copy_len = ((wpa_ie_len+2) > sizeof(pstat->wpa_ie)) ? (sizeof(pstat->wpa_ie)):(wpa_ie_len+2);
|
copy_len = ((wpa_ie_len+2) > sizeof(pstat->wpa_ie)) ? (sizeof(pstat->wpa_ie)):(wpa_ie_len+2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (copy_len>0)
|
if (copy_len>0)
|
||||||
memcpy(pstat->wpa_ie, wpa_ie-2, copy_len);
|
memcpy(pstat->wpa_ie, wpa_ie-2, copy_len);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* check if there is WMM IE & support WWM-PS */
|
/* check if there is WMM IE & support WWM-PS */
|
||||||
pstat->flags &= ~WLAN_STA_WME;
|
pstat->flags &= ~WLAN_STA_WME;
|
||||||
pstat->qos_option = 0;
|
pstat->qos_option = 0;
|
||||||
|
@ -1710,14 +1699,12 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
} else
|
} else
|
||||||
pstat->flags &= ~WLAN_STA_HT;
|
pstat->flags &= ~WLAN_STA_HT;
|
||||||
|
|
||||||
|
|
||||||
if ((pmlmepriv->htpriv.ht_option == false) && (pstat->flags&WLAN_STA_HT))
|
if ((pmlmepriv->htpriv.ht_option == false) && (pstat->flags&WLAN_STA_HT))
|
||||||
{
|
{
|
||||||
status = _STATS_FAILURE_;
|
status = _STATS_FAILURE_;
|
||||||
goto OnAssocReqFail;
|
goto OnAssocReqFail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((pstat->flags & WLAN_STA_HT) &&
|
if ((pstat->flags & WLAN_STA_HT) &&
|
||||||
((pstat->wpa2_pairwise_cipher&WPA_CIPHER_TKIP) ||
|
((pstat->wpa2_pairwise_cipher&WPA_CIPHER_TKIP) ||
|
||||||
(pstat->wpa_pairwise_cipher&WPA_CIPHER_TKIP)))
|
(pstat->wpa_pairwise_cipher&WPA_CIPHER_TKIP)))
|
||||||
|
@ -1743,8 +1730,6 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
else
|
else
|
||||||
pstat->flags &= ~WLAN_STA_SHORT_PREAMBLE;
|
pstat->flags &= ~WLAN_STA_SHORT_PREAMBLE;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (status != _STATS_SUCCESSFUL_)
|
if (status != _STATS_SUCCESSFUL_)
|
||||||
goto OnAssocReqFail;
|
goto OnAssocReqFail;
|
||||||
|
|
||||||
|
@ -1787,8 +1772,6 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
/* identify if this is ralink sta */
|
/* identify if this is ralink sta */
|
||||||
/* Customer proprietary IE */
|
/* Customer proprietary IE */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* get a unique AID */
|
/* get a unique AID */
|
||||||
if (pstat->aid > 0) {
|
if (pstat->aid > 0) {
|
||||||
DBG_871X(" old AID %d\n", pstat->aid);
|
DBG_871X(" old AID %d\n", pstat->aid);
|
||||||
|
@ -1871,7 +1854,6 @@ asoc_class2_error:
|
||||||
|
|
||||||
OnAssocReqFail:
|
OnAssocReqFail:
|
||||||
|
|
||||||
|
|
||||||
pstat->aid = 0;
|
pstat->aid = 0;
|
||||||
if (frame_type == WIFI_ASSOCREQ)
|
if (frame_type == WIFI_ASSOCREQ)
|
||||||
issue_asocrsp(padapter, status, pstat, WIFI_ASSOCRSP);
|
issue_asocrsp(padapter, status, pstat, WIFI_ASSOCRSP);
|
||||||
|
@ -2047,7 +2029,6 @@ unsigned int OnDeAuth(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
associated_clients_update(padapter, updated);
|
associated_clients_update(padapter, updated);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2447,7 +2428,6 @@ void issue_p2p_GO_request(struct adapter *padapter, u8* raddr)
|
||||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||||
struct wifidirect_info *pwdinfo = &( padapter->wdinfo);
|
struct wifidirect_info *pwdinfo = &( padapter->wdinfo);
|
||||||
|
|
||||||
|
|
||||||
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -2484,8 +2464,6 @@ void issue_p2p_GO_request(struct adapter *padapter, u8* raddr)
|
||||||
pwdinfo->negotiation_dialog_token = 1; /* Initialize the dialog value */
|
pwdinfo->negotiation_dialog_token = 1; /* Initialize the dialog value */
|
||||||
pframe = rtw_set_fixed_ie(pframe, 1, &pwdinfo->negotiation_dialog_token, &(pattrib->pktlen));
|
pframe = rtw_set_fixed_ie(pframe, 1, &pwdinfo->negotiation_dialog_token, &(pattrib->pktlen));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* WPS Section */
|
/* WPS Section */
|
||||||
wpsielen = 0;
|
wpsielen = 0;
|
||||||
/* WPS OUI */
|
/* WPS OUI */
|
||||||
|
@ -2532,7 +2510,6 @@ void issue_p2p_GO_request(struct adapter *padapter, u8* raddr)
|
||||||
|
|
||||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen );
|
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen );
|
||||||
|
|
||||||
|
|
||||||
/* P2P IE Section. */
|
/* P2P IE Section. */
|
||||||
|
|
||||||
/* P2P OUI */
|
/* P2P OUI */
|
||||||
|
@ -2554,7 +2531,6 @@ void issue_p2p_GO_request(struct adapter *padapter, u8* raddr)
|
||||||
/* 8. P2P Device Info */
|
/* 8. P2P Device Info */
|
||||||
/* 9. Operating Channel */
|
/* 9. Operating Channel */
|
||||||
|
|
||||||
|
|
||||||
/* P2P Capability */
|
/* P2P Capability */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
p2pie[ p2pielen++ ] = P2P_ATTR_CAPABILITY;
|
p2pie[ p2pielen++ ] = P2P_ATTR_CAPABILITY;
|
||||||
|
@ -2577,7 +2553,6 @@ void issue_p2p_GO_request(struct adapter *padapter, u8* raddr)
|
||||||
p2pie[ p2pielen++ ] = P2P_GRPCAP_CROSS_CONN;
|
p2pie[ p2pielen++ ] = P2P_GRPCAP_CROSS_CONN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Group Owner Intent */
|
/* Group Owner Intent */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
p2pie[ p2pielen++ ] = P2P_ATTR_GO_INTENT;
|
p2pie[ p2pielen++ ] = P2P_ATTR_GO_INTENT;
|
||||||
|
@ -2602,7 +2577,6 @@ void issue_p2p_GO_request(struct adapter *padapter, u8* raddr)
|
||||||
p2pie[ p2pielen++ ] = 200; /* 2 seconds needed to be the P2P GO */
|
p2pie[ p2pielen++ ] = 200; /* 2 seconds needed to be the P2P GO */
|
||||||
p2pie[ p2pielen++ ] = 200; /* 2 seconds needed to be the P2P Client */
|
p2pie[ p2pielen++ ] = 200; /* 2 seconds needed to be the P2P Client */
|
||||||
|
|
||||||
|
|
||||||
/* Listen Channel */
|
/* Listen Channel */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
p2pie[ p2pielen++ ] = P2P_ATTR_LISTEN_CH;
|
p2pie[ p2pielen++ ] = P2P_ATTR_LISTEN_CH;
|
||||||
|
@ -2626,7 +2600,6 @@ void issue_p2p_GO_request(struct adapter *padapter, u8* raddr)
|
||||||
/* Channel Number */
|
/* Channel Number */
|
||||||
p2pie[ p2pielen++ ] = pwdinfo->listen_channel; /* listening channel number */
|
p2pie[ p2pielen++ ] = pwdinfo->listen_channel; /* listening channel number */
|
||||||
|
|
||||||
|
|
||||||
/* Extended Listen Timing ATTR */
|
/* Extended Listen Timing ATTR */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
p2pie[ p2pielen++ ] = P2P_ATTR_EX_LISTEN_TIMING;
|
p2pie[ p2pielen++ ] = P2P_ATTR_EX_LISTEN_TIMING;
|
||||||
|
@ -2644,7 +2617,6 @@ void issue_p2p_GO_request(struct adapter *padapter, u8* raddr)
|
||||||
*(__le16*) ( p2pie + p2pielen ) = cpu_to_le16( 0xFFFF );
|
*(__le16*) ( p2pie + p2pielen ) = cpu_to_le16( 0xFFFF );
|
||||||
p2pielen += 2;
|
p2pielen += 2;
|
||||||
|
|
||||||
|
|
||||||
/* Intended P2P Interface Address */
|
/* Intended P2P Interface Address */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
p2pie[ p2pielen++ ] = P2P_ATTR_INTENTED_IF_ADDR;
|
p2pie[ p2pielen++ ] = P2P_ATTR_INTENTED_IF_ADDR;
|
||||||
|
@ -2657,7 +2629,6 @@ void issue_p2p_GO_request(struct adapter *padapter, u8* raddr)
|
||||||
memcpy( p2pie + p2pielen, myid( &padapter->eeprompriv ), ETH_ALEN );
|
memcpy( p2pie + p2pielen, myid( &padapter->eeprompriv ), ETH_ALEN );
|
||||||
p2pielen += ETH_ALEN;
|
p2pielen += ETH_ALEN;
|
||||||
|
|
||||||
|
|
||||||
/* Channel List */
|
/* Channel List */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
p2pie[ p2pielen++ ] = P2P_ATTR_CH_LIST;
|
p2pie[ p2pielen++ ] = P2P_ATTR_CH_LIST;
|
||||||
|
@ -2752,7 +2723,6 @@ void issue_p2p_GO_request(struct adapter *padapter, u8* raddr)
|
||||||
memcpy( p2pie + p2pielen, pwdinfo->device_name , pwdinfo->device_name_len );
|
memcpy( p2pie + p2pielen, pwdinfo->device_name , pwdinfo->device_name_len );
|
||||||
p2pielen += pwdinfo->device_name_len;
|
p2pielen += pwdinfo->device_name_len;
|
||||||
|
|
||||||
|
|
||||||
/* Operating Channel */
|
/* Operating Channel */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
p2pie[ p2pielen++ ] = P2P_ATTR_OPERATING_CH;
|
p2pie[ p2pielen++ ] = P2P_ATTR_OPERATING_CH;
|
||||||
|
@ -2806,7 +2776,6 @@ void issue_p2p_GO_request(struct adapter *padapter, u8* raddr)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void issue_p2p_GO_response(struct adapter *padapter, u8* raddr, u8* frame_body, uint len, u8 result)
|
static void issue_p2p_GO_response(struct adapter *padapter, u8* raddr, u8* frame_body, uint len, u8 result)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -2945,7 +2914,6 @@ static void issue_p2p_GO_response(struct adapter *padapter, u8* raddr, u8* frame
|
||||||
|
|
||||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen );
|
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen );
|
||||||
|
|
||||||
|
|
||||||
/* P2P IE Section. */
|
/* P2P IE Section. */
|
||||||
|
|
||||||
/* P2P OUI */
|
/* P2P OUI */
|
||||||
|
@ -2967,7 +2935,6 @@ static void issue_p2p_GO_response(struct adapter *padapter, u8* raddr, u8* frame
|
||||||
/* 8. Device Info */
|
/* 8. Device Info */
|
||||||
/* 9. Group ID ( Only GO ) */
|
/* 9. Group ID ( Only GO ) */
|
||||||
|
|
||||||
|
|
||||||
/* ToDo: */
|
/* ToDo: */
|
||||||
|
|
||||||
/* P2P Status */
|
/* P2P Status */
|
||||||
|
@ -3035,7 +3002,6 @@ static void issue_p2p_GO_response(struct adapter *padapter, u8* raddr, u8* frame
|
||||||
p2pie[ p2pielen++ ] = ( ( pwdinfo->intent << 1 ) | BIT(0) );
|
p2pie[ p2pielen++ ] = ( ( pwdinfo->intent << 1 ) | BIT(0) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Configuration Timeout */
|
/* Configuration Timeout */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
p2pie[ p2pielen++ ] = P2P_ATTR_CONF_TIMEOUT;
|
p2pie[ p2pielen++ ] = P2P_ATTR_CONF_TIMEOUT;
|
||||||
|
@ -3284,8 +3250,6 @@ static void issue_p2p_GO_confirm(struct adapter *padapter, u8* raddr, u8 result)
|
||||||
pframe = rtw_set_fixed_ie(pframe, 1, &(oui_subtype), &(pattrib->pktlen));
|
pframe = rtw_set_fixed_ie(pframe, 1, &(oui_subtype), &(pattrib->pktlen));
|
||||||
pframe = rtw_set_fixed_ie(pframe, 1, &(pwdinfo->negotiation_dialog_token), &(pattrib->pktlen));
|
pframe = rtw_set_fixed_ie(pframe, 1, &(pwdinfo->negotiation_dialog_token), &(pattrib->pktlen));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* P2P IE Section. */
|
/* P2P IE Section. */
|
||||||
|
|
||||||
/* P2P OUI */
|
/* P2P OUI */
|
||||||
|
@ -3336,7 +3300,6 @@ static void issue_p2p_GO_confirm(struct adapter *padapter, u8* raddr, u8 result)
|
||||||
p2pie[ p2pielen++ ] = P2P_GRPCAP_CROSS_CONN;
|
p2pie[ p2pielen++ ] = P2P_GRPCAP_CROSS_CONN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Operating Channel */
|
/* Operating Channel */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
p2pie[ p2pielen++ ] = P2P_ATTR_OPERATING_CH;
|
p2pie[ p2pielen++ ] = P2P_ATTR_OPERATING_CH;
|
||||||
|
@ -3354,7 +3317,6 @@ static void issue_p2p_GO_confirm(struct adapter *padapter, u8* raddr, u8 result)
|
||||||
/* Described in the "Operating Channel Attribute" section. */
|
/* Described in the "Operating Channel Attribute" section. */
|
||||||
p2pie[ p2pielen++ ] = 0x04;
|
p2pie[ p2pielen++ ] = 0x04;
|
||||||
|
|
||||||
|
|
||||||
if ( rtw_p2p_chk_role(pwdinfo, P2P_ROLE_CLIENT) )
|
if ( rtw_p2p_chk_role(pwdinfo, P2P_ROLE_CLIENT) )
|
||||||
{
|
{
|
||||||
if ( pwdinfo->peer_operating_ch <= 14 )
|
if ( pwdinfo->peer_operating_ch <= 14 )
|
||||||
|
@ -3397,7 +3359,6 @@ static void issue_p2p_GO_confirm(struct adapter *padapter, u8* raddr, u8 result)
|
||||||
p2pie[ p2pielen++ ] = pwdinfo->operating_channel; /* Use the listen channel as the operating channel */
|
p2pie[ p2pielen++ ] = pwdinfo->operating_channel; /* Use the listen channel as the operating channel */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Channel List */
|
/* Channel List */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
p2pie[ p2pielen++ ] = P2P_ATTR_CH_LIST;
|
p2pie[ p2pielen++ ] = P2P_ATTR_CH_LIST;
|
||||||
|
@ -3518,7 +3479,6 @@ void issue_p2p_invitation_request(struct adapter *padapter, u8* raddr )
|
||||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||||
struct wifidirect_info *pwdinfo = &( padapter->wdinfo);
|
struct wifidirect_info *pwdinfo = &( padapter->wdinfo);
|
||||||
|
|
||||||
|
|
||||||
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -3593,7 +3553,6 @@ void issue_p2p_invitation_request(struct adapter *padapter, u8* raddr )
|
||||||
/* Value: */
|
/* Value: */
|
||||||
p2pie[ p2pielen++ ] = P2P_INVITATION_FLAGS_PERSISTENT;
|
p2pie[ p2pielen++ ] = P2P_INVITATION_FLAGS_PERSISTENT;
|
||||||
|
|
||||||
|
|
||||||
/* Operating Channel */
|
/* Operating Channel */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
p2pie[ p2pielen++ ] = P2P_ATTR_OPERATING_CH;
|
p2pie[ p2pielen++ ] = P2P_ATTR_OPERATING_CH;
|
||||||
|
@ -3642,7 +3601,6 @@ void issue_p2p_invitation_request(struct adapter *padapter, u8* raddr )
|
||||||
/* Type: */
|
/* Type: */
|
||||||
p2pie[ p2pielen++ ] = P2P_ATTR_CH_LIST;
|
p2pie[ p2pielen++ ] = P2P_ATTR_CH_LIST;
|
||||||
|
|
||||||
|
|
||||||
/* Length: */
|
/* Length: */
|
||||||
/* Country String(3) */
|
/* Country String(3) */
|
||||||
/* + ( Operating Class (1) + Number of Channels(1) ) * Operation Classes (?) */
|
/* + ( Operating Class (1) + Number of Channels(1) ) * Operation Classes (?) */
|
||||||
|
@ -3697,7 +3655,6 @@ void issue_p2p_invitation_request(struct adapter *padapter, u8* raddr )
|
||||||
memcpy( p2pie + p2pielen, pwdinfo->invitereq_info.go_ssid, pwdinfo->invitereq_info.ssidlen );
|
memcpy( p2pie + p2pielen, pwdinfo->invitereq_info.go_ssid, pwdinfo->invitereq_info.ssidlen );
|
||||||
p2pielen += pwdinfo->invitereq_info.ssidlen;
|
p2pielen += pwdinfo->invitereq_info.ssidlen;
|
||||||
|
|
||||||
|
|
||||||
/* Device Info */
|
/* Device Info */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
p2pie[ p2pielen++ ] = P2P_ATTR_DEVICE_INFO;
|
p2pie[ p2pielen++ ] = P2P_ATTR_DEVICE_INFO;
|
||||||
|
@ -3788,7 +3745,6 @@ void issue_p2p_invitation_response(struct adapter *padapter, u8* raddr, u8 dialo
|
||||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||||
struct wifidirect_info *pwdinfo = &( padapter->wdinfo);
|
struct wifidirect_info *pwdinfo = &( padapter->wdinfo);
|
||||||
|
|
||||||
|
|
||||||
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -3901,7 +3857,6 @@ void issue_p2p_invitation_response(struct adapter *padapter, u8* raddr, u8 dialo
|
||||||
/* Channel Number */
|
/* Channel Number */
|
||||||
p2pie[ p2pielen++ ] = pwdinfo->operating_channel; /* operating channel number */
|
p2pie[ p2pielen++ ] = pwdinfo->operating_channel; /* operating channel number */
|
||||||
|
|
||||||
|
|
||||||
/* P2P Group BSSID */
|
/* P2P Group BSSID */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
p2pie[ p2pielen++ ] = P2P_ATTR_GROUP_BSSID;
|
p2pie[ p2pielen++ ] = P2P_ATTR_GROUP_BSSID;
|
||||||
|
@ -3999,7 +3954,6 @@ void issue_p2p_provision_request(struct adapter *padapter, u8* pssid, u8 ussidle
|
||||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||||
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
||||||
|
|
||||||
|
|
||||||
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -4072,7 +4026,6 @@ void issue_p2p_provision_request(struct adapter *padapter, u8* pssid, u8 ussidle
|
||||||
|
|
||||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen );
|
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen );
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
wfdielen = build_provdisc_req_wfd_ie(pwdinfo, pframe);
|
wfdielen = build_provdisc_req_wfd_ie(pwdinfo, pframe);
|
||||||
pframe += wfdielen;
|
pframe += wfdielen;
|
||||||
|
@ -4087,7 +4040,6 @@ void issue_p2p_provision_request(struct adapter *padapter, u8* pssid, u8 ussidle
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static u8 is_matched_in_profilelist( u8* peermacaddr, struct profile_info* profileinfo )
|
static u8 is_matched_in_profilelist( u8* peermacaddr, struct profile_info* profileinfo )
|
||||||
{
|
{
|
||||||
u8 i, match_result = 0;
|
u8 i, match_result = 0;
|
||||||
|
@ -4180,7 +4132,6 @@ void issue_probersp_p2p(struct adapter *padapter, unsigned char *da)
|
||||||
pframe += 2;
|
pframe += 2;
|
||||||
pattrib->pktlen += 2;
|
pattrib->pktlen += 2;
|
||||||
|
|
||||||
|
|
||||||
/* SSID */
|
/* SSID */
|
||||||
pframe = rtw_set_ie(pframe, _SSID_IE_, 7, pwdinfo->p2p_wildcard_ssid, &pattrib->pktlen);
|
pframe = rtw_set_ie(pframe, _SSID_IE_, 7, pwdinfo->p2p_wildcard_ssid, &pattrib->pktlen);
|
||||||
|
|
||||||
|
@ -4372,10 +4323,8 @@ void issue_probersp_p2p(struct adapter *padapter, unsigned char *da)
|
||||||
*(__be16*) ( wpsie + wpsielen ) = cpu_to_be16( pwdinfo->supported_wps_cm );
|
*(__be16*) ( wpsie + wpsielen ) = cpu_to_be16( pwdinfo->supported_wps_cm );
|
||||||
wpsielen += 2;
|
wpsielen += 2;
|
||||||
|
|
||||||
|
|
||||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen );
|
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen );
|
||||||
|
|
||||||
|
|
||||||
p2pielen = build_probe_resp_p2p_ie(pwdinfo, pframe);
|
p2pielen = build_probe_resp_p2p_ie(pwdinfo, pframe);
|
||||||
pframe += p2pielen;
|
pframe += p2pielen;
|
||||||
pattrib->pktlen += p2pielen;
|
pattrib->pktlen += p2pielen;
|
||||||
|
@ -4398,7 +4347,6 @@ void issue_probersp_p2p(struct adapter *padapter, unsigned char *da)
|
||||||
|
|
||||||
pattrib->last_txcmdsz = pattrib->pktlen;
|
pattrib->last_txcmdsz = pattrib->pktlen;
|
||||||
|
|
||||||
|
|
||||||
dump_mgntframe(padapter, pmgntframe);
|
dump_mgntframe(padapter, pmgntframe);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -4429,7 +4377,6 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack)
|
||||||
|
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
|
|
||||||
|
|
||||||
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
||||||
{
|
{
|
||||||
goto exit;
|
goto exit;
|
||||||
|
@ -4439,7 +4386,6 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack)
|
||||||
pattrib = &pmgntframe->attrib;
|
pattrib = &pmgntframe->attrib;
|
||||||
update_mgntframe_attrib(padapter, pattrib);
|
update_mgntframe_attrib(padapter, pattrib);
|
||||||
|
|
||||||
|
|
||||||
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||||
|
|
||||||
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
|
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
|
||||||
|
@ -4664,7 +4610,6 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack)
|
||||||
/* Channel Number */
|
/* Channel Number */
|
||||||
p2pie[ p2pielen++ ] = pwdinfo->listen_channel; /* listen channel */
|
p2pie[ p2pielen++ ] = pwdinfo->listen_channel; /* listen channel */
|
||||||
|
|
||||||
|
|
||||||
/* Extended Listen Timing */
|
/* Extended Listen Timing */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
p2pie[ p2pielen++ ] = P2P_ATTR_EX_LISTEN_TIMING;
|
p2pie[ p2pielen++ ] = P2P_ATTR_EX_LISTEN_TIMING;
|
||||||
|
@ -4984,7 +4929,6 @@ static unsigned int on_action_public_p2p(union recv_frame *precv_frame)
|
||||||
struct group_id_info group_id;
|
struct group_id_info group_id;
|
||||||
u8 invitation_flag = 0;
|
u8 invitation_flag = 0;
|
||||||
|
|
||||||
|
|
||||||
merged_p2p_ielen = rtw_get_p2p_merged_ies_len(frame_body + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_);
|
merged_p2p_ielen = rtw_get_p2p_merged_ies_len(frame_body + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_);
|
||||||
|
|
||||||
merged_p2pie = rtw_zmalloc(merged_p2p_ielen + 2); /* 2 is for EID and Length */
|
merged_p2pie = rtw_zmalloc(merged_p2p_ielen + 2); /* 2 is for EID and Length */
|
||||||
|
@ -5367,7 +5311,6 @@ unsigned int OnAction_p2p(struct adapter *padapter, union recv_frame *precv_fram
|
||||||
uint len = precv_frame->u.hdr.len;
|
uint len = precv_frame->u.hdr.len;
|
||||||
struct wifidirect_info *pwdinfo = &( padapter->wdinfo );
|
struct wifidirect_info *pwdinfo = &( padapter->wdinfo );
|
||||||
|
|
||||||
|
|
||||||
DBG_871X("%s\n", __FUNCTION__);
|
DBG_871X("%s\n", __FUNCTION__);
|
||||||
|
|
||||||
/* check RA matches or not */
|
/* check RA matches or not */
|
||||||
|
@ -5497,7 +5440,6 @@ inline struct xmit_frame *alloc_mgtxmitframe_once(struct xmit_priv *pxmitpriv)
|
||||||
return _alloc_mgtxmitframe(pxmitpriv, true);
|
return _alloc_mgtxmitframe(pxmitpriv, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|
||||||
Following are some TX fuctions for WiFi MLME
|
Following are some TX fuctions for WiFi MLME
|
||||||
|
@ -5675,7 +5617,6 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
|
||||||
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
|
|
||||||
|
|
||||||
/* DBG_871X("%s\n", __FUNCTION__); */
|
/* DBG_871X("%s\n", __FUNCTION__); */
|
||||||
|
|
||||||
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
||||||
|
@ -5697,7 +5638,6 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
|
||||||
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
|
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
|
||||||
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
|
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
|
||||||
|
|
||||||
|
|
||||||
fctrl = &(pwlanhdr->frame_ctl);
|
fctrl = &(pwlanhdr->frame_ctl);
|
||||||
*(fctrl) = 0;
|
*(fctrl) = 0;
|
||||||
|
|
||||||
|
@ -5784,7 +5724,6 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
|
||||||
*(__be16*) ( pframe + insert_len ) = cpu_to_be16( WPS_PDT_SCID_MEDIA_SERVER );
|
*(__be16*) ( pframe + insert_len ) = cpu_to_be16( WPS_PDT_SCID_MEDIA_SERVER );
|
||||||
insert_len += 2;
|
insert_len += 2;
|
||||||
|
|
||||||
|
|
||||||
/* Device Name */
|
/* Device Name */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
*(__be16*) ( pframe + insert_len ) = cpu_to_be16( WPS_ATTR_DEVICE_NAME );
|
*(__be16*) ( pframe + insert_len ) = cpu_to_be16( WPS_ATTR_DEVICE_NAME );
|
||||||
|
@ -5798,7 +5737,6 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
|
||||||
memcpy( pframe + insert_len, pwdinfo->device_name, pwdinfo->device_name_len );
|
memcpy( pframe + insert_len, pwdinfo->device_name, pwdinfo->device_name_len );
|
||||||
insert_len += pwdinfo->device_name_len;
|
insert_len += pwdinfo->device_name_len;
|
||||||
|
|
||||||
|
|
||||||
/* update wsc ie length */
|
/* update wsc ie length */
|
||||||
*(pframe_wscie+1) = (wpsielen -2) + insert_len;
|
*(pframe_wscie+1) = (wpsielen -2) + insert_len;
|
||||||
|
|
||||||
|
@ -5920,14 +5858,12 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
|
||||||
pframe = rtw_set_ie(pframe, _ERPINFO_IE_, 1, &erpinfo, &pattrib->pktlen);
|
pframe = rtw_set_ie(pframe, _ERPINFO_IE_, 1, &erpinfo, &pattrib->pktlen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* EXTERNDED SUPPORTED RATE */
|
/* EXTERNDED SUPPORTED RATE */
|
||||||
if (rate_len > 8)
|
if (rate_len > 8)
|
||||||
{
|
{
|
||||||
pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (rate_len - 8), (cur_network->SupportedRates + 8), &pattrib->pktlen);
|
pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (rate_len - 8), (cur_network->SupportedRates + 8), &pattrib->pktlen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* todo:HT for adhoc */
|
/* todo:HT for adhoc */
|
||||||
|
|
||||||
_issue_bcn:
|
_issue_bcn:
|
||||||
|
@ -5987,7 +5923,6 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* update attribute */
|
/* update attribute */
|
||||||
pattrib = &pmgntframe->attrib;
|
pattrib = &pmgntframe->attrib;
|
||||||
update_mgntframe_attrib(padapter, pattrib);
|
update_mgntframe_attrib(padapter, pattrib);
|
||||||
|
@ -6014,7 +5949,6 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
|
||||||
pattrib->pktlen = pattrib->hdrlen;
|
pattrib->pktlen = pattrib->hdrlen;
|
||||||
pframe += pattrib->hdrlen;
|
pframe += pattrib->hdrlen;
|
||||||
|
|
||||||
|
|
||||||
if (cur_network->IELength>MAX_IE_SZ)
|
if (cur_network->IELength>MAX_IE_SZ)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -6142,14 +6076,12 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
|
||||||
pframe = rtw_set_ie(pframe, _ERPINFO_IE_, 1, &erpinfo, &pattrib->pktlen);
|
pframe = rtw_set_ie(pframe, _ERPINFO_IE_, 1, &erpinfo, &pattrib->pktlen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* EXTERNDED SUPPORTED RATE */
|
/* EXTERNDED SUPPORTED RATE */
|
||||||
if (rate_len > 8)
|
if (rate_len > 8)
|
||||||
{
|
{
|
||||||
pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (rate_len - 8), (cur_network->SupportedRates + 8), &pattrib->pktlen);
|
pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (rate_len - 8), (cur_network->SupportedRates + 8), &pattrib->pktlen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* todo:HT for adhoc */
|
/* todo:HT for adhoc */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6192,10 +6124,8 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
|
|
||||||
|
|
||||||
pattrib->last_txcmdsz = pattrib->pktlen;
|
pattrib->last_txcmdsz = pattrib->pktlen;
|
||||||
|
|
||||||
|
|
||||||
dump_mgntframe(padapter, pmgntframe);
|
dump_mgntframe(padapter, pmgntframe);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -6230,7 +6160,6 @@ static int _issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *ps
|
||||||
pattrib = &pmgntframe->attrib;
|
pattrib = &pmgntframe->attrib;
|
||||||
update_mgntframe_attrib(padapter, pattrib);
|
update_mgntframe_attrib(padapter, pattrib);
|
||||||
|
|
||||||
|
|
||||||
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||||
|
|
||||||
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
|
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
|
||||||
|
@ -6389,13 +6318,11 @@ void issue_auth(struct adapter *padapter, struct sta_info *psta, unsigned short
|
||||||
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
|
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||||
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||||
|
|
||||||
|
|
||||||
if (psta) { /* for AP mode */
|
if (psta) { /* for AP mode */
|
||||||
memcpy(pwlanhdr->addr1, psta->hwaddr, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, psta->hwaddr, ETH_ALEN);
|
||||||
memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN);
|
memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN);
|
||||||
memcpy(pwlanhdr->addr3, myid(&(padapter->eeprompriv)), ETH_ALEN);
|
memcpy(pwlanhdr->addr3, myid(&(padapter->eeprompriv)), ETH_ALEN);
|
||||||
|
|
||||||
|
|
||||||
/* setting auth algo number */
|
/* setting auth algo number */
|
||||||
val16 = (u16)psta->authalg;
|
val16 = (u16)psta->authalg;
|
||||||
|
|
||||||
|
@ -6479,7 +6406,6 @@ void issue_auth(struct adapter *padapter, struct sta_info *psta, unsigned short
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_info *pstat, int pkt_type)
|
void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_info *pstat, int pkt_type)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
|
@ -6514,7 +6440,6 @@ void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_i
|
||||||
pattrib = &pmgntframe->attrib;
|
pattrib = &pmgntframe->attrib;
|
||||||
update_mgntframe_attrib(padapter, pattrib);
|
update_mgntframe_attrib(padapter, pattrib);
|
||||||
|
|
||||||
|
|
||||||
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||||
|
|
||||||
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
|
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
|
||||||
|
@ -6527,7 +6452,6 @@ void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_i
|
||||||
memcpy((void *)GetAddr2Ptr(pwlanhdr), myid(&(padapter->eeprompriv)), ETH_ALEN);
|
memcpy((void *)GetAddr2Ptr(pwlanhdr), myid(&(padapter->eeprompriv)), ETH_ALEN);
|
||||||
memcpy((void *)GetAddr3Ptr(pwlanhdr), get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN);
|
memcpy((void *)GetAddr3Ptr(pwlanhdr), get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN);
|
||||||
|
|
||||||
|
|
||||||
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
||||||
pmlmeext->mgnt_seq++;
|
pmlmeext->mgnt_seq++;
|
||||||
if ((pkt_type == WIFI_ASSOCRSP) || (pkt_type == WIFI_REASSOCRSP))
|
if ((pkt_type == WIFI_ASSOCRSP) || (pkt_type == WIFI_REASSOCRSP))
|
||||||
|
@ -6679,7 +6603,6 @@ void issue_assocreq(struct adapter *padapter)
|
||||||
pattrib = &pmgntframe->attrib;
|
pattrib = &pmgntframe->attrib;
|
||||||
update_mgntframe_attrib(padapter, pattrib);
|
update_mgntframe_attrib(padapter, pattrib);
|
||||||
|
|
||||||
|
|
||||||
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||||
|
|
||||||
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
|
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
|
||||||
|
@ -6731,7 +6654,6 @@ void issue_assocreq(struct adapter *padapter)
|
||||||
sta_bssrate_len = 4;
|
sta_bssrate_len = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* for (i = 0; i < sta_bssrate_len; i++) { */
|
/* for (i = 0; i < sta_bssrate_len; i++) { */
|
||||||
/* DBG_871X("sta_bssrate[%d]=%02X\n", i, sta_bssrate[i]); */
|
/* DBG_871X("sta_bssrate[%d]=%02X\n", i, sta_bssrate[i]); */
|
||||||
/* */
|
/* */
|
||||||
|
@ -6741,11 +6663,9 @@ void issue_assocreq(struct adapter *padapter)
|
||||||
DBG_871X("network.SupportedRates[%d]=%02X\n", i, pmlmeinfo->network.SupportedRates[i]);
|
DBG_871X("network.SupportedRates[%d]=%02X\n", i, pmlmeinfo->network.SupportedRates[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (i = 0; i < NDIS_802_11_LENGTH_RATES_EX; i++) {
|
for (i = 0; i < NDIS_802_11_LENGTH_RATES_EX; i++) {
|
||||||
if (pmlmeinfo->network.SupportedRates[i] == 0) break;
|
if (pmlmeinfo->network.SupportedRates[i] == 0) break;
|
||||||
|
|
||||||
|
|
||||||
/* Check if the AP's supported rates are also supported by STA. */
|
/* Check if the AP's supported rates are also supported by STA. */
|
||||||
for (j =0; j < sta_bssrate_len; j++) {
|
for (j =0; j < sta_bssrate_len; j++) {
|
||||||
/* Avoid the proprietary data rate (22Mbps) of Handlink WSG-4000 AP */
|
/* Avoid the proprietary data rate (22Mbps) of Handlink WSG-4000 AP */
|
||||||
|
@ -6776,7 +6696,6 @@ void issue_assocreq(struct adapter *padapter)
|
||||||
goto exit; /* don't connect to AP if no joint supported rate */
|
goto exit; /* don't connect to AP if no joint supported rate */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (bssrate_len > 8) {
|
if (bssrate_len > 8) {
|
||||||
pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_ , 8, bssrate, &(pattrib->pktlen));
|
pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_ , 8, bssrate, &(pattrib->pktlen));
|
||||||
pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_ , (bssrate_len - 8), (bssrate + 8), &(pattrib->pktlen));
|
pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_ , (bssrate_len - 8), (bssrate + 8), &(pattrib->pktlen));
|
||||||
|
@ -7137,7 +7056,6 @@ exit:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* when wait_ms >0 , this function shoule be called at process context */
|
/* when wait_ms >0 , this function shoule be called at process context */
|
||||||
/* da == NULL for station mode */
|
/* da == NULL for station mode */
|
||||||
int issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned int power_mode, int try_cnt, int wait_ms)
|
int issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned int power_mode, int try_cnt, int wait_ms)
|
||||||
|
@ -7382,7 +7300,6 @@ static int _issue_deauth(struct adapter *padapter, unsigned char *da, unsigned s
|
||||||
|
|
||||||
pattrib->last_txcmdsz = pattrib->pktlen;
|
pattrib->last_txcmdsz = pattrib->pktlen;
|
||||||
|
|
||||||
|
|
||||||
if (wait_ack)
|
if (wait_ack)
|
||||||
{
|
{
|
||||||
ret = dump_mgntframe_and_wait_ack(padapter, pmgntframe);
|
ret = dump_mgntframe_and_wait_ack(padapter, pmgntframe);
|
||||||
|
@ -7459,7 +7376,6 @@ void issue_action_spct_ch_switch (struct adapter *padapter, u8 *ra, u8 new_ch, u
|
||||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||||
|
|
||||||
|
|
||||||
DBG_871X(FUNC_NDEV_FMT" ra ="MAC_FMT", ch:%u, offset:%u\n",
|
DBG_871X(FUNC_NDEV_FMT" ra ="MAC_FMT", ch:%u, offset:%u\n",
|
||||||
FUNC_NDEV_ARG(padapter->pnetdev), MAC_ARG(ra), new_ch, ch_offset);
|
FUNC_NDEV_ARG(padapter->pnetdev), MAC_ARG(ra), new_ch, ch_offset);
|
||||||
|
|
||||||
|
@ -7526,7 +7442,6 @@ void issue_action_SA_Query(struct adapter *padapter, unsigned char *raddr, unsig
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||||
|
|
||||||
|
|
||||||
DBG_871X("%s\n", __FUNCTION__);
|
DBG_871X("%s\n", __FUNCTION__);
|
||||||
|
|
||||||
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
||||||
|
@ -7772,10 +7687,8 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
|
||||||
if (true == pmlmeinfo->bwmode_updated)
|
if (true == pmlmeinfo->bwmode_updated)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
DBG_871X("%s\n", __FUNCTION__);
|
DBG_871X("%s\n", __FUNCTION__);
|
||||||
|
|
||||||
|
|
||||||
category = RTW_WLAN_CATEGORY_PUBLIC;
|
category = RTW_WLAN_CATEGORY_PUBLIC;
|
||||||
action = ACT_PUBLIC_BSSCOEXIST;
|
action = ACT_PUBLIC_BSSCOEXIST;
|
||||||
|
|
||||||
|
@ -7810,7 +7723,6 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
|
||||||
pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen));
|
pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen));
|
||||||
pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen));
|
pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen));
|
||||||
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
if (pmlmepriv->num_FortyMHzIntolerant>0)
|
if (pmlmepriv->num_FortyMHzIntolerant>0)
|
||||||
{
|
{
|
||||||
|
@ -7822,7 +7734,6 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
memset(ICS, 0, sizeof(ICS));
|
memset(ICS, 0, sizeof(ICS));
|
||||||
if (pmlmepriv->num_sta_no_ht>0)
|
if (pmlmepriv->num_sta_no_ht>0)
|
||||||
|
@ -7974,7 +7885,6 @@ unsigned int send_beacon(struct adapter *padapter)
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (false == bxmitok)
|
if (false == bxmitok)
|
||||||
{
|
{
|
||||||
DBG_871X("%s fail! %u ms\n", __FUNCTION__, rtw_get_passing_time_ms(start));
|
DBG_871X("%s fail! %u ms\n", __FUNCTION__, rtw_get_passing_time_ms(start));
|
||||||
|
@ -8637,7 +8547,6 @@ void start_clnt_auth(struct adapter* padapter)
|
||||||
pmlmeinfo->link_count = 0;
|
pmlmeinfo->link_count = 0;
|
||||||
pmlmeext->retry = 0;
|
pmlmeext->retry = 0;
|
||||||
|
|
||||||
|
|
||||||
DBG_871X_LEVEL(_drv_always_, "start auth\n");
|
DBG_871X_LEVEL(_drv_always_, "start auth\n");
|
||||||
issue_auth(padapter, NULL, 0);
|
issue_auth(padapter, NULL, 0);
|
||||||
|
|
||||||
|
@ -8645,7 +8554,6 @@ void start_clnt_auth(struct adapter* padapter)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void start_clnt_assoc(struct adapter* padapter)
|
void start_clnt_assoc(struct adapter* padapter)
|
||||||
{
|
{
|
||||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||||
|
@ -8699,7 +8607,6 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid
|
||||||
u8 channel;
|
u8 channel;
|
||||||
u8 i;
|
u8 i;
|
||||||
|
|
||||||
|
|
||||||
pregistrypriv = &padapter->registrypriv;
|
pregistrypriv = &padapter->registrypriv;
|
||||||
pmlmeext = &padapter->mlmeextpriv;
|
pmlmeext = &padapter->mlmeextpriv;
|
||||||
|
|
||||||
|
@ -8948,7 +8855,6 @@ void report_survey_event(struct adapter *padapter, union recv_frame *precv_frame
|
||||||
pmlmeext = &padapter->mlmeextpriv;
|
pmlmeext = &padapter->mlmeextpriv;
|
||||||
pcmdpriv = &padapter->cmdpriv;
|
pcmdpriv = &padapter->cmdpriv;
|
||||||
|
|
||||||
|
|
||||||
if ((pcmd_obj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj))) == NULL)
|
if ((pcmd_obj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj))) == NULL)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -9086,10 +8992,8 @@ void report_join_res(struct adapter *padapter, int res)
|
||||||
|
|
||||||
DBG_871X("report_join_res(%d)\n", res);
|
DBG_871X("report_join_res(%d)\n", res);
|
||||||
|
|
||||||
|
|
||||||
rtw_joinbss_event_prehandle(padapter, (u8 *)&pjoinbss_evt->network);
|
rtw_joinbss_event_prehandle(padapter, (u8 *)&pjoinbss_evt->network);
|
||||||
|
|
||||||
|
|
||||||
rtw_enqueue_cmd(pcmdpriv, pcmd_obj);
|
rtw_enqueue_cmd(pcmdpriv, pcmd_obj);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -9138,7 +9042,6 @@ void report_del_sta_event(struct adapter *padapter, unsigned char* MacAddr, unsi
|
||||||
memcpy((unsigned char *)(&(pdel_sta_evt->macaddr)), MacAddr, ETH_ALEN);
|
memcpy((unsigned char *)(&(pdel_sta_evt->macaddr)), MacAddr, ETH_ALEN);
|
||||||
memcpy((unsigned char *)(pdel_sta_evt->rsvd), (unsigned char *)(&reason), 2);
|
memcpy((unsigned char *)(pdel_sta_evt->rsvd), (unsigned char *)(&reason), 2);
|
||||||
|
|
||||||
|
|
||||||
psta = rtw_get_stainfo(&padapter->stapriv, MacAddr);
|
psta = rtw_get_stainfo(&padapter->stapriv, MacAddr);
|
||||||
if (psta)
|
if (psta)
|
||||||
mac_id = (int)psta->mac_id;
|
mac_id = (int)psta->mac_id;
|
||||||
|
@ -9201,7 +9104,6 @@ void report_add_sta_event(struct adapter *padapter, unsigned char* MacAddr, int
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|
||||||
Following are the event callback functions
|
Following are the event callback functions
|
||||||
|
@ -9251,7 +9153,6 @@ void update_sta_info(struct adapter *padapter, struct sta_info *psta)
|
||||||
if (pmlmepriv->qospriv.qos_option)
|
if (pmlmepriv->qospriv.qos_option)
|
||||||
psta->qos_option = true;
|
psta->qos_option = true;
|
||||||
|
|
||||||
|
|
||||||
psta->state = _FW_LINKED;
|
psta->state = _FW_LINKED;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -9299,7 +9200,6 @@ void mlmeext_joinbss_event_callback(struct adapter *padapter, int join_res)
|
||||||
update_bmc_sta(padapter);
|
update_bmc_sta(padapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* turn on dynamic functions */
|
/* turn on dynamic functions */
|
||||||
Switch_DM_Func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true);
|
Switch_DM_Func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true);
|
||||||
|
|
||||||
|
@ -9322,7 +9222,6 @@ void mlmeext_joinbss_event_callback(struct adapter *padapter, int join_res)
|
||||||
|
|
||||||
set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode);
|
set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode);
|
||||||
|
|
||||||
|
|
||||||
if (psta) /* only for infra. mode */
|
if (psta) /* only for infra. mode */
|
||||||
{
|
{
|
||||||
pmlmeinfo->FW_sta_info[psta->mac_id].psta = psta;
|
pmlmeinfo->FW_sta_info[psta->mac_id].psta = psta;
|
||||||
|
@ -9677,7 +9576,6 @@ void survey_timer_hdl(struct adapter *padapter)
|
||||||
rtw_enqueue_cmd(pcmdpriv, ph2c);
|
rtw_enqueue_cmd(pcmdpriv, ph2c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
exit_survey_timer_hdl:
|
exit_survey_timer_hdl:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -9822,7 +9720,6 @@ u8 createbss_hdl(struct adapter *padapter, u8 *pbuf)
|
||||||
struct joinbss_parm *pparm = (struct joinbss_parm *)pbuf;
|
struct joinbss_parm *pparm = (struct joinbss_parm *)pbuf;
|
||||||
/* u32 initialgain; */
|
/* u32 initialgain; */
|
||||||
|
|
||||||
|
|
||||||
if (pparm->network.InfrastructureMode == Ndis802_11APMode)
|
if (pparm->network.InfrastructureMode == Ndis802_11APMode)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
|
@ -9910,7 +9807,6 @@ u8 join_cmd_hdl(struct adapter *padapter, u8 *pbuf)
|
||||||
/* Set_MSR(padapter, _HW_STATE_NOLINK_); */
|
/* Set_MSR(padapter, _HW_STATE_NOLINK_); */
|
||||||
Set_MSR(padapter, _HW_STATE_STATION_);
|
Set_MSR(padapter, _HW_STATE_STATION_);
|
||||||
|
|
||||||
|
|
||||||
rtw_hal_set_hwreg(padapter, HW_VAR_MLME_DISCONNECT, NULL);
|
rtw_hal_set_hwreg(padapter, HW_VAR_MLME_DISCONNECT, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10044,7 +9940,6 @@ u8 disconnect_hdl(struct adapter *padapter, unsigned char *pbuf)
|
||||||
|
|
||||||
/* pmlmeinfo->state = WIFI_FW_NULL_STATE; */
|
/* pmlmeinfo->state = WIFI_FW_NULL_STATE; */
|
||||||
|
|
||||||
|
|
||||||
rtw_hal_set_hwreg(padapter, HW_VAR_MLME_DISCONNECT, NULL);
|
rtw_hal_set_hwreg(padapter, HW_VAR_MLME_DISCONNECT, NULL);
|
||||||
rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, null_addr);
|
rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, null_addr);
|
||||||
|
|
||||||
|
@ -10058,7 +9953,6 @@ u8 disconnect_hdl(struct adapter *padapter, unsigned char *pbuf)
|
||||||
rtw_hal_set_hwreg(padapter, HW_VAR_BCN_FUNC, (u8 *)(&val8));
|
rtw_hal_set_hwreg(padapter, HW_VAR_BCN_FUNC, (u8 *)(&val8));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* set MSR to no link state -> infra. mode */
|
/* set MSR to no link state -> infra. mode */
|
||||||
Set_MSR(padapter, _HW_STATE_STATION_);
|
Set_MSR(padapter, _HW_STATE_STATION_);
|
||||||
|
|
||||||
|
@ -10422,7 +10316,6 @@ u8 set_tx_beacon_cmd(struct adapter* padapter)
|
||||||
|
|
||||||
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
||||||
|
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
|
||||||
;
|
;
|
||||||
|
@ -10430,7 +10323,6 @@ exit:
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
u8 mlme_evt_hdl(struct adapter *padapter, unsigned char *pbuf)
|
u8 mlme_evt_hdl(struct adapter *padapter, unsigned char *pbuf)
|
||||||
{
|
{
|
||||||
u8 evt_code, evt_seq;
|
u8 evt_code, evt_seq;
|
||||||
|
@ -10444,7 +10336,6 @@ u8 mlme_evt_hdl(struct adapter *padapter, unsigned char *pbuf)
|
||||||
evt_seq = (u8)((*peventbuf>>24)&0x7f);
|
evt_seq = (u8)((*peventbuf>>24)&0x7f);
|
||||||
evt_code = (u8)((*peventbuf>>16)&0xff);
|
evt_code = (u8)((*peventbuf>>16)&0xff);
|
||||||
|
|
||||||
|
|
||||||
#ifdef CHECK_EVENT_SEQ
|
#ifdef CHECK_EVENT_SEQ
|
||||||
/* checking event sequence... */
|
/* checking event sequence... */
|
||||||
if (evt_seq != (ATOMIC_READ(&pevt_priv->event_seq) & 0x7f) )
|
if (evt_seq != (ATOMIC_READ(&pevt_priv->event_seq) & 0x7f) )
|
||||||
|
|
|
@ -74,7 +74,6 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
|
|
||||||
plist = get_next(plist);
|
plist = get_next(plist);
|
||||||
|
|
||||||
|
|
||||||
if (psta->is_p2p_device)
|
if (psta->is_p2p_device)
|
||||||
{
|
{
|
||||||
tmplen = 0;
|
tmplen = 0;
|
||||||
|
@ -119,7 +118,6 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
pcur += psta->dev_name_len;
|
pcur += psta->dev_name_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tmplen = (u8)(pcur-pstart);
|
tmplen = (u8)(pcur-pstart);
|
||||||
|
|
||||||
*pstart = (tmplen-1);
|
*pstart = (tmplen-1);
|
||||||
|
@ -131,7 +129,6 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
||||||
|
|
||||||
|
@ -259,7 +256,6 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s
|
||||||
pframe = rtw_set_fixed_ie(pframe, 1, &(oui_subtype), &(pattrib->pktlen));
|
pframe = rtw_set_fixed_ie(pframe, 1, &(oui_subtype), &(pattrib->pktlen));
|
||||||
pframe = rtw_set_fixed_ie(pframe, 1, &(dialogToken), &(pattrib->pktlen));
|
pframe = rtw_set_fixed_ie(pframe, 1, &(dialogToken), &(pattrib->pktlen));
|
||||||
|
|
||||||
|
|
||||||
/* Build P2P IE */
|
/* Build P2P IE */
|
||||||
/* P2P OUI */
|
/* P2P OUI */
|
||||||
p2pielen = 0;
|
p2pielen = 0;
|
||||||
|
@ -302,7 +298,6 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8* raddr,
|
||||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||||
|
|
||||||
|
|
||||||
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -428,7 +423,6 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
|
||||||
pframe = rtw_set_fixed_ie(pframe, 1, &(oui_subtype), &(pattrib->pktlen));
|
pframe = rtw_set_fixed_ie(pframe, 1, &(oui_subtype), &(pattrib->pktlen));
|
||||||
pframe = rtw_set_fixed_ie(pframe, 1, &(dialogToken), &(pattrib->pktlen));
|
pframe = rtw_set_fixed_ie(pframe, 1, &(dialogToken), &(pattrib->pktlen));
|
||||||
|
|
||||||
|
|
||||||
/* Add P2P IE header */
|
/* Add P2P IE header */
|
||||||
/* P2P OUI */
|
/* P2P OUI */
|
||||||
p2pielen = 0;
|
p2pielen = 0;
|
||||||
|
@ -448,11 +442,8 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
|
||||||
|
|
||||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], P2P_ATTR_NOA, 2, noa_attr_content);
|
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], P2P_ATTR_NOA, 2, noa_attr_content);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, p2pie, &(pattrib->pktlen));
|
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, p2pie, &(pattrib->pktlen));
|
||||||
|
|
||||||
|
|
||||||
pattrib->last_txcmdsz = pattrib->pktlen;
|
pattrib->last_txcmdsz = pattrib->pktlen;
|
||||||
|
|
||||||
dump_mgntframe(padapter, pmgntframe);
|
dump_mgntframe(padapter, pmgntframe);
|
||||||
|
@ -473,7 +464,6 @@ u32 build_beacon_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
p2pie[ p2pielen++ ] = 0x9A;
|
p2pie[ p2pielen++ ] = 0x9A;
|
||||||
p2pie[ p2pielen++ ] = 0x09; /* WFA P2P v1.0 */
|
p2pie[ p2pielen++ ] = 0x09; /* WFA P2P v1.0 */
|
||||||
|
|
||||||
|
|
||||||
/* According to the P2P Specification, the beacon frame should contain 3 P2P attributes */
|
/* According to the P2P Specification, the beacon frame should contain 3 P2P attributes */
|
||||||
/* 1. P2P Capability */
|
/* 1. P2P Capability */
|
||||||
/* 2. P2P Device ID */
|
/* 2. P2P Device ID */
|
||||||
|
@ -524,7 +514,6 @@ u32 build_beacon_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
/* 2. Associated BSSID */
|
/* 2. Associated BSSID */
|
||||||
/* 3. Coupled Sink Information */
|
/* 3. Coupled Sink Information */
|
||||||
|
|
||||||
|
|
||||||
/* WFD Device Information ATTR */
|
/* WFD Device Information ATTR */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
||||||
|
@ -641,7 +630,6 @@ u32 build_probe_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
/* 2. Associated BSSID */
|
/* 2. Associated BSSID */
|
||||||
/* 3. Coupled Sink Information */
|
/* 3. Coupled Sink Information */
|
||||||
|
|
||||||
|
|
||||||
/* WFD Device Information ATTR */
|
/* WFD Device Information ATTR */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
||||||
|
@ -755,7 +743,6 @@ u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 tunnel
|
||||||
/* 3. Coupled Sink Information */
|
/* 3. Coupled Sink Information */
|
||||||
/* 4. WFD Session Information */
|
/* 4. WFD Session Information */
|
||||||
|
|
||||||
|
|
||||||
/* WFD Device Information ATTR */
|
/* WFD Device Information ATTR */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
||||||
|
@ -936,7 +923,6 @@ u32 build_assoc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
/* 2. Associated BSSID */
|
/* 2. Associated BSSID */
|
||||||
/* 3. Coupled Sink Information */
|
/* 3. Coupled Sink Information */
|
||||||
|
|
||||||
|
|
||||||
/* WFD Device Information ATTR */
|
/* WFD Device Information ATTR */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
||||||
|
@ -1034,7 +1020,6 @@ u32 build_assoc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
/* 2. Associated BSSID */
|
/* 2. Associated BSSID */
|
||||||
/* 3. Coupled Sink Information */
|
/* 3. Coupled Sink Information */
|
||||||
|
|
||||||
|
|
||||||
/* WFD Device Information ATTR */
|
/* WFD Device Information ATTR */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
||||||
|
@ -1132,7 +1117,6 @@ u32 build_nego_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
/* 2. Associated BSSID ( Optional ) */
|
/* 2. Associated BSSID ( Optional ) */
|
||||||
/* 3. Local IP Adress ( Optional ) */
|
/* 3. Local IP Adress ( Optional ) */
|
||||||
|
|
||||||
|
|
||||||
/* WFD Device Information ATTR */
|
/* WFD Device Information ATTR */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
||||||
|
@ -1230,7 +1214,6 @@ u32 build_nego_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
/* 2. Associated BSSID ( Optional ) */
|
/* 2. Associated BSSID ( Optional ) */
|
||||||
/* 3. Local IP Adress ( Optional ) */
|
/* 3. Local IP Adress ( Optional ) */
|
||||||
|
|
||||||
|
|
||||||
/* WFD Device Information ATTR */
|
/* WFD Device Information ATTR */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
||||||
|
@ -1301,7 +1284,6 @@ u32 build_nego_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
wfdie[ wfdielen++ ] = 0;
|
wfdie[ wfdielen++ ] = 0;
|
||||||
wfdie[ wfdielen++ ] = 0;
|
wfdie[ wfdielen++ ] = 0;
|
||||||
|
|
||||||
|
|
||||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
|
@ -1329,7 +1311,6 @@ u32 build_nego_confirm_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
/* 2. Associated BSSID ( Optional ) */
|
/* 2. Associated BSSID ( Optional ) */
|
||||||
/* 3. Local IP Adress ( Optional ) */
|
/* 3. Local IP Adress ( Optional ) */
|
||||||
|
|
||||||
|
|
||||||
/* WFD Device Information ATTR */
|
/* WFD Device Information ATTR */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
||||||
|
@ -1400,7 +1381,6 @@ u32 build_nego_confirm_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
wfdie[ wfdielen++ ] = 0;
|
wfdie[ wfdielen++ ] = 0;
|
||||||
wfdie[ wfdielen++ ] = 0;
|
wfdie[ wfdielen++ ] = 0;
|
||||||
|
|
||||||
|
|
||||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
|
@ -1428,7 +1408,6 @@ u32 build_invitation_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
/* 2. Associated BSSID ( Optional ) */
|
/* 2. Associated BSSID ( Optional ) */
|
||||||
/* 3. Local IP Adress ( Optional ) */
|
/* 3. Local IP Adress ( Optional ) */
|
||||||
|
|
||||||
|
|
||||||
/* WFD Device Information ATTR */
|
/* WFD Device Information ATTR */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
||||||
|
@ -1541,7 +1520,6 @@ u32 build_invitation_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
/* 2. Associated BSSID ( Optional ) */
|
/* 2. Associated BSSID ( Optional ) */
|
||||||
/* 3. Local IP Adress ( Optional ) */
|
/* 3. Local IP Adress ( Optional ) */
|
||||||
|
|
||||||
|
|
||||||
/* WFD Device Information ATTR */
|
/* WFD Device Information ATTR */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
||||||
|
@ -1654,7 +1632,6 @@ u32 build_provdisc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
/* 2. Associated BSSID ( Optional ) */
|
/* 2. Associated BSSID ( Optional ) */
|
||||||
/* 3. Local IP Adress ( Optional ) */
|
/* 3. Local IP Adress ( Optional ) */
|
||||||
|
|
||||||
|
|
||||||
/* WFD Device Information ATTR */
|
/* WFD Device Information ATTR */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
||||||
|
@ -1725,7 +1702,6 @@ u32 build_provdisc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
wfdie[ wfdielen++ ] = 0;
|
wfdie[ wfdielen++ ] = 0;
|
||||||
wfdie[ wfdielen++ ] = 0;
|
wfdie[ wfdielen++ ] = 0;
|
||||||
|
|
||||||
|
|
||||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
|
@ -1753,7 +1729,6 @@ u32 build_provdisc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
/* 2. Associated BSSID ( Optional ) */
|
/* 2. Associated BSSID ( Optional ) */
|
||||||
/* 3. Local IP Adress ( Optional ) */
|
/* 3. Local IP Adress ( Optional ) */
|
||||||
|
|
||||||
|
|
||||||
/* WFD Device Information ATTR */
|
/* WFD Device Information ATTR */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
wfdie[ wfdielen++ ] = WFD_ATTR_DEVICE_INFO;
|
||||||
|
@ -1830,7 +1805,6 @@ u32 build_provdisc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
|
|
||||||
u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
|
@ -1905,7 +1879,6 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
RTW_PUT_LE16(p2pie + p2pielen, 0xFFFF);
|
RTW_PUT_LE16(p2pie + p2pielen, 0xFFFF);
|
||||||
p2pielen += 2;
|
p2pielen += 2;
|
||||||
|
|
||||||
|
|
||||||
/* Notice of Absence ATTR */
|
/* Notice of Absence ATTR */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
/* Length: */
|
/* Length: */
|
||||||
|
@ -1977,10 +1950,8 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
p2pielen += go_add_group_info_attr(pwdinfo, p2pie + p2pielen);
|
p2pielen += go_add_group_info_attr(pwdinfo, p2pie + p2pielen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &len);
|
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &len);
|
||||||
|
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2022,7 +1993,6 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8
|
||||||
else
|
else
|
||||||
p2pie[ p2pielen++ ] = DMP_P2P_GRPCAP_SUPPORT;
|
p2pie[ p2pielen++ ] = DMP_P2P_GRPCAP_SUPPORT;
|
||||||
|
|
||||||
|
|
||||||
/* Device Info ATTR */
|
/* Device Info ATTR */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
p2pie[ p2pielen++ ] = P2P_ATTR_DEVICE_INFO;
|
p2pie[ p2pielen++ ] = P2P_ATTR_DEVICE_INFO;
|
||||||
|
@ -2113,12 +2083,10 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8
|
||||||
|
|
||||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &len);
|
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &len);
|
||||||
|
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
u32 build_assoc_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 status_code)
|
u32 build_assoc_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 status_code)
|
||||||
{
|
{
|
||||||
u8 p2pie[ MAX_P2P_IE_LEN] = { 0x00 };
|
u8 p2pie[ MAX_P2P_IE_LEN] = { 0x00 };
|
||||||
|
@ -2135,17 +2103,14 @@ u32 build_assoc_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 status
|
||||||
/* 1. Status */
|
/* 1. Status */
|
||||||
/* 2. Extended Listen Timing (optional) */
|
/* 2. Extended Listen Timing (optional) */
|
||||||
|
|
||||||
|
|
||||||
/* Status ATTR */
|
/* Status ATTR */
|
||||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], P2P_ATTR_STATUS, 1, &status_code);
|
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], P2P_ATTR_STATUS, 1, &status_code);
|
||||||
|
|
||||||
|
|
||||||
/* Extended Listen Timing ATTR */
|
/* Extended Listen Timing ATTR */
|
||||||
/* Type: */
|
/* Type: */
|
||||||
/* Length: */
|
/* Length: */
|
||||||
/* Value: */
|
/* Value: */
|
||||||
|
|
||||||
|
|
||||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &len);
|
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &len);
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
|
@ -2235,7 +2200,6 @@ u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2294,7 +2258,6 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
||||||
|
|
||||||
/* Check Extended Listen Timing ATTR */
|
/* Check Extended Listen Timing ATTR */
|
||||||
|
|
||||||
|
|
||||||
/* Check P2P Device Info ATTR */
|
/* Check P2P Device Info ATTR */
|
||||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_INFO, NULL, (uint*)&attr_contentlen))
|
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_INFO, NULL, (uint*)&attr_contentlen))
|
||||||
{
|
{
|
||||||
|
@ -2339,7 +2302,6 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
||||||
pattr_content += (num_of_secdev_type*8);
|
pattr_content += (num_of_secdev_type*8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* dev_name_len = attr_contentlen - ETH_ALEN - 2 - 8 - 1 - (num_of_secdev_type*8); */
|
/* 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))
|
if (WPS_ATTR_DEVICE_NAME == be16_to_cpu(*(__be16*)pattr_content))
|
||||||
|
@ -2446,11 +2408,9 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* issue Device Discoverability Response */
|
/* issue Device Discoverability Response */
|
||||||
issue_p2p_devdisc_resp(pwdinfo, GetAddr2Ptr(pframe), status, dialogToken);
|
issue_p2p_devdisc_resp(pwdinfo, GetAddr2Ptr(pframe), status, dialogToken);
|
||||||
|
|
||||||
|
|
||||||
return (status ==P2P_STATUS_SUCCESS) ? true:false;
|
return (status ==P2P_STATUS_SUCCESS) ? true:false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2702,7 +2662,6 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
attr_contentlen = 0;
|
attr_contentlen = 0;
|
||||||
if ( rtw_get_p2p_attr_content( p2p_ie, p2p_ielen, P2P_ATTR_INTENTED_IF_ADDR, pwdinfo->p2p_peer_interface_addr, &attr_contentlen ) )
|
if ( rtw_get_p2p_attr_content( p2p_ie, p2p_ielen, P2P_ATTR_INTENTED_IF_ADDR, pwdinfo->p2p_peer_interface_addr, &attr_contentlen ) )
|
||||||
{
|
{
|
||||||
|
@ -3139,7 +3098,6 @@ static void find_phase_handler( struct adapter* padapter )
|
||||||
unsigned long irqL;
|
unsigned long irqL;
|
||||||
u8 _status = 0;
|
u8 _status = 0;
|
||||||
|
|
||||||
|
|
||||||
memset((unsigned char*)&ssid, 0, sizeof(struct ndis_802_11_ssid));
|
memset((unsigned char*)&ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||||
memcpy(ssid.Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN );
|
memcpy(ssid.Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN );
|
||||||
ssid.SsidLength = P2P_WILDCARD_SSID_LEN;
|
ssid.SsidLength = P2P_WILDCARD_SSID_LEN;
|
||||||
|
@ -3150,7 +3108,6 @@ static void find_phase_handler( struct adapter* padapter )
|
||||||
_status = rtw_sitesurvey_cmd(padapter, &ssid, 1, NULL, 0);
|
_status = rtw_sitesurvey_cmd(padapter, &ssid, 1, NULL, 0);
|
||||||
spin_unlock_bh(&pmlmepriv->lock);
|
spin_unlock_bh(&pmlmepriv->lock);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void p2p_concurrent_handler( struct adapter* padapter );
|
void p2p_concurrent_handler( struct adapter* padapter );
|
||||||
|
@ -3160,7 +3117,6 @@ static void restore_p2p_state_handler( struct adapter* padapter )
|
||||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
|
|
||||||
|
|
||||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING) || rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_FAIL))
|
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING) || rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_FAIL))
|
||||||
{
|
{
|
||||||
rtw_p2p_set_role(pwdinfo, P2P_ROLE_DEVICE);
|
rtw_p2p_set_role(pwdinfo, P2P_ROLE_DEVICE);
|
||||||
|
@ -3822,7 +3778,6 @@ void p2p_protocol_wk_hdl(struct adapter *padapter, int intCmdType)
|
||||||
{
|
{
|
||||||
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
||||||
|
|
||||||
|
|
||||||
switch (intCmdType)
|
switch (intCmdType)
|
||||||
{
|
{
|
||||||
case P2P_FIND_PHASE_WK:
|
case P2P_FIND_PHASE_WK:
|
||||||
|
@ -3867,7 +3822,6 @@ void process_p2p_ps_ie(struct adapter *padapter, u8 *IEs, u32 IELength)
|
||||||
u8 find_p2p = false, find_p2p_ps = false;
|
u8 find_p2p = false, find_p2p_ps = false;
|
||||||
u8 noa_offset, noa_num, noa_index;
|
u8 noa_offset, noa_num, noa_index;
|
||||||
|
|
||||||
|
|
||||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -3964,7 +3918,6 @@ void p2p_ps_wk_hdl(struct adapter *padapter, u8 p2p_ps_state)
|
||||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
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 */
|
/* Pre action for p2p state */
|
||||||
switch (p2p_ps_state)
|
switch (p2p_ps_state)
|
||||||
{
|
{
|
||||||
|
@ -4025,7 +3978,6 @@ u8 p2p_ps_wk_cmd(struct adapter*padapter, u8 p2p_ps_state, u8 enqueue)
|
||||||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||||
u8 res = _SUCCESS;
|
u8 res = _SUCCESS;
|
||||||
|
|
||||||
|
|
||||||
if ( rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
if ( rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
|
@ -4057,7 +4009,6 @@ u8 p2p_ps_wk_cmd(struct adapter*padapter, u8 p2p_ps_state, u8 enqueue)
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4125,7 +4076,6 @@ static void pre_tx_scan_timer_process (void *FunctionContext)
|
||||||
|
|
||||||
spin_lock_bh(&pmlmepriv->lock);
|
spin_lock_bh(&pmlmepriv->lock);
|
||||||
|
|
||||||
|
|
||||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_PROVISION_DIS_REQ))
|
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_PROVISION_DIS_REQ))
|
||||||
{
|
{
|
||||||
if ( true == pwdinfo->tx_prov_disc_info.benable ) /* the provision discovery request frame is trigger to send or not */
|
if ( true == pwdinfo->tx_prov_disc_info.benable ) /* the provision discovery request frame is trigger to send or not */
|
||||||
|
@ -4475,7 +4425,6 @@ void dbg_rtw_p2p_set_role(struct wifidirect_info *wdinfo, enum P2P_ROLE role, co
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_DBG_P2P */
|
#endif /* CONFIG_DBG_P2P */
|
||||||
|
|
||||||
|
|
||||||
int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role)
|
int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role)
|
||||||
{
|
{
|
||||||
int ret = _SUCCESS;
|
int ret = _SUCCESS;
|
||||||
|
|
|
@ -344,7 +344,6 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv)
|
||||||
|
|
||||||
pslv = PS_STATE(pslv);
|
pslv = PS_STATE(pslv);
|
||||||
|
|
||||||
|
|
||||||
if (true == pwrpriv->btcoex_rfon)
|
if (true == pwrpriv->btcoex_rfon)
|
||||||
{
|
{
|
||||||
if (pslv < PS_STATE_S4)
|
if (pslv < PS_STATE_S4)
|
||||||
|
@ -542,7 +541,6 @@ s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms)
|
||||||
u8 bAwake = false;
|
u8 bAwake = false;
|
||||||
s32 err = 0;
|
s32 err = 0;
|
||||||
|
|
||||||
|
|
||||||
start_time = rtw_get_current_time();
|
start_time = rtw_get_current_time();
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
@ -711,12 +709,10 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter)
|
||||||
rtw_register_early_suspend(pwrctrlpriv);
|
rtw_register_early_suspend(pwrctrlpriv);
|
||||||
#endif /* CONFIG_HAS_EARLYSUSPEND || CONFIG_ANDROID_POWER */
|
#endif /* CONFIG_HAS_EARLYSUSPEND || CONFIG_ANDROID_POWER */
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void rtw_free_pwrctrl_priv(struct adapter *adapter)
|
void rtw_free_pwrctrl_priv(struct adapter *adapter)
|
||||||
{
|
{
|
||||||
struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(adapter);
|
struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(adapter);
|
||||||
|
@ -849,7 +845,6 @@ u8 rtw_interface_ps_func(struct adapter *padapter, enum HAL_INTF_PS_FUNC efunc_i
|
||||||
return bResult;
|
return bResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void rtw_set_ips_deny(struct adapter *padapter, u32 ms)
|
inline void rtw_set_ips_deny(struct adapter *padapter, u32 ms)
|
||||||
{
|
{
|
||||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
||||||
|
@ -873,7 +868,6 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
|
||||||
if (pwrpriv->ips_deny_time < rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms))
|
if (pwrpriv->ips_deny_time < rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms))
|
||||||
pwrpriv->ips_deny_time = rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms);
|
pwrpriv->ips_deny_time = rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms);
|
||||||
|
|
||||||
|
|
||||||
if (pwrpriv->ps_processing) {
|
if (pwrpriv->ps_processing) {
|
||||||
DBG_871X("%s wait ps_processing...\n", __func__);
|
DBG_871X("%s wait ps_processing...\n", __func__);
|
||||||
while (pwrpriv->ps_processing && rtw_get_passing_time_ms(start) <= 3000)
|
while (pwrpriv->ps_processing && rtw_get_passing_time_ms(start) <= 3000)
|
||||||
|
|
|
@ -38,11 +38,9 @@
|
||||||
|
|
||||||
void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS);
|
void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS);
|
||||||
|
|
||||||
|
|
||||||
void _rtw_init_sta_recv_priv(struct sta_recv_priv *psta_recvpriv)
|
void _rtw_init_sta_recv_priv(struct sta_recv_priv *psta_recvpriv)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
memset((u8 *)psta_recvpriv, 0, sizeof (struct sta_recv_priv));
|
memset((u8 *)psta_recvpriv, 0, sizeof (struct sta_recv_priv));
|
||||||
|
@ -94,7 +92,6 @@ sint _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter)
|
||||||
|
|
||||||
precvframe = (union recv_frame*) precvpriv->precv_frame_buf;
|
precvframe = (union recv_frame*) precvpriv->precv_frame_buf;
|
||||||
|
|
||||||
|
|
||||||
for (i =0; i < NR_RECVFRAME ; i++)
|
for (i =0; i < NR_RECVFRAME ; i++)
|
||||||
{
|
{
|
||||||
_rtw_init_listhead(&(precvframe->u.list));
|
_rtw_init_listhead(&(precvframe->u.list));
|
||||||
|
@ -239,7 +236,6 @@ sint _rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue
|
||||||
/* _rtw_init_listhead(&(precvframe->u.hdr.list)); */
|
/* _rtw_init_listhead(&(precvframe->u.hdr.list)); */
|
||||||
rtw_list_delete(&(precvframe->u.hdr.list));
|
rtw_list_delete(&(precvframe->u.hdr.list));
|
||||||
|
|
||||||
|
|
||||||
rtw_list_insert_tail(&(precvframe->u.hdr.list), get_list_head(queue));
|
rtw_list_insert_tail(&(precvframe->u.hdr.list), get_list_head(queue));
|
||||||
|
|
||||||
if (padapter != NULL) {
|
if (padapter != NULL) {
|
||||||
|
@ -313,7 +309,6 @@ u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter)
|
||||||
return cnt;
|
return cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sint rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue)
|
sint rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue)
|
||||||
{
|
{
|
||||||
unsigned long irqL;
|
unsigned long irqL;
|
||||||
|
@ -443,7 +438,6 @@ sint recvframe_chkmic(struct adapter *adapter, union recv_frame *precvframe) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (bmic_err ==true) {
|
if (bmic_err ==true) {
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("\n *(pframemic-8)-*(pframemic-1) =0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
|
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("\n *(pframemic-8)-*(pframemic-1) =0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
|
||||||
|
@ -831,7 +825,6 @@ void process_wmmps_data(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -966,8 +959,6 @@ sint sta2sta_data_frame(
|
||||||
ret = _FAIL;
|
ret = _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (bmcast)
|
if (bmcast)
|
||||||
*psta = rtw_get_bcmc_stainfo(adapter);
|
*psta = rtw_get_bcmc_stainfo(adapter);
|
||||||
else
|
else
|
||||||
|
@ -1034,7 +1025,6 @@ sint ap2sta_data_frame(
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* check BSSID */
|
/* check BSSID */
|
||||||
if ( _rtw_memcmp(pattrib->bssid, "\x0\x0\x0\x0\x0\x0", ETH_ALEN) ||
|
if ( _rtw_memcmp(pattrib->bssid, "\x0\x0\x0\x0\x0\x0", ETH_ALEN) ||
|
||||||
_rtw_memcmp(mybssid, "\x0\x0\x0\x0\x0\x0", ETH_ALEN) ||
|
_rtw_memcmp(mybssid, "\x0\x0\x0\x0\x0\x0", ETH_ALEN) ||
|
||||||
|
@ -1096,7 +1086,6 @@ sint ap2sta_data_frame(
|
||||||
/* */
|
/* */
|
||||||
memcpy(pattrib->bssid, mybssid, ETH_ALEN);
|
memcpy(pattrib->bssid, mybssid, ETH_ALEN);
|
||||||
|
|
||||||
|
|
||||||
*psta = rtw_get_stainfo(pstapriv, pattrib->bssid); /* get sta_info */
|
*psta = rtw_get_stainfo(pstapriv, pattrib->bssid); /* get sta_info */
|
||||||
if (*psta == NULL) {
|
if (*psta == NULL) {
|
||||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("can't get psta under MP_MODE ; drop pkt\n"));
|
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("can't get psta under MP_MODE ; drop pkt\n"));
|
||||||
|
@ -1107,7 +1096,6 @@ sint ap2sta_data_frame(
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||||
{
|
{
|
||||||
|
@ -1418,7 +1406,6 @@ sint validate_recv_mgnt_frame(struct adapter *padapter, union recv_frame *precv_
|
||||||
psa = get_sa(ptr);
|
psa = get_sa(ptr);
|
||||||
pbssid = get_hdr_bssid(ptr);
|
pbssid = get_hdr_bssid(ptr);
|
||||||
|
|
||||||
|
|
||||||
memcpy(pattrib->dst, pda, ETH_ALEN);
|
memcpy(pattrib->dst, pda, ETH_ALEN);
|
||||||
memcpy(pattrib->src, psa, ETH_ALEN);
|
memcpy(pattrib->src, psa, ETH_ALEN);
|
||||||
|
|
||||||
|
@ -1535,7 +1522,6 @@ sint validate_recv_data_frame(struct adapter *adapter, union recv_frame *precv_f
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (psta == NULL) {
|
if (psta == NULL) {
|
||||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, (" after to_fr_ds_chk; psta == NULL\n"));
|
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, (" after to_fr_ds_chk; psta == NULL\n"));
|
||||||
#ifdef DBG_RX_DROP_FRAME
|
#ifdef DBG_RX_DROP_FRAME
|
||||||
|
@ -1549,7 +1535,6 @@ sint validate_recv_data_frame(struct adapter *adapter, union recv_frame *precv_f
|
||||||
/* psta->signal_quality = prxcmd->sq; */
|
/* psta->signal_quality = prxcmd->sq; */
|
||||||
precv_frame->u.hdr.psta = psta;
|
precv_frame->u.hdr.psta = psta;
|
||||||
|
|
||||||
|
|
||||||
pattrib->amsdu =0;
|
pattrib->amsdu =0;
|
||||||
pattrib->ack_policy = 0;
|
pattrib->ack_policy = 0;
|
||||||
/* parsing QC field */
|
/* parsing QC field */
|
||||||
|
@ -1571,7 +1556,6 @@ sint validate_recv_data_frame(struct adapter *adapter, union recv_frame *precv_f
|
||||||
pattrib->hdrlen = pattrib->to_fr_ds ==3 ? 30 : 24;
|
pattrib->hdrlen = pattrib->to_fr_ds ==3 ? 30 : 24;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (pattrib->order)/* HT-CTRL 11n */
|
if (pattrib->order)/* HT-CTRL 11n */
|
||||||
{
|
{
|
||||||
pattrib->hdrlen += 4;
|
pattrib->hdrlen += 4;
|
||||||
|
@ -1866,7 +1850,6 @@ exit:
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* remove the wlanhdr and add the eth_hdr */
|
/* remove the wlanhdr and add the eth_hdr */
|
||||||
|
|
||||||
static sint wlanhdr_to_ethhdr ( union recv_frame *precvframe)
|
static sint wlanhdr_to_ethhdr ( union recv_frame *precvframe)
|
||||||
|
@ -1987,7 +1970,6 @@ static union recv_frame * recvframe_defrag(struct adapter *adapter, struct __qu
|
||||||
pnextrframe = LIST_CONTAINOR(plist, union recv_frame , u);
|
pnextrframe = LIST_CONTAINOR(plist, union recv_frame , u);
|
||||||
pnfhdr =&pnextrframe->u.hdr;
|
pnfhdr =&pnextrframe->u.hdr;
|
||||||
|
|
||||||
|
|
||||||
/* check the fragment sequence (2nd ~n fragment frame) */
|
/* check the fragment sequence (2nd ~n fragment frame) */
|
||||||
|
|
||||||
if (curfragnum!=pnfhdr->attrib.frag_num)
|
if (curfragnum!=pnfhdr->attrib.frag_num)
|
||||||
|
@ -2089,7 +2071,6 @@ union recv_frame* recvframe_chk_defrag(struct adapter *padapter, union recv_fram
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Then enqueue the 0~(n-1) fragment into the defrag_q */
|
/* Then enqueue the 0~(n-1) fragment into the defrag_q */
|
||||||
|
|
||||||
/* _rtw_spinlock(&pdefrag_q->lock); */
|
/* _rtw_spinlock(&pdefrag_q->lock); */
|
||||||
|
@ -2139,7 +2120,6 @@ union recv_frame* recvframe_chk_defrag(struct adapter *padapter, union recv_fram
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((prtnframe!= NULL)&&(prtnframe->u.hdr.attrib.privacy))
|
if ((prtnframe!= NULL)&&(prtnframe->u.hdr.attrib.privacy))
|
||||||
{
|
{
|
||||||
/* after defrag we must check tkip mic code */
|
/* after defrag we must check tkip mic code */
|
||||||
|
@ -2296,7 +2276,6 @@ static int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe)
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
#endif /* (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) */
|
#endif /* (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) */
|
||||||
|
|
||||||
|
|
||||||
if ( br_port && (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true) )
|
if ( br_port && (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true) )
|
||||||
{
|
{
|
||||||
if (nat25_handle_frame(padapter, sub_skb) == -1) {
|
if (nat25_handle_frame(padapter, sub_skb) == -1) {
|
||||||
|
@ -2356,7 +2335,6 @@ static int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_n
|
||||||
preorder_ctrl->indicate_seq, seq_num);
|
preorder_ctrl->indicate_seq, seq_num);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2504,7 +2482,6 @@ int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reorder_ctr
|
||||||
/* Indicate packets */
|
/* Indicate packets */
|
||||||
/* RT_ASSERT((index<=REORDER_WIN_SIZE), ("RxReorderIndicatePacket(): Rx Reorder buffer full!!\n")); */
|
/* RT_ASSERT((index<=REORDER_WIN_SIZE), ("RxReorderIndicatePacket(): Rx Reorder buffer full!!\n")); */
|
||||||
|
|
||||||
|
|
||||||
/* indicate this recv_frame */
|
/* indicate this recv_frame */
|
||||||
/* DbgPrint("recv_indicatepkts_in_order, indicate_seq =%d, seq_num =%d\n", precvpriv->indicate_seq, pattrib->seq_num); */
|
/* DbgPrint("recv_indicatepkts_in_order, indicate_seq =%d, seq_num =%d\n", precvpriv->indicate_seq, pattrib->seq_num); */
|
||||||
if (!pattrib->amsdu)
|
if (!pattrib->amsdu)
|
||||||
|
@ -2531,7 +2508,6 @@ int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reorder_ctr
|
||||||
/* error condition; */
|
/* error condition; */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Update local variables. */
|
/* Update local variables. */
|
||||||
bPktInBuf = false;
|
bPktInBuf = false;
|
||||||
|
|
||||||
|
@ -2672,7 +2648,6 @@ void rtw_reordering_ctrl_timeout_handler(void *pcontext)
|
||||||
struct adapter *padapter = preorder_ctrl->padapter;
|
struct adapter *padapter = preorder_ctrl->padapter;
|
||||||
struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
||||||
|
|
||||||
|
|
||||||
if (padapter->bDriverStopped ||padapter->bSurpriseRemoved)
|
if (padapter->bDriverStopped ||padapter->bSurpriseRemoved)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -2724,7 +2699,6 @@ static int process_recv_indicatepkts(struct adapter *padapter, union recv_frame
|
||||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_, ("@@@@ process_recv_indicatepkts- recv_func recv_indicatepkt\n" ));
|
RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_, ("@@@@ process_recv_indicatepkts- recv_func recv_indicatepkt\n" ));
|
||||||
rtw_recv_indicatepkt(padapter, prframe);
|
rtw_recv_indicatepkt(padapter, prframe);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2748,7 +2722,6 @@ static int recv_func_prehandle(struct adapter *padapter, union recv_frame *rfram
|
||||||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||||
struct __queue *pfree_recv_queue = &padapter->recvpriv.free_recv_queue;
|
struct __queue *pfree_recv_queue = &padapter->recvpriv.free_recv_queue;
|
||||||
|
|
||||||
|
|
||||||
/* check the frame crtl field and decache */
|
/* check the frame crtl field and decache */
|
||||||
ret = validate_recv_frame(padapter, rframe);
|
ret = validate_recv_frame(padapter, rframe);
|
||||||
if (ret != _SUCCESS)
|
if (ret != _SUCCESS)
|
||||||
|
@ -2821,7 +2794,6 @@ _recv_data_drop:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int recv_func(struct adapter *padapter, union recv_frame *rframe);
|
int recv_func(struct adapter *padapter, union recv_frame *rframe);
|
||||||
int recv_func(struct adapter *padapter, union recv_frame *rframe)
|
int recv_func(struct adapter *padapter, union recv_frame *rframe)
|
||||||
{
|
{
|
||||||
|
@ -2878,7 +2850,6 @@ exit:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
s32 rtw_recv_entry(union recv_frame *precvframe)
|
s32 rtw_recv_entry(union recv_frame *precvframe)
|
||||||
{
|
{
|
||||||
struct adapter *padapter;
|
struct adapter *padapter;
|
||||||
|
@ -2893,14 +2864,12 @@ s32 rtw_recv_entry(union recv_frame *precvframe)
|
||||||
|
|
||||||
precvpriv = &padapter->recvpriv;
|
precvpriv = &padapter->recvpriv;
|
||||||
|
|
||||||
|
|
||||||
if ((ret = recv_func(padapter, precvframe)) == _FAIL)
|
if ((ret = recv_func(padapter, precvframe)) == _FAIL)
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("rtw_recv_entry: recv_func return fail!!!\n"));
|
RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("rtw_recv_entry: recv_func return fail!!!\n"));
|
||||||
goto _recv_entry_drop;
|
goto _recv_entry_drop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
precvpriv->rx_pkts++;
|
precvpriv->rx_pkts++;
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include <recv_osdep.h>
|
#include <recv_osdep.h>
|
||||||
#include <xmit_osdep.h>
|
#include <xmit_osdep.h>
|
||||||
|
|
||||||
|
|
||||||
struct ch_freq {
|
struct ch_freq {
|
||||||
u32 channel;
|
u32 channel;
|
||||||
u32 frequency;
|
u32 frequency;
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include <wifi.h>
|
#include <wifi.h>
|
||||||
#include <osdep_intf.h>
|
#include <osdep_intf.h>
|
||||||
|
|
||||||
|
|
||||||
/* WEP related ===== */
|
/* WEP related ===== */
|
||||||
|
|
||||||
#define CRC32_POLY 0x04c11db7
|
#define CRC32_POLY 0x04c11db7
|
||||||
|
@ -37,7 +36,6 @@ struct arc4context
|
||||||
u8 state[256];
|
u8 state[256];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static void arcfour_init(struct arc4context *parc4ctx, u8 * key, u32 key_len)
|
static void arcfour_init(struct arc4context *parc4ctx, u8 * key, u32 key_len)
|
||||||
{
|
{
|
||||||
u32 t, u;
|
u32 t, u;
|
||||||
|
@ -85,7 +83,6 @@ static u32 arcfour_byte( struct arc4context *parc4ctx)
|
||||||
return state[(sx + sy) & 0xff];
|
return state[(sx + sy) & 0xff];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void arcfour_encrypt( struct arc4context *parc4ctx,
|
static void arcfour_encrypt( struct arc4context *parc4ctx,
|
||||||
u8 * dest,
|
u8 * dest,
|
||||||
u8 * src,
|
u8 * src,
|
||||||
|
@ -101,7 +98,6 @@ static void arcfour_encrypt( struct arc4context *parc4ctx,
|
||||||
static sint bcrc32initialized = 0;
|
static sint bcrc32initialized = 0;
|
||||||
static u32 crc32_table[256];
|
static u32 crc32_table[256];
|
||||||
|
|
||||||
|
|
||||||
static u8 crc32_reverseBit( u8 data)
|
static u8 crc32_reverseBit( u8 data)
|
||||||
{
|
{
|
||||||
return( (u8)((data<<7)&0x80) | ((data<<5)&0x40) | ((data<<3)&0x20) | ((data<<1)&0x10) | ((data>>1)&0x08) | ((data>>3)&0x04) | ((data>>5)&0x02) | ((data>>7)&0x01) );
|
return( (u8)((data<<7)&0x80) | ((data<<5)&0x40) | ((data<<3)&0x20) | ((data<<1)&0x10) | ((data>>1)&0x08) | ((data>>3)&0x04) | ((data>>5)&0x02) | ((data>>7)&0x01) );
|
||||||
|
@ -156,7 +152,6 @@ static __le32 getcrc32(u8 *buf, sint len)
|
||||||
return cpu_to_le32(~crc); /* transmit complement, per CRC-32 spec */
|
return cpu_to_le32(~crc); /* transmit complement, per CRC-32 spec */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Need to consider the fragment situation
|
Need to consider the fragment situation
|
||||||
*/
|
*/
|
||||||
|
@ -178,7 +173,6 @@ void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
if (((struct xmit_frame*)pxmitframe)->buf_addr == NULL)
|
if (((struct xmit_frame*)pxmitframe)->buf_addr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -406,15 +400,11 @@ void rtw_seccalctkipmic(u8 * key, u8 *header, u8 *data, u32 data_len, u8 *mic_co
|
||||||
}
|
}
|
||||||
rtw_secmicappend(&micdata, &priority[0], 4);
|
rtw_secmicappend(&micdata, &priority[0], 4);
|
||||||
|
|
||||||
|
|
||||||
rtw_secmicappend(&micdata, data, data_len);
|
rtw_secmicappend(&micdata, data, data_len);
|
||||||
|
|
||||||
rtw_secgetmic(&micdata, mic_code);
|
rtw_secgetmic(&micdata, mic_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* macros for extraction/creation of unsigned char/unsigned short values */
|
/* macros for extraction/creation of unsigned char/unsigned short values */
|
||||||
#define RotR1(v16) ((((v16) >> 1) & 0x7FFF) ^ (((v16) & 1) << 15))
|
#define RotR1(v16) ((((v16) >> 1) & 0x7FFF) ^ (((v16) & 1) << 15))
|
||||||
#define Lo8(v16) ((u8)( (v16) & 0x00FF))
|
#define Lo8(v16) ((u8)( (v16) & 0x00FF))
|
||||||
|
@ -436,7 +426,6 @@ void rtw_seccalctkipmic(u8 * key, u8 *header, u8 *data, u32 data_len, u8 *mic_co
|
||||||
#define P1K_SIZE 10 /* 80-bit Phase1 key */
|
#define P1K_SIZE 10 /* 80-bit Phase1 key */
|
||||||
#define RC4_KEY_SIZE 16 /* 128-bit RC4KEY (104 bits unknown) */
|
#define RC4_KEY_SIZE 16 /* 128-bit RC4KEY (104 bits unknown) */
|
||||||
|
|
||||||
|
|
||||||
/* 2-unsigned char by 2-unsigned char subset of the full AES S-box table */
|
/* 2-unsigned char by 2-unsigned char subset of the full AES S-box table */
|
||||||
static const unsigned short Sbox1[2][256]= /* Sbox for hash (can be in ROM) */
|
static const unsigned short Sbox1[2][256]= /* Sbox for hash (can be in ROM) */
|
||||||
{ {
|
{ {
|
||||||
|
@ -474,7 +463,6 @@ static const unsigned short Sbox1[2][256]= /* Sbox for hash (can be in ROM
|
||||||
0x82C3, 0x29B0, 0x5A77, 0x1E11, 0x7BCB, 0xA8FC, 0x6DD6, 0x2C3A,
|
0x82C3, 0x29B0, 0x5A77, 0x1E11, 0x7BCB, 0xA8FC, 0x6DD6, 0x2C3A,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
{ /* second half of table is unsigned char-reversed version of first! */
|
{ /* second half of table is unsigned char-reversed version of first! */
|
||||||
0xA5C6, 0x84F8, 0x99EE, 0x8DF6, 0x0DFF, 0xBDD6, 0xB1DE, 0x5491,
|
0xA5C6, 0x84F8, 0x99EE, 0x8DF6, 0x0DFF, 0xBDD6, 0xB1DE, 0x5491,
|
||||||
0x5060, 0x0302, 0xA9CE, 0x7D56, 0x19E7, 0x62B5, 0xE64D, 0x9AEC,
|
0x5060, 0x0302, 0xA9CE, 0x7D56, 0x19E7, 0x62B5, 0xE64D, 0x9AEC,
|
||||||
|
@ -553,7 +541,6 @@ static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
* Routine: Phase 2 -- generate RC4KEY, given TK, P1K, IV16
|
* Routine: Phase 2 -- generate RC4KEY, given TK, P1K, IV16
|
||||||
|
@ -613,7 +600,6 @@ static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16)
|
||||||
rc4key[2] = Lo8(iv16);
|
rc4key[2] = Lo8(iv16);
|
||||||
rc4key[3] = Lo8((PPK[5] ^ TK16(0)) >> 1);
|
rc4key[3] = Lo8((PPK[5] ^ TK16(0)) >> 1);
|
||||||
|
|
||||||
|
|
||||||
/* Copy 96 bits of PPK[0..5] to RC4KEY[4..15] (little-endian) */
|
/* Copy 96 bits of PPK[0..5] to RC4KEY[4..15] (little-endian) */
|
||||||
for (i =0;i<6;i++)
|
for (i =0;i<6;i++)
|
||||||
{
|
{
|
||||||
|
@ -623,7 +609,6 @@ static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* The hlen isn't include the IV */
|
/* The hlen isn't include the IV */
|
||||||
u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
||||||
{ /* exclude ICV */
|
{ /* exclude ICV */
|
||||||
|
@ -722,7 +707,6 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_encrypt: stainfo == NULL!!!\n"));
|
RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_encrypt: stainfo == NULL!!!\n"));
|
||||||
|
@ -736,7 +720,6 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* The hlen isn't include the IV */
|
/* The hlen isn't include the IV */
|
||||||
u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
|
u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
|
||||||
{ /* exclude ICV */
|
{ /* exclude ICV */
|
||||||
|
@ -843,7 +826,6 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
|
||||||
res =_FAIL;
|
res =_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_decrypt: stainfo == NULL!!!\n"));
|
RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_decrypt: stainfo == NULL!!!\n"));
|
||||||
|
@ -857,11 +839,8 @@ exit:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* 3 =====AES related ===== */
|
/* 3 =====AES related ===== */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define MAX_MSG_SIZE 2048
|
#define MAX_MSG_SIZE 2048
|
||||||
/*****************************/
|
/*****************************/
|
||||||
/******** SBOX Table *********/
|
/******** SBOX Table *********/
|
||||||
|
@ -948,7 +927,6 @@ static void add_round_key( u8 *shiftrow_in,
|
||||||
u8 *out);
|
u8 *out);
|
||||||
static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext);
|
static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext);
|
||||||
|
|
||||||
|
|
||||||
/****************************************/
|
/****************************************/
|
||||||
/* aes128k128d() */
|
/* aes128k128d() */
|
||||||
/* Performs a 128 bit AES encrypt with */
|
/* Performs a 128 bit AES encrypt with */
|
||||||
|
@ -965,7 +943,6 @@ static void xor_128(u8 *a, u8 *b, u8 *out)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void xor_32(u8 *a, u8 *b, u8 *out)
|
static void xor_32(u8 *a, u8 *b, u8 *out)
|
||||||
{
|
{
|
||||||
sint i;
|
sint i;
|
||||||
|
@ -977,13 +954,11 @@ static void xor_32(u8 *a, u8 *b, u8 *out)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static u8 sbox(u8 a)
|
static u8 sbox(u8 a)
|
||||||
{
|
{
|
||||||
return sbox_table[(sint)a];
|
return sbox_table[(sint)a];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void next_key(u8 *key, sint round)
|
static void next_key(u8 *key, sint round)
|
||||||
{
|
{
|
||||||
u8 rcon;
|
u8 rcon;
|
||||||
|
@ -1010,7 +985,6 @@ static void next_key(u8 *key, sint round)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void byte_sub(u8 *in, u8 *out)
|
static void byte_sub(u8 *in, u8 *out)
|
||||||
{
|
{
|
||||||
sint i;
|
sint i;
|
||||||
|
@ -1022,7 +996,6 @@ static void byte_sub(u8 *in, u8 *out)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void shift_row(u8 *in, u8 *out)
|
static void shift_row(u8 *in, u8 *out)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
|
@ -1045,7 +1018,6 @@ static void shift_row(u8 *in, u8 *out)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void mix_column(u8 *in, u8 *out)
|
static void mix_column(u8 *in, u8 *out)
|
||||||
{
|
{
|
||||||
sint i;
|
sint i;
|
||||||
|
@ -1108,7 +1080,6 @@ static void mix_column(u8 *in, u8 *out)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext)
|
static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext)
|
||||||
{
|
{
|
||||||
sint round;
|
sint round;
|
||||||
|
@ -1147,7 +1118,6 @@ static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/************************************************/
|
/************************************************/
|
||||||
/* construct_mic_iv() */
|
/* construct_mic_iv() */
|
||||||
/* Builds the MIC IV from header fields and PN */
|
/* Builds the MIC IV from header fields and PN */
|
||||||
|
@ -1228,7 +1198,6 @@ static void construct_mic_header1(
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/************************************************/
|
/************************************************/
|
||||||
/* construct_mic_header2() */
|
/* construct_mic_header2() */
|
||||||
/* Builds the last MIC header block from */
|
/* Builds the last MIC header block from */
|
||||||
|
@ -1255,7 +1224,6 @@ static void construct_mic_header2(
|
||||||
mic_header2[6] = 0x00;
|
mic_header2[6] = 0x00;
|
||||||
mic_header2[7] = 0x00; /* mpdu[23]; */
|
mic_header2[7] = 0x00; /* mpdu[23]; */
|
||||||
|
|
||||||
|
|
||||||
if (!qc_exists && a4_exists)
|
if (!qc_exists && a4_exists)
|
||||||
{
|
{
|
||||||
for (i =0;i<6;i++) mic_header2[8+i] = mpdu[24+i]; /* A4 */
|
for (i =0;i<6;i++) mic_header2[8+i] = mpdu[24+i]; /* A4 */
|
||||||
|
@ -1279,7 +1247,6 @@ static void construct_mic_header2(
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/************************************************/
|
/************************************************/
|
||||||
/* construct_mic_header2() */
|
/* construct_mic_header2() */
|
||||||
/* Builds the last MIC header block from */
|
/* Builds the last MIC header block from */
|
||||||
|
@ -1326,7 +1293,6 @@ static void construct_ctr_preload(
|
||||||
ctr_preload[15] = (unsigned char) (c % 256);
|
ctr_preload[15] = (unsigned char) (c % 256);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/************************************/
|
/************************************/
|
||||||
/* bitwise_xor() */
|
/* bitwise_xor() */
|
||||||
/* A 128 bit, bitwise exclusive or */
|
/* A 128 bit, bitwise exclusive or */
|
||||||
|
@ -1342,7 +1308,6 @@ static void bitwise_xor(u8 *ina, u8 *inb, u8 *out)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static sint aes_cipher(u8 *key, uint hdrlen,
|
static sint aes_cipher(u8 *key, uint hdrlen,
|
||||||
u8 *pframe, uint plen)
|
u8 *pframe, uint plen)
|
||||||
{
|
{
|
||||||
|
@ -1426,7 +1391,6 @@ static sint aes_cipher(u8 *key, uint hdrlen,
|
||||||
qc_exists
|
qc_exists
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
payload_remainder = plen % 16;
|
payload_remainder = plen % 16;
|
||||||
num_blocks = plen / 16;
|
num_blocks = plen / 16;
|
||||||
|
|
||||||
|
@ -1528,7 +1492,6 @@ static sint aes_cipher(u8 *key, uint hdrlen,
|
||||||
u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
||||||
{ /* exclude ICV */
|
{ /* exclude ICV */
|
||||||
|
|
||||||
|
|
||||||
/*static*/
|
/*static*/
|
||||||
/* unsigned char message[MAX_MSG_SIZE]; */
|
/* unsigned char message[MAX_MSG_SIZE]; */
|
||||||
|
|
||||||
|
@ -1596,8 +1559,6 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -1621,7 +1582,6 @@ static sint aes_decipher(u8 *key, uint hdrlen,
|
||||||
u8 padded_buffer[16];
|
u8 padded_buffer[16];
|
||||||
u8 mic[8];
|
u8 mic[8];
|
||||||
|
|
||||||
|
|
||||||
uint frtype = GetFrameType(pframe);
|
uint frtype = GetFrameType(pframe);
|
||||||
uint frsubtype = GetFrameSubType(pframe);
|
uint frsubtype = GetFrameSubType(pframe);
|
||||||
|
|
||||||
|
@ -1672,7 +1632,6 @@ static sint aes_decipher(u8 *key, uint hdrlen,
|
||||||
} else
|
} else
|
||||||
qc_exists = 0;
|
qc_exists = 0;
|
||||||
|
|
||||||
|
|
||||||
/* now, decrypt pframe with hdrlen offset and plen long */
|
/* now, decrypt pframe with hdrlen offset and plen long */
|
||||||
|
|
||||||
payload_index = hdrlen + 8; /* 8 is for extiv */
|
payload_index = hdrlen + 8; /* 8 is for extiv */
|
||||||
|
@ -1723,7 +1682,6 @@ static sint aes_decipher(u8 *key, uint hdrlen,
|
||||||
if ((hdrlen +plen+8) <= MAX_MSG_SIZE)
|
if ((hdrlen +plen+8) <= MAX_MSG_SIZE)
|
||||||
memcpy((void *)message, pframe, (hdrlen +plen+8)); /* 8 is for ext iv len */
|
memcpy((void *)message, pframe, (hdrlen +plen+8)); /* 8 is for ext iv len */
|
||||||
|
|
||||||
|
|
||||||
pn_vector[0]=pframe[hdrlen];
|
pn_vector[0]=pframe[hdrlen];
|
||||||
pn_vector[1]=pframe[hdrlen+1];
|
pn_vector[1]=pframe[hdrlen+1];
|
||||||
pn_vector[2]=pframe[hdrlen+4];
|
pn_vector[2]=pframe[hdrlen+4];
|
||||||
|
@ -1753,7 +1711,6 @@ static sint aes_decipher(u8 *key, uint hdrlen,
|
||||||
qc_exists
|
qc_exists
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
payload_remainder = (plen-8) % 16;
|
payload_remainder = (plen-8) % 16;
|
||||||
num_blocks = (plen-8) / 16;
|
num_blocks = (plen-8) / 16;
|
||||||
|
|
||||||
|
@ -2140,7 +2097,6 @@ static int sha256_process(struct sha256_state *md, unsigned char *in,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Terminate the hash to get the digest
|
Terminate the hash to get the digest
|
||||||
@param md The hash state
|
@param md The hash state
|
||||||
|
@ -2640,7 +2596,6 @@ static void aes_128_encrypt(void *ctx, u8 *plain, u8 *crypt)
|
||||||
rijndaelEncrypt(ctx, plain, crypt);
|
rijndaelEncrypt(ctx, plain, crypt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void gf_mulx(u8 *pad)
|
static void gf_mulx(u8 *pad)
|
||||||
{
|
{
|
||||||
int i, carry;
|
int i, carry;
|
||||||
|
@ -2659,7 +2614,6 @@ static void aes_encrypt_deinit(void *ctx)
|
||||||
rtw_mfree(ctx, AES_PRIV_SIZE);
|
rtw_mfree(ctx, AES_PRIV_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* omac1_aes_128_vector - One-Key CBC MAC (OMAC1) hash with AES-128
|
* omac1_aes_128_vector - One-Key CBC MAC (OMAC1) hash with AES-128
|
||||||
* @key: 128-bit key for the hash operation
|
* @key: 128-bit key for the hash operation
|
||||||
|
@ -2733,7 +2687,6 @@ static int omac1_aes_128_vector(u8 *key, size_t num_elem,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* omac1_aes_128 - One-Key CBC MAC (OMAC1) hash with AES-128 (aka AES-CMAC)
|
* omac1_aes_128 - One-Key CBC MAC (OMAC1) hash with AES-128 (aka AES-CMAC)
|
||||||
* @key: 128-bit key for the hash operation
|
* @key: 128-bit key for the hash operation
|
||||||
|
|
|
@ -177,7 +177,6 @@ static void sreset_restore_network_station(struct adapter *padapter)
|
||||||
sreset_restore_security_station(padapter);
|
sreset_restore_security_station(padapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void sreset_restore_network_status(struct adapter *padapter)
|
static void sreset_restore_network_status(struct adapter *padapter)
|
||||||
{
|
{
|
||||||
struct mlme_priv *mlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *mlmepriv = &padapter->mlmepriv;
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
#include <xmit_osdep.h>
|
#include <xmit_osdep.h>
|
||||||
#include <mlme_osdep.h>
|
#include <mlme_osdep.h>
|
||||||
|
|
||||||
|
|
||||||
#include <sta_info.h>
|
#include <sta_info.h>
|
||||||
|
|
||||||
static void _rtw_init_stainfo(struct sta_info *psta)
|
static void _rtw_init_stainfo(struct sta_info *psta)
|
||||||
|
@ -57,7 +56,6 @@ static void _rtw_init_stainfo(struct sta_info *psta)
|
||||||
|
|
||||||
psta->bpairwise_key_installed = false;
|
psta->bpairwise_key_installed = false;
|
||||||
|
|
||||||
|
|
||||||
psta->nonerp_set = 0;
|
psta->nonerp_set = 0;
|
||||||
psta->no_short_slot_time_set = 0;
|
psta->no_short_slot_time_set = 0;
|
||||||
psta->no_short_preamble_set = 0;
|
psta->no_short_preamble_set = 0;
|
||||||
|
@ -111,7 +109,6 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv)
|
||||||
|
|
||||||
psta = (struct sta_info *)(pstapriv->pstainfo_buf);
|
psta = (struct sta_info *)(pstapriv->pstainfo_buf);
|
||||||
|
|
||||||
|
|
||||||
for (i = 0; i < NUM_STA; i++) {
|
for (i = 0; i < NUM_STA; i++) {
|
||||||
_rtw_init_stainfo(psta);
|
_rtw_init_stainfo(psta);
|
||||||
|
|
||||||
|
@ -122,8 +119,6 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv)
|
||||||
psta++;
|
psta++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
|
|
||||||
pstapriv->sta_dz_bitmap = 0;
|
pstapriv->sta_dz_bitmap = 0;
|
||||||
|
@ -242,7 +237,6 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
||||||
{
|
{
|
||||||
unsigned long irqL, irqL2;
|
unsigned long irqL, irqL2;
|
||||||
|
@ -324,7 +318,6 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
||||||
rtw_init_recv_timer(preorder_ctrl);
|
rtw_init_recv_timer(preorder_ctrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* init for DM */
|
/* init for DM */
|
||||||
psta->rssi_stat.UndecoratedSmoothedPWDB = (-1);
|
psta->rssi_stat.UndecoratedSmoothedPWDB = (-1);
|
||||||
psta->rssi_stat.UndecoratedSmoothedCCK = (-1);
|
psta->rssi_stat.UndecoratedSmoothedCCK = (-1);
|
||||||
|
@ -336,7 +329,6 @@ exit:
|
||||||
return psta;
|
return psta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* using pstapriv->sta_hash_lock to protect */
|
/* using pstapriv->sta_hash_lock to protect */
|
||||||
u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
|
u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
|
||||||
{
|
{
|
||||||
|
@ -349,20 +341,17 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
struct hw_xmit *phwxmit;
|
struct hw_xmit *phwxmit;
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
if (psta == NULL)
|
if (psta == NULL)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
|
|
||||||
spin_lock_bh(&psta->lock);
|
spin_lock_bh(&psta->lock);
|
||||||
psta->state &= ~_FW_LINKED;
|
psta->state &= ~_FW_LINKED;
|
||||||
spin_unlock_bh(&psta->lock);
|
spin_unlock_bh(&psta->lock);
|
||||||
|
|
||||||
pfree_sta_queue = &pstapriv->free_sta_queue;
|
pfree_sta_queue = &pstapriv->free_sta_queue;
|
||||||
|
|
||||||
|
|
||||||
pstaxmitpriv = &psta->sta_xmitpriv;
|
pstaxmitpriv = &psta->sta_xmitpriv;
|
||||||
|
|
||||||
spin_lock_bh(&pxmitpriv->lock);
|
spin_lock_bh(&pxmitpriv->lock);
|
||||||
|
@ -426,7 +415,6 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
|
||||||
|
|
||||||
_cancel_timer_ex(&preorder_ctrl->reordering_ctrl_timer);
|
_cancel_timer_ex(&preorder_ctrl->reordering_ctrl_timer);
|
||||||
|
|
||||||
|
|
||||||
ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
||||||
|
|
||||||
spin_lock_bh(&ppending_recvframe_queue->lock);
|
spin_lock_bh(&ppending_recvframe_queue->lock);
|
||||||
|
@ -572,7 +560,6 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
||||||
phead = &(pstapriv->sta_hash[index]);
|
phead = &(pstapriv->sta_hash[index]);
|
||||||
plist = get_next(phead);
|
plist = get_next(phead);
|
||||||
|
|
||||||
|
|
||||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -660,7 +647,6 @@ u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr)
|
||||||
}
|
}
|
||||||
spin_unlock_bh(&(pacl_node_q->lock));
|
spin_unlock_bh(&(pacl_node_q->lock));
|
||||||
|
|
||||||
|
|
||||||
if (pacl_list->mode == 1)/* accept unless in deny list */
|
if (pacl_list->mode == 1)/* accept unless in deny list */
|
||||||
{
|
{
|
||||||
res = (match == true) ? false:true;
|
res = (match == true) ? false:true;
|
||||||
|
|
|
@ -68,7 +68,6 @@ static u8 rtw_basic_rate_mix[7] = {
|
||||||
IEEE80211_OFDM_RATE_24MB|IEEE80211_BASIC_RATE_MASK
|
IEEE80211_OFDM_RATE_24MB|IEEE80211_BASIC_RATE_MASK
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
int cckrates_included(unsigned char *rate, int ratelen)
|
int cckrates_included(unsigned char *rate, int ratelen)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -138,7 +137,6 @@ u8 judge_network_type(struct adapter *padapter, unsigned char *rate, int ratelen
|
||||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||||
|
|
||||||
|
|
||||||
if (pmlmeext->cur_channel > 14)
|
if (pmlmeext->cur_channel > 14)
|
||||||
{
|
{
|
||||||
if (pmlmeinfo->HT_enable)
|
if (pmlmeinfo->HT_enable)
|
||||||
|
@ -635,7 +633,6 @@ void read_cam(struct adapter *padapter , u8 entry)
|
||||||
DBG_8192C("*********************************\n");
|
DBG_8192C("*********************************\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void write_cam(struct adapter *padapter, u8 entry, u16 ctrl, u8 *mac, u8 *key)
|
void write_cam(struct adapter *padapter, u8 entry, u16 ctrl, u8 *mac, u8 *key)
|
||||||
{
|
{
|
||||||
unsigned int i, val, addr;
|
unsigned int i, val, addr;
|
||||||
|
@ -711,7 +708,6 @@ int WFD_info_handler(struct adapter *padapter, struct ndis_802_11_variable_ies *
|
||||||
u8 wfd_ie[ 128 ] = { 0x00 };
|
u8 wfd_ie[ 128 ] = { 0x00 };
|
||||||
u32 wfd_ielen = 0;
|
u32 wfd_ielen = 0;
|
||||||
|
|
||||||
|
|
||||||
pwdinfo = &padapter->wdinfo;
|
pwdinfo = &padapter->wdinfo;
|
||||||
if ( rtw_get_wfd_ie( ( u8* ) pIE, pIE->Length, wfd_ie, &wfd_ielen ) )
|
if ( rtw_get_wfd_ie( ( u8* ) pIE, pIE->Length, wfd_ie, &wfd_ielen ) )
|
||||||
{
|
{
|
||||||
|
@ -922,7 +918,6 @@ static void bwmode_update_check(struct adapter *padapter, struct ndis_802_11_var
|
||||||
new_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
|
new_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((new_bwmode!= pmlmeext->cur_bwmode) || (new_ch_offset!=pmlmeext->cur_ch_offset))
|
if ((new_bwmode!= pmlmeext->cur_bwmode) || (new_ch_offset!=pmlmeext->cur_ch_offset))
|
||||||
{
|
{
|
||||||
pmlmeinfo->bwmode_updated = true;
|
pmlmeinfo->bwmode_updated = true;
|
||||||
|
@ -938,7 +933,6 @@ static void bwmode_update_check(struct adapter *padapter, struct ndis_802_11_var
|
||||||
pmlmeinfo->bwmode_updated = false;
|
pmlmeinfo->bwmode_updated = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (true == pmlmeinfo->bwmode_updated)
|
if (true == pmlmeinfo->bwmode_updated)
|
||||||
{
|
{
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
|
@ -947,7 +941,6 @@ static void bwmode_update_check(struct adapter *padapter, struct ndis_802_11_var
|
||||||
|
|
||||||
/* set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); */
|
/* set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); */
|
||||||
|
|
||||||
|
|
||||||
/* update ap's stainfo */
|
/* update ap's stainfo */
|
||||||
psta = rtw_get_stainfo(pstapriv, cur_network->MacAddress);
|
psta = rtw_get_stainfo(pstapriv, cur_network->MacAddress);
|
||||||
if (psta)
|
if (psta)
|
||||||
|
@ -1048,7 +1041,6 @@ void HT_info_handler(struct adapter *padapter, struct ndis_802_11_variable_ies *
|
||||||
|
|
||||||
if (phtpriv->ht_option == false) return;
|
if (phtpriv->ht_option == false) return;
|
||||||
|
|
||||||
|
|
||||||
if (pIE->Length > sizeof(struct HT_info_element))
|
if (pIE->Length > sizeof(struct HT_info_element))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ static void _init_txservq(struct tx_servq *ptxservq)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv)
|
void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -146,7 +145,6 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
|
||||||
|
|
||||||
pxmitpriv->frag_len = MAX_FRAG_THRESHOLD;
|
pxmitpriv->frag_len = MAX_FRAG_THRESHOLD;
|
||||||
|
|
||||||
|
|
||||||
/* init xmit_buf */
|
/* init xmit_buf */
|
||||||
_rtw_init_queue(&pxmitpriv->free_xmitbuf_queue);
|
_rtw_init_queue(&pxmitpriv->free_xmitbuf_queue);
|
||||||
_rtw_init_queue(&pxmitpriv->pending_xmitbuf_queue);
|
_rtw_init_queue(&pxmitpriv->pending_xmitbuf_queue);
|
||||||
|
@ -313,7 +311,6 @@ void rtw_mfree_xmit_priv_lock (struct xmit_priv *pxmitpriv)
|
||||||
_rtw_free_sema(&pxmitpriv->terminate_xmitthread_sema);
|
_rtw_free_sema(&pxmitpriv->terminate_xmitthread_sema);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv)
|
void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -353,7 +350,6 @@ void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv)
|
||||||
rtw_vmfree(pxmitpriv->pallocated_frame_buf, NR_XMITFRAME * sizeof(struct xmit_frame) + 4);
|
rtw_vmfree(pxmitpriv->pallocated_frame_buf, NR_XMITFRAME * sizeof(struct xmit_frame) + 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (pxmitpriv->pallocated_xmitbuf) {
|
if (pxmitpriv->pallocated_xmitbuf) {
|
||||||
rtw_vmfree(pxmitpriv->pallocated_xmitbuf, NR_XMITBUFF * sizeof(struct xmit_buf) + 4);
|
rtw_vmfree(pxmitpriv->pallocated_xmitbuf, NR_XMITBUFF * sizeof(struct xmit_buf) + 4);
|
||||||
}
|
}
|
||||||
|
@ -465,7 +461,6 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* check ERP protection */
|
/* check ERP protection */
|
||||||
if (psta->rtsen || psta->cts2self)
|
if (psta->rtsen || psta->cts2self)
|
||||||
{
|
{
|
||||||
|
@ -574,7 +569,6 @@ static void set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib)
|
||||||
struct iphdr ip_hdr;
|
struct iphdr ip_hdr;
|
||||||
s32 UserPriority = 0;
|
s32 UserPriority = 0;
|
||||||
|
|
||||||
|
|
||||||
_rtw_open_pktfile(ppktfile->pkt, ppktfile);
|
_rtw_open_pktfile(ppktfile->pkt, ppktfile);
|
||||||
_rtw_pktfile_read(ppktfile, (unsigned char*)ðerhdr, ETH_HLEN);
|
_rtw_pktfile_read(ppktfile, (unsigned char*)ðerhdr, ETH_HLEN);
|
||||||
|
|
||||||
|
@ -615,7 +609,6 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
|
||||||
|
|
||||||
pattrib->ether_type = ntohs(etherhdr.h_proto);
|
pattrib->ether_type = ntohs(etherhdr.h_proto);
|
||||||
|
|
||||||
|
|
||||||
memcpy(pattrib->dst, ðerhdr.h_dest, ETH_ALEN);
|
memcpy(pattrib->dst, ðerhdr.h_dest, ETH_ALEN);
|
||||||
memcpy(pattrib->src, ðerhdr.h_source, ETH_ALEN);
|
memcpy(pattrib->src, ðerhdr.h_source, ETH_ALEN);
|
||||||
|
|
||||||
|
@ -770,7 +763,6 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (pattrib->encrypt)
|
switch (pattrib->encrypt)
|
||||||
|
@ -915,7 +907,6 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
|
||||||
if (pattrib->qos_en)
|
if (pattrib->qos_en)
|
||||||
priority[0]=(u8)pxmitframe->attrib.priority;
|
priority[0]=(u8)pxmitframe->attrib.priority;
|
||||||
|
|
||||||
|
|
||||||
rtw_secmicappend(&micdata, &priority[0], 4);
|
rtw_secmicappend(&micdata, &priority[0], 4);
|
||||||
|
|
||||||
payload =pframe;
|
payload =pframe;
|
||||||
|
@ -1301,7 +1292,6 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!(psta->state &_FW_LINKED))
|
if (!(psta->state &_FW_LINKED))
|
||||||
{
|
{
|
||||||
DBG_871X("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, psta->state);
|
DBG_871X("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, psta->state);
|
||||||
|
@ -1397,7 +1387,6 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
|
||||||
mpdu_len -= pattrib->icv_len;
|
mpdu_len -= pattrib->icv_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (bmcst) {
|
if (bmcst) {
|
||||||
/* don't do fragment to broadcat/multicast packets */
|
/* don't do fragment to broadcat/multicast packets */
|
||||||
mem_sz = _rtw_pktfile_read(&pktfile, pframe, pattrib->pktlen);
|
mem_sz = _rtw_pktfile_read(&pktfile, pframe, pattrib->pktlen);
|
||||||
|
@ -1824,7 +1813,6 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)
|
||||||
DBG_871X("DBG_XMIT_BUF_EXT ALLOC no =%d, free_xmit_extbuf_cnt =%d\n", pxmitbuf->no, pxmitpriv->free_xmit_extbuf_cnt);
|
DBG_871X("DBG_XMIT_BUF_EXT ALLOC no =%d, free_xmit_extbuf_cnt =%d\n", pxmitbuf->no, pxmitpriv->free_xmit_extbuf_cnt);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
pxmitbuf->priv_data = NULL;
|
pxmitbuf->priv_data = NULL;
|
||||||
/* pxmitbuf->ext_tag = true; */
|
/* pxmitbuf->ext_tag = true; */
|
||||||
|
|
||||||
|
@ -2419,10 +2407,8 @@ void rtw_alloc_hwxmits(struct adapter *padapter)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_free_hwxmits(struct adapter *padapter)
|
void rtw_free_hwxmits(struct adapter *padapter)
|
||||||
|
@ -2550,7 +2536,6 @@ static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
|
||||||
if (skb_is_nonlinear(skb))
|
if (skb_is_nonlinear(skb))
|
||||||
DEBUG_ERR("%s(): skb_is_nonlinear!!\n", __FUNCTION__);
|
DEBUG_ERR("%s(): skb_is_nonlinear!!\n", __FUNCTION__);
|
||||||
|
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18))
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18))
|
||||||
res = skb_linearize(skb, GFP_ATOMIC);
|
res = skb_linearize(skb, GFP_ATOMIC);
|
||||||
#else /* (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)) */
|
#else /* (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)) */
|
||||||
|
@ -2791,11 +2776,9 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr
|
||||||
if (bmcst)
|
if (bmcst)
|
||||||
pattrib->qsel = 0x11;/* HIQ */
|
pattrib->qsel = 0x11;/* HIQ */
|
||||||
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (bmcst)
|
if (bmcst)
|
||||||
{
|
{
|
||||||
spin_lock_bh(&psta->sleep_q.lock);
|
spin_lock_bh(&psta->sleep_q.lock);
|
||||||
|
@ -2821,7 +2804,6 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
spin_lock_bh(&psta->sleep_q.lock);
|
spin_lock_bh(&psta->sleep_q.lock);
|
||||||
|
|
||||||
if (psta->state&WIFI_SLEEP_STATE)
|
if (psta->state&WIFI_SLEEP_STATE)
|
||||||
|
@ -2946,7 +2928,6 @@ void stop_sta_xmit(struct adapter *padapter, struct sta_info *psta)
|
||||||
/* for BC/MC Frames */
|
/* for BC/MC Frames */
|
||||||
psta_bmc = rtw_get_bcmc_stainfo(padapter);
|
psta_bmc = rtw_get_bcmc_stainfo(padapter);
|
||||||
|
|
||||||
|
|
||||||
spin_lock_bh(&pxmitpriv->lock);
|
spin_lock_bh(&pxmitpriv->lock);
|
||||||
|
|
||||||
psta->state |= WIFI_SLEEP_STATE;
|
psta->state |= WIFI_SLEEP_STATE;
|
||||||
|
@ -2956,15 +2937,12 @@ void stop_sta_xmit(struct adapter *padapter, struct sta_info *psta)
|
||||||
dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->vo_q.sta_pending);
|
dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->vo_q.sta_pending);
|
||||||
rtw_list_delete(&(pstaxmitpriv->vo_q.tx_pending));
|
rtw_list_delete(&(pstaxmitpriv->vo_q.tx_pending));
|
||||||
|
|
||||||
|
|
||||||
dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->vi_q.sta_pending);
|
dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->vi_q.sta_pending);
|
||||||
rtw_list_delete(&(pstaxmitpriv->vi_q.tx_pending));
|
rtw_list_delete(&(pstaxmitpriv->vi_q.tx_pending));
|
||||||
|
|
||||||
|
|
||||||
dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->be_q.sta_pending);
|
dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->be_q.sta_pending);
|
||||||
rtw_list_delete(&(pstaxmitpriv->be_q.tx_pending));
|
rtw_list_delete(&(pstaxmitpriv->be_q.tx_pending));
|
||||||
|
|
||||||
|
|
||||||
dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->bk_q.sta_pending);
|
dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->bk_q.sta_pending);
|
||||||
rtw_list_delete(&(pstaxmitpriv->bk_q.tx_pending));
|
rtw_list_delete(&(pstaxmitpriv->bk_q.tx_pending));
|
||||||
|
|
||||||
|
@ -2973,7 +2951,6 @@ void stop_sta_xmit(struct adapter *padapter, struct sta_info *psta)
|
||||||
dequeue_xmitframes_to_sleeping_queue(padapter, psta_bmc, &pstaxmitpriv->be_q.sta_pending);
|
dequeue_xmitframes_to_sleeping_queue(padapter, psta_bmc, &pstaxmitpriv->be_q.sta_pending);
|
||||||
rtw_list_delete(&(pstaxmitpriv->be_q.tx_pending));
|
rtw_list_delete(&(pstaxmitpriv->be_q.tx_pending));
|
||||||
|
|
||||||
|
|
||||||
spin_unlock_bh(&pxmitpriv->lock);
|
spin_unlock_bh(&pxmitpriv->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3055,7 +3032,6 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
|
||||||
*/
|
*/
|
||||||
rtw_hal_xmitframe_enqueue(padapter, pxmitframe);
|
rtw_hal_xmitframe_enqueue(padapter, pxmitframe);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* for BC/MC Frames */
|
/* for BC/MC Frames */
|
||||||
|
@ -3081,7 +3057,6 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
|
||||||
else
|
else
|
||||||
pxmitframe->attrib.mdata = 0;
|
pxmitframe->attrib.mdata = 0;
|
||||||
|
|
||||||
|
|
||||||
pxmitframe->attrib.triggered = 1;
|
pxmitframe->attrib.triggered = 1;
|
||||||
/*
|
/*
|
||||||
spin_unlock_bh(&psta_bmc->sleep_q.lock);
|
spin_unlock_bh(&psta_bmc->sleep_q.lock);
|
||||||
|
@ -3152,7 +3127,6 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||||
|
|
||||||
|
|
||||||
/* spin_lock_bh(&psta->sleep_q.lock); */
|
/* spin_lock_bh(&psta->sleep_q.lock); */
|
||||||
spin_lock_bh(&pxmitpriv->lock);
|
spin_lock_bh(&pxmitpriv->lock);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue