mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +00:00
rtl8188eu: Fix more sparse warnings
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
e36aed3385
commit
7c7b83836e
43 changed files with 677 additions and 862 deletions
|
@ -58,15 +58,9 @@ static void update_BCNTIM(_adapter *padapter)
|
|||
WLAN_BSSID_EX *pnetwork_mlmeext = &(pmlmeinfo->network);
|
||||
unsigned char *pie = pnetwork_mlmeext->IEs;
|
||||
|
||||
#if 0
|
||||
|
||||
|
||||
/* update TIM IE */
|
||||
/* if(pstapriv->tim_bitmap) */
|
||||
#endif
|
||||
if (_TRUE) {
|
||||
u8 *p, *dst_ie, *premainder_ie = NULL, *pbackup_remainder_ie = NULL;
|
||||
u16 tim_bitmap_le;
|
||||
__le16 tim_bitmap_le;
|
||||
uint offset, tmp_len, tim_ielen, tim_ie_offset, remainder_ielen;
|
||||
|
||||
tim_bitmap_le = cpu_to_le16(pstapriv->tim_bitmap);
|
||||
|
@ -1102,25 +1096,10 @@ static void update_hw_ht_param(_adapter *padapter)
|
|||
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_AMPDU_FACTOR, (u8 *)(&max_AMPDU_len));
|
||||
|
||||
/* */
|
||||
/* Config SM Power Save setting */
|
||||
/* */
|
||||
pmlmeinfo->SM_PS = (pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info & 0x0C) >> 2;
|
||||
if (pmlmeinfo->SM_PS == WLAN_HT_CAP_SM_PS_STATIC) {
|
||||
#if 0
|
||||
u8 i;
|
||||
/* update the MCS rates */
|
||||
for (i = 0; i < 16; i++)
|
||||
pmlmeinfo->HT_caps.HT_cap_element.MCS_rate[i] &= MCS_rate_1R[i];
|
||||
#endif
|
||||
pmlmeinfo->SM_PS = (le16_to_cpu(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info) & 0x0C) >> 2;
|
||||
if (pmlmeinfo->SM_PS == WLAN_HT_CAP_SM_PS_STATIC)
|
||||
RTW_INFO("%s(): WLAN_HT_CAP_SM_PS_STATIC\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
/* */
|
||||
/* Config current HT Protection mode. */
|
||||
/* */
|
||||
/* pmlmeinfo->HT_protection = pmlmeinfo->HT_info.infos[1] & 0x3; */
|
||||
|
||||
}
|
||||
|
||||
static void rtw_ap_check_scan(_adapter *padapter)
|
||||
|
@ -1759,19 +1738,19 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
|||
|
||||
/* Update HT Capabilities Info field */
|
||||
if (pmlmepriv->htpriv.sgi_20m == _FALSE)
|
||||
pht_cap->cap_info &= ~(IEEE80211_HT_CAP_SGI_20);
|
||||
pht_cap->cap_info &= cpu_to_le16(~(IEEE80211_HT_CAP_SGI_20));
|
||||
|
||||
if (pmlmepriv->htpriv.sgi_40m == _FALSE)
|
||||
pht_cap->cap_info &= ~(IEEE80211_HT_CAP_SGI_40);
|
||||
pht_cap->cap_info &= cpu_to_le16(~(IEEE80211_HT_CAP_SGI_40));
|
||||
|
||||
if (!TEST_FLAG(pmlmepriv->htpriv.ldpc_cap, LDPC_HT_ENABLE_RX))
|
||||
pht_cap->cap_info &= ~(IEEE80211_HT_CAP_LDPC_CODING);
|
||||
pht_cap->cap_info &= cpu_to_le16(~(IEEE80211_HT_CAP_LDPC_CODING));
|
||||
|
||||
if (!TEST_FLAG(pmlmepriv->htpriv.stbc_cap, STBC_HT_ENABLE_TX))
|
||||
pht_cap->cap_info &= ~(IEEE80211_HT_CAP_TX_STBC);
|
||||
pht_cap->cap_info &= cpu_to_le16(~(IEEE80211_HT_CAP_TX_STBC));
|
||||
|
||||
if (!TEST_FLAG(pmlmepriv->htpriv.stbc_cap, STBC_HT_ENABLE_RX))
|
||||
pht_cap->cap_info &= ~(IEEE80211_HT_CAP_RX_STBC_3R);
|
||||
pht_cap->cap_info &= cpu_to_le16(~(IEEE80211_HT_CAP_RX_STBC_3R));
|
||||
|
||||
/* Update A-MPDU Parameters field */
|
||||
pht_cap->ampdu_params_info &= ~(IEEE80211_HT_CAP_AMPDU_FACTOR | IEEE80211_HT_CAP_AMPDU_DENSITY);
|
||||
|
@ -1995,7 +1974,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
|||
}
|
||||
|
||||
#if CONFIG_RTW_MACADDR_ACL
|
||||
void rtw_macaddr_acl_init(_adapter *adapter)
|
||||
static void rtw_macaddr_acl_init(_adapter *adapter)
|
||||
{
|
||||
struct sta_priv *stapriv = &adapter->stapriv;
|
||||
struct wlan_acl_pool *acl = &stapriv->acl_list;
|
||||
|
@ -2014,7 +1993,7 @@ void rtw_macaddr_acl_init(_adapter *adapter)
|
|||
_exit_critical_bh(&(acl_node_q->lock), &irqL);
|
||||
}
|
||||
|
||||
void rtw_macaddr_acl_deinit(_adapter *adapter)
|
||||
static void rtw_macaddr_acl_deinit(_adapter *adapter)
|
||||
{
|
||||
struct sta_priv *stapriv = &adapter->stapriv;
|
||||
struct wlan_acl_pool *acl = &stapriv->acl_list;
|
||||
|
@ -2290,7 +2269,7 @@ int rtw_ap_set_wep_key(_adapter *padapter, u8 *key, u8 keylen, int keyid, u8 set
|
|||
return rtw_ap_set_key(padapter, key, alg, keyid, set_tx);
|
||||
}
|
||||
|
||||
u8 rtw_ap_bmc_frames_hdl(_adapter *padapter)
|
||||
static u8 rtw_ap_bmc_frames_hdl(_adapter *padapter)
|
||||
{
|
||||
#define HIQ_XMIT_COUNTS (6)
|
||||
_irqL irqL;
|
||||
|
@ -2577,7 +2556,7 @@ static void update_bcn_htinfo_ie(_adapter *padapter)
|
|||
}
|
||||
|
||||
/* to update ht_op_mode*/
|
||||
*(u16 *)(pht_info->infos + 1) = cpu_to_le16(pmlmepriv->ht_op_mode);
|
||||
*(__le16 *)(pht_info->infos + 1) = cpu_to_le16(pmlmepriv->ht_op_mode);
|
||||
|
||||
}
|
||||
|
||||
|
@ -2942,7 +2921,7 @@ int rtw_ht_operation_update(_adapter *padapter)
|
|||
if (pmlmepriv->num_sta_no_ht /*||
|
||||
(pmlmepriv->ht_op_mode & HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT)*/)
|
||||
new_op_mode = OP_MODE_MIXED;
|
||||
else if ((phtpriv_ap->ht_cap.cap_info & IEEE80211_HT_CAP_SUP_WIDTH)
|
||||
else if ((phtpriv_ap->ht_cap.cap_info & cpu_to_le16(IEEE80211_HT_CAP_SUP_WIDTH))
|
||||
&& pmlmepriv->num_sta_ht_20mhz)
|
||||
new_op_mode = OP_MODE_20MHZ_HT_STA_ASSOCED;
|
||||
else if (ATOMIC_READ(&pmlmepriv->olbc_ht))
|
||||
|
@ -3434,7 +3413,8 @@ void sta_info_update(_adapter *padapter, struct sta_info *psta)
|
|||
psta->htpriv.ht_option = _TRUE;
|
||||
psta->qos_option = 1;
|
||||
|
||||
psta->htpriv.smps_cap = (psta->htpriv.ht_cap.cap_info & IEEE80211_HT_CAP_SM_PS) >> 2;
|
||||
psta->htpriv.smps_cap = (le16_to_cpu(psta->htpriv.ht_cap.cap_info) &
|
||||
IEEE80211_HT_CAP_SM_PS) >> 2;
|
||||
} else
|
||||
psta->htpriv.ht_option = _FALSE;
|
||||
|
||||
|
|
|
@ -1518,11 +1518,11 @@ struct dhcpMessage {
|
|||
|
||||
void dhcp_flag_bcast(_adapter *priv, struct sk_buff *skb)
|
||||
{
|
||||
if (skb == NULL)
|
||||
if (!skb)
|
||||
return;
|
||||
|
||||
if (!priv->ethBrExtInfo.dhcp_bcst_disable) {
|
||||
unsigned short protocol = *((unsigned short *)(skb->data + 2 * ETH_ALEN));
|
||||
__be16 protocol = *((__be16 *)(skb->data + 2 * ETH_ALEN));
|
||||
|
||||
if (protocol == __constant_htons(ETH_P_IP)) { /* IP */
|
||||
struct iphdr *iph = (struct iphdr *)(skb->data + ETH_HLEN);
|
||||
|
@ -1556,7 +1556,6 @@ void dhcp_flag_bcast(_adapter *priv, struct sk_buff *skb)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void *scdb_findEntry(_adapter *priv, unsigned char *macAddr,
|
||||
unsigned char *ipAddr)
|
||||
{
|
||||
|
|
|
@ -2114,7 +2114,7 @@ exit:
|
|||
return res;
|
||||
}
|
||||
|
||||
u8 _rtw_set_chplan_cmd(_adapter *adapter, int flags, u8 chplan, const struct country_chplan *country_ent, u8 swconfig)
|
||||
static u8 _rtw_set_chplan_cmd(_adapter *adapter, int flags, u8 chplan, const struct country_chplan *country_ent, u8 swconfig)
|
||||
{
|
||||
struct cmd_obj *cmdobj;
|
||||
struct SetChannelPlan_param *parm;
|
||||
|
@ -2659,7 +2659,7 @@ void rtw_iface_dynamic_chk_wk_hdl(_adapter *padapter)
|
|||
#endif
|
||||
|
||||
}
|
||||
void rtw_dynamic_chk_wk_hdl(_adapter *padapter)
|
||||
static void rtw_dynamic_chk_wk_hdl(_adapter *padapter)
|
||||
{
|
||||
rtw_mi_dynamic_chk_wk_hdl(padapter);
|
||||
|
||||
|
@ -2819,7 +2819,7 @@ exit:
|
|||
|
||||
}
|
||||
|
||||
void rtw_dm_in_lps_hdl(_adapter *padapter)
|
||||
static void rtw_dm_in_lps_hdl(_adapter *padapter)
|
||||
{
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_DM_IN_LPS, NULL);
|
||||
}
|
||||
|
@ -2860,7 +2860,7 @@ exit:
|
|||
|
||||
}
|
||||
|
||||
void rtw_lps_change_dtim_hdl(_adapter *padapter, u8 dtim)
|
||||
static void rtw_lps_change_dtim_hdl(_adapter *padapter, u8 dtim)
|
||||
{
|
||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
||||
|
||||
|
@ -2942,7 +2942,7 @@ exit:
|
|||
}
|
||||
|
||||
#if (RATE_ADAPTIVE_SUPPORT == 1)
|
||||
void rpt_timer_setting_wk_hdl(_adapter *padapter, u16 minRptTime)
|
||||
static void rpt_timer_setting_wk_hdl(_adapter *padapter, u16 minRptTime)
|
||||
{
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_RPT_TIMER_SETTING, (u8 *)(&minRptTime));
|
||||
}
|
||||
|
@ -3039,7 +3039,7 @@ exit:
|
|||
}
|
||||
#endif
|
||||
|
||||
void rtw_dm_ra_mask_hdl(_adapter *padapter, struct sta_info *psta)
|
||||
static void rtw_dm_ra_mask_hdl(_adapter *padapter, struct sta_info *psta)
|
||||
{
|
||||
if (psta)
|
||||
set_sta_rate(padapter, psta);
|
||||
|
@ -3081,18 +3081,18 @@ exit:
|
|||
|
||||
}
|
||||
|
||||
void power_saving_wk_hdl(_adapter *padapter)
|
||||
static void power_saving_wk_hdl(_adapter *padapter)
|
||||
{
|
||||
rtw_ps_processor(padapter);
|
||||
}
|
||||
|
||||
/* add for CONFIG_IEEE80211W, none 11w can use it */
|
||||
void reset_securitypriv_hdl(_adapter *padapter)
|
||||
static void reset_securitypriv_hdl(_adapter *padapter)
|
||||
{
|
||||
rtw_reset_securitypriv(padapter);
|
||||
}
|
||||
|
||||
void free_assoc_resources_hdl(_adapter *padapter)
|
||||
static void free_assoc_resources_hdl(_adapter *padapter)
|
||||
{
|
||||
rtw_free_assoc_resources(padapter, 1);
|
||||
}
|
||||
|
@ -3140,12 +3140,11 @@ exit:
|
|||
}
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
static u8 _p2p_roch_cmd(_adapter *adapter
|
||||
, u64 cookie, struct wireless_dev *wdev
|
||||
, struct ieee80211_channel *ch, enum nl80211_channel_type ch_type
|
||||
, unsigned int duration
|
||||
, u8 flags
|
||||
)
|
||||
static u8 _p2p_roch_cmd(_adapter *adapter, u64 cookie,
|
||||
struct wireless_dev *wdev,
|
||||
struct ieee80211_channel *ch,
|
||||
enum nl80211_channel_type ch_type,
|
||||
unsigned int duration, u8 flags)
|
||||
{
|
||||
struct cmd_obj *cmdobj;
|
||||
struct drvextra_cmd_parm *parm;
|
||||
|
@ -4065,7 +4064,7 @@ inline u8 rtw_customer_str_write_cmd(_adapter *adapter, const u8 *cstr)
|
|||
}
|
||||
#endif /* CONFIG_RTW_CUSTOMER_STR */
|
||||
|
||||
u8 rtw_c2h_wk_cmd(PADAPTER padapter, u8 *pbuf, u16 length, u8 type)
|
||||
static u8 rtw_c2h_wk_cmd(PADAPTER padapter, u8 *pbuf, u16 length, u8 type)
|
||||
{
|
||||
struct cmd_obj *ph2c;
|
||||
struct drvextra_cmd_parm *pdrvextra_cmd_parm;
|
||||
|
@ -4183,7 +4182,7 @@ exit:
|
|||
}
|
||||
#endif /* CONFIG_FW_C2H_REG */
|
||||
|
||||
u8 session_tracker_cmd(_adapter *adapter, u8 cmd, struct sta_info *sta, u8 *local_naddr, u8 *local_port, u8 *remote_naddr, u8 *remote_port)
|
||||
static u8 session_tracker_cmd(_adapter *adapter, u8 cmd, struct sta_info *sta, u8 *local_naddr, u8 *local_port, u8 *remote_naddr, u8 *remote_port)
|
||||
{
|
||||
struct cmd_priv *cmdpriv = &adapter->cmdpriv;
|
||||
struct cmd_obj *cmdobj;
|
||||
|
@ -4249,7 +4248,7 @@ inline u8 session_tracker_del_cmd(_adapter *adapter, struct sta_info *sta, u8 *l
|
|||
return session_tracker_cmd(adapter, ST_CMD_DEL, sta, local_naddr, local_port, remote_naddr, remote_port);
|
||||
}
|
||||
|
||||
void session_tracker_chk_for_sta(_adapter *adapter, struct sta_info *sta)
|
||||
static void session_tracker_chk_for_sta(_adapter *adapter, struct sta_info *sta)
|
||||
{
|
||||
struct st_ctl_t *st_ctl = &sta->st_ctl;
|
||||
int i;
|
||||
|
@ -4331,7 +4330,7 @@ exit:
|
|||
return;
|
||||
}
|
||||
|
||||
void session_tracker_chk_for_adapter(_adapter *adapter)
|
||||
static void session_tracker_chk_for_adapter(_adapter *adapter)
|
||||
{
|
||||
struct sta_priv *stapriv = &adapter->stapriv;
|
||||
struct sta_info *sta;
|
||||
|
@ -4363,7 +4362,7 @@ void session_tracker_chk_for_adapter(_adapter *adapter)
|
|||
#endif
|
||||
}
|
||||
|
||||
void session_tracker_cmd_hdl(_adapter *adapter, struct st_cmd_parm *parm)
|
||||
static void session_tracker_cmd_hdl(_adapter *adapter, struct st_cmd_parm *parm)
|
||||
{
|
||||
u8 cmd = parm->cmd;
|
||||
struct sta_info *sta = parm->sta;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <hal_data.h>
|
||||
|
||||
#ifdef CONFIG_RTW_DEBUG
|
||||
const char *rtw_log_level_str[] = {
|
||||
static const char *rtw_log_level_str[] = {
|
||||
"_DRV_NONE_ = 0",
|
||||
"_DRV_ALWAYS_ = 1",
|
||||
"_DRV_ERR_ = 2",
|
||||
|
@ -382,9 +382,9 @@ void rtw_sink_rtp_seq_dbg(_adapter *adapter, _pkt *pkt)
|
|||
{
|
||||
struct recv_priv *precvpriv = &(adapter->recvpriv);
|
||||
if (precvpriv->sink_udpport > 0) {
|
||||
if (*((u16 *)((pkt->data) + 0x24)) == cpu_to_be16(precvpriv->sink_udpport)) {
|
||||
if (*((__be16 *)((pkt->data) + 0x24)) == cpu_to_be16(precvpriv->sink_udpport)) {
|
||||
precvpriv->pre_rtp_rxseq = precvpriv->cur_rtp_rxseq;
|
||||
precvpriv->cur_rtp_rxseq = be16_to_cpu(*((u16 *)((pkt->data) + 0x2C)));
|
||||
precvpriv->cur_rtp_rxseq = be16_to_cpu(*((__be16 *)((pkt->data) + 0x2C)));
|
||||
if (precvpriv->pre_rtp_rxseq + 1 != precvpriv->cur_rtp_rxseq)
|
||||
RTW_INFO("%s : RTP Seq num from %d to %d\n", __FUNCTION__, precvpriv->pre_rtp_rxseq, precvpriv->cur_rtp_rxseq);
|
||||
}
|
||||
|
@ -1354,10 +1354,10 @@ int proc_get_survey_info(struct seq_file *m, void *v)
|
|||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
phead = get_list_head(queue);
|
||||
if (!phead)
|
||||
return 0;
|
||||
goto exit;
|
||||
plist = get_next(phead);
|
||||
if (!plist)
|
||||
return 0;
|
||||
goto exit;
|
||||
|
||||
RTW_PRINT_SEL(m, "%5s %-17s %3s %-3s %-4s %-4s %5s %32s %32s\n", "index", "bssid", "ch", "RSSI", "SdBm", "Noise", "age", "flag", "ssid");
|
||||
while (1) {
|
||||
|
@ -1405,6 +1405,7 @@ int proc_get_survey_info(struct seq_file *m, void *v)
|
|||
pnetwork->network.Ssid.Ssid);
|
||||
plist = get_next(plist);
|
||||
}
|
||||
exit:
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -442,20 +442,20 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv)
|
|||
ie += sz;
|
||||
|
||||
/* beacon interval : 2bytes */
|
||||
*(u16 *)ie = cpu_to_le16((u16)pdev_network->Configuration.BeaconPeriod); /* BCN_INTERVAL; */
|
||||
*(__le16 *)ie = cpu_to_le16((u16)pdev_network->Configuration.BeaconPeriod); /* BCN_INTERVAL; */
|
||||
sz += 2;
|
||||
ie += 2;
|
||||
|
||||
/* capability info */
|
||||
*(u16 *)ie = 0;
|
||||
*(__le16 *)ie = 0;
|
||||
|
||||
*(u16 *)ie |= cpu_to_le16(cap_IBSS);
|
||||
*(__le16 *)ie |= cpu_to_le16(cap_IBSS);
|
||||
|
||||
if (pregistrypriv->preamble == PREAMBLE_SHORT)
|
||||
*(u16 *)ie |= cpu_to_le16(cap_ShortPremble);
|
||||
*(__le16 *)ie |= cpu_to_le16(cap_ShortPremble);
|
||||
|
||||
if (pdev_network->Privacy)
|
||||
*(u16 *)ie |= cpu_to_le16(cap_Privacy);
|
||||
*(__le16 *)ie |= cpu_to_le16(cap_Privacy);
|
||||
|
||||
sz += 2;
|
||||
ie += 2;
|
||||
|
@ -506,37 +506,28 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv)
|
|||
}
|
||||
#endif /* CONFIG_80211N_HT */
|
||||
|
||||
/* pdev_network->IELength = sz; */ /* update IELength */
|
||||
|
||||
|
||||
/* return _SUCCESS; */
|
||||
|
||||
return sz;
|
||||
|
||||
}
|
||||
|
||||
unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
|
||||
{
|
||||
int len;
|
||||
u16 val16;
|
||||
__le16 leval16;
|
||||
unsigned char wpa_oui_type[] = {0x00, 0x50, 0xf2, 0x01};
|
||||
u8 *pbuf = pie;
|
||||
int limit_new = limit;
|
||||
|
||||
while (1) {
|
||||
pbuf = rtw_get_ie(pbuf, _WPA_IE_ID_, &len, limit_new);
|
||||
|
||||
if (pbuf) {
|
||||
|
||||
/* check if oui matches... */
|
||||
if (_rtw_memcmp((pbuf + 2), wpa_oui_type, sizeof(wpa_oui_type)) == _FALSE)
|
||||
|
||||
goto check_next_ie;
|
||||
|
||||
/* check version... */
|
||||
_rtw_memcpy((u8 *)&val16, (pbuf + 6), sizeof(val16));
|
||||
_rtw_memcpy((u8 *)&leval16, (pbuf + 6), sizeof(val16));
|
||||
|
||||
val16 = le16_to_cpu(val16);
|
||||
val16 = le16_to_cpu(leval16);
|
||||
if (val16 != 0x0001)
|
||||
goto check_next_ie;
|
||||
|
||||
|
@ -545,7 +536,6 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
|
|||
return pbuf;
|
||||
|
||||
} else {
|
||||
|
||||
*wpa_ie_len = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1447,7 +1437,7 @@ void dump_ht_cap_ie_content(void *sel, u8 *buf, u32 buf_len)
|
|||
, HT_SUP_MCS_SET_ARG(HT_CAP_ELE_SUP_MCS_SET(buf)));
|
||||
}
|
||||
|
||||
void dump_ht_cap_ie(void *sel, u8 *ie, u32 ie_len)
|
||||
static void dump_ht_cap_ie(void *sel, u8 *ie, u32 ie_len)
|
||||
{
|
||||
u8 *pos = (u8 *)ie;
|
||||
u16 id;
|
||||
|
@ -2487,7 +2477,7 @@ int ieee80211_get_hdrlen(u16 fc)
|
|||
return hdrlen;
|
||||
}
|
||||
|
||||
int rtw_get_cipher_info(struct wlan_network *pnetwork)
|
||||
static int rtw_get_cipher_info(struct wlan_network *pnetwork)
|
||||
{
|
||||
u32 wpa_ielen;
|
||||
unsigned char *pbuf;
|
||||
|
@ -2523,6 +2513,7 @@ int rtw_get_cipher_info(struct wlan_network *pnetwork)
|
|||
void rtw_get_bcn_info(struct wlan_network *pnetwork)
|
||||
{
|
||||
unsigned short cap = 0;
|
||||
__le16 le_cap;
|
||||
u8 bencrypt = 0;
|
||||
/* u8 wpa_ie[255],rsn_ie[255]; */
|
||||
u16 wpa_len = 0, rsn_len = 0;
|
||||
|
@ -2531,8 +2522,8 @@ void rtw_get_bcn_info(struct wlan_network *pnetwork)
|
|||
unsigned int len;
|
||||
unsigned char *p;
|
||||
|
||||
_rtw_memcpy((u8 *)&cap, rtw_get_capability_from_ie(pnetwork->network.IEs), 2);
|
||||
cap = le16_to_cpu(cap);
|
||||
_rtw_memcpy((u8 *)&le_cap, rtw_get_capability_from_ie(pnetwork->network.IEs), 2);
|
||||
cap = le16_to_cpu(le_cap);
|
||||
if (cap & WLAN_CAPABILITY_PRIVACY) {
|
||||
bencrypt = 1;
|
||||
pnetwork->network.Privacy = 1;
|
||||
|
|
|
@ -80,29 +80,28 @@ u8 _rtw_read8(_adapter *adapter, u32 addr)
|
|||
|
||||
u16 _rtw_read16(_adapter *adapter, u32 addr)
|
||||
{
|
||||
u16 r_val;
|
||||
__le16 r_val;
|
||||
/* struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue; */
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||
u16(*_read16)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
__le16(*_read16)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
_read16 = pintfhdl->io_ops._read16;
|
||||
|
||||
r_val = _read16(pintfhdl, addr);
|
||||
return rtw_le16_to_cpu(r_val);
|
||||
return le16_to_cpu(r_val);
|
||||
}
|
||||
|
||||
u32 _rtw_read32(_adapter *adapter, u32 addr)
|
||||
{
|
||||
u32 r_val;
|
||||
__le32 r_val;
|
||||
/* struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue; */
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||
u32(*_read32)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
__le32(*_read32)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
_read32 = pintfhdl->io_ops._read32;
|
||||
|
||||
r_val = _read32(pintfhdl, addr);
|
||||
return rtw_le32_to_cpu(r_val);
|
||||
|
||||
}
|
||||
|
||||
int _rtw_write8(_adapter *adapter, u32 addr, u8 val)
|
||||
|
@ -123,12 +122,14 @@ int _rtw_write16(_adapter *adapter, u32 addr, u16 val)
|
|||
/* struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue; */
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||
int (*_write16)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
|
||||
int (*_write16)(struct intf_hdl *pintfhdl, u32 addr, __le16 val);
|
||||
int ret;
|
||||
__le16 outval;
|
||||
|
||||
_write16 = pintfhdl->io_ops._write16;
|
||||
|
||||
val = rtw_cpu_to_le16(val);
|
||||
ret = _write16(pintfhdl, addr, val);
|
||||
outval = rtw_cpu_to_le16(val);
|
||||
ret = _write16(pintfhdl, addr, outval);
|
||||
|
||||
return RTW_STATUS_CODE(ret);
|
||||
}
|
||||
|
@ -137,12 +138,14 @@ int _rtw_write32(_adapter *adapter, u32 addr, u32 val)
|
|||
/* struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue; */
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||
int (*_write32)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
|
||||
int (*_write32)(struct intf_hdl *pintfhdl, u32 addr, __le32 val);
|
||||
int ret;
|
||||
__le32 outval;
|
||||
|
||||
_write32 = pintfhdl->io_ops._write32;
|
||||
|
||||
val = rtw_cpu_to_le32(val);
|
||||
ret = _write32(pintfhdl, addr, val);
|
||||
outval = rtw_cpu_to_le32(val);
|
||||
ret = _write32(pintfhdl, addr, outval);
|
||||
|
||||
return RTW_STATUS_CODE(ret);
|
||||
}
|
||||
|
@ -303,11 +306,13 @@ int _rtw_write16_async(_adapter *adapter, u32 addr, u16 val)
|
|||
/* struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue; */
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||
int (*_write16_async)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
|
||||
int (*_write16_async)(struct intf_hdl *pintfhdl, u32 addr, __le16 val);
|
||||
int ret;
|
||||
__le16 outval;
|
||||
|
||||
_write16_async = pintfhdl->io_ops._write16_async;
|
||||
val = rtw_cpu_to_le16(val);
|
||||
ret = _write16_async(pintfhdl, addr, val);
|
||||
outval = rtw_cpu_to_le16(val);
|
||||
ret = _write16_async(pintfhdl, addr, outval);
|
||||
|
||||
return RTW_STATUS_CODE(ret);
|
||||
}
|
||||
|
@ -316,11 +321,13 @@ int _rtw_write32_async(_adapter *adapter, u32 addr, u32 val)
|
|||
/* struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue; */
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||
int (*_write32_async)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
|
||||
int (*_write32_async)(struct intf_hdl *pintfhdl, u32 addr, __le32 val);
|
||||
int ret;
|
||||
__le32 outval;
|
||||
|
||||
_write32_async = pintfhdl->io_ops._write32_async;
|
||||
val = rtw_cpu_to_le32(val);
|
||||
ret = _write32_async(pintfhdl, addr, val);
|
||||
outval = rtw_cpu_to_le32(val);
|
||||
ret = _write32_async(pintfhdl, addr, outval);
|
||||
|
||||
return RTW_STATUS_CODE(ret);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ void rtw_mi_update_union_chan_inf(_adapter *adapter, u8 ch, u8 offset , u8 bw)
|
|||
}
|
||||
|
||||
/* Find union about ch, bw, ch_offset of all linked/linking interfaces */
|
||||
int _rtw_mi_get_ch_setting_union(_adapter *adapter, u8 *ch, u8 *bw, u8 *offset, bool include_self)
|
||||
static int _rtw_mi_get_ch_setting_union(_adapter *adapter, u8 *ch, u8 *bw, u8 *offset, bool include_self)
|
||||
{
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
|
||||
_adapter *iface;
|
||||
|
@ -111,7 +111,7 @@ inline int rtw_mi_get_ch_setting_union_no_self(_adapter *adapter, u8 *ch, u8 *bw
|
|||
}
|
||||
|
||||
/* For now, not return union_ch/bw/offset */
|
||||
void _rtw_mi_status(_adapter *adapter, struct mi_state *mstate, bool include_self)
|
||||
static void _rtw_mi_status(_adapter *adapter, struct mi_state *mstate, bool include_self)
|
||||
{
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
|
||||
_adapter *iface;
|
||||
|
@ -667,7 +667,7 @@ void rtw_mi_buddy_xmit_tasklet_schedule(_adapter *padapter)
|
|||
}
|
||||
#endif
|
||||
|
||||
u8 _rtw_mi_busy_traffic_check(_adapter *padapter, void *data)
|
||||
static u8 _rtw_mi_busy_traffic_check(_adapter *padapter, void *data)
|
||||
{
|
||||
u32 passtime;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
@ -1118,7 +1118,7 @@ _adapter *rtw_get_iface_by_hwport(_adapter *padapter, u8 hw_port)
|
|||
/*#define CONFIG_SKB_ALLOCATED*/
|
||||
#define DBG_SKB_PROCESS
|
||||
#ifdef DBG_SKB_PROCESS
|
||||
void rtw_dbg_skb_process(_adapter *padapter, union recv_frame *precvframe, union recv_frame *pcloneframe)
|
||||
static void rtw_dbg_skb_process(_adapter *padapter, union recv_frame *precvframe, union recv_frame *pcloneframe)
|
||||
{
|
||||
_pkt *pkt_copy, *pkt_org;
|
||||
|
||||
|
|
156
core/rtw_mlme.c
156
core/rtw_mlme.c
|
@ -25,7 +25,7 @@ extern void indicate_wx_scan_complete_event(_adapter *padapter);
|
|||
extern u8 rtw_do_join(_adapter *padapter);
|
||||
|
||||
|
||||
sint _rtw_init_mlme_priv(_adapter *padapter)
|
||||
static sint _rtw_init_mlme_priv(_adapter *padapter)
|
||||
{
|
||||
sint i;
|
||||
u8 *pbuf;
|
||||
|
@ -33,14 +33,6 @@ sint _rtw_init_mlme_priv(_adapter *padapter)
|
|||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
sint res = _SUCCESS;
|
||||
|
||||
|
||||
/* We don't need to memset padapter->XXX to zero, because adapter is allocated by rtw_zvmalloc(). */
|
||||
/* _rtw_memset((u8 *)pmlmepriv, 0, sizeof(struct mlme_priv)); */
|
||||
|
||||
|
||||
/*qos_priv*/
|
||||
/*pmlmepriv->qospriv.qos_option = pregistrypriv->wmm_enable;*/
|
||||
|
||||
/*ht_priv*/
|
||||
#ifdef CONFIG_80211N_HT
|
||||
pmlmepriv->htpriv.ampdu_enable = _FALSE;/*set to disabled*/
|
||||
|
@ -274,7 +266,7 @@ exit:
|
|||
}
|
||||
#endif /* defined(CONFIG_WFD) && defined(CONFIG_IOCTL_CFG80211) */
|
||||
|
||||
void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
|
||||
static void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
|
||||
{
|
||||
if (NULL == pmlmepriv) {
|
||||
rtw_warn_on(1);
|
||||
|
@ -292,7 +284,7 @@ exit:
|
|||
return;
|
||||
}
|
||||
|
||||
sint _rtw_enqueue_network(_queue *queue, struct wlan_network *pnetwork)
|
||||
static sint _rtw_enqueue_network(_queue *queue, struct wlan_network *pnetwork)
|
||||
{
|
||||
_irqL irqL;
|
||||
|
||||
|
@ -553,10 +545,9 @@ u8 *rtw_get_capability_from_ie(u8 *ie)
|
|||
|
||||
u16 rtw_get_capability(WLAN_BSSID_EX *bss)
|
||||
{
|
||||
u16 val;
|
||||
__le16 val;
|
||||
|
||||
_rtw_memcpy((u8 *)&val, rtw_get_capability_from_ie(bss->IEs), 2);
|
||||
|
||||
return le16_to_cpu(val);
|
||||
}
|
||||
|
||||
|
@ -668,18 +659,15 @@ inline int is_same_ess(WLAN_BSSID_EX *a, WLAN_BSSID_EX *b)
|
|||
int is_same_network(WLAN_BSSID_EX *src, WLAN_BSSID_EX *dst, u8 feature)
|
||||
{
|
||||
u16 s_cap, d_cap;
|
||||
|
||||
__le16 le_tmp;
|
||||
|
||||
if (rtw_bug_check(dst, src, &s_cap, &d_cap) == _FALSE)
|
||||
return _FALSE;
|
||||
|
||||
_rtw_memcpy((u8 *)&s_cap, rtw_get_capability_from_ie(src->IEs), 2);
|
||||
_rtw_memcpy((u8 *)&d_cap, rtw_get_capability_from_ie(dst->IEs), 2);
|
||||
|
||||
|
||||
s_cap = le16_to_cpu(s_cap);
|
||||
d_cap = le16_to_cpu(d_cap);
|
||||
|
||||
_rtw_memcpy((u8 *)&le_tmp, rtw_get_capability_from_ie(src->IEs), 2);
|
||||
s_cap = le16_to_cpu(le_tmp);
|
||||
_rtw_memcpy((u8 *)&le_tmp, rtw_get_capability_from_ie(dst->IEs), 2);
|
||||
d_cap = le16_to_cpu(le_tmp);
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
if ((feature == 1) && /* 1: P2P supported */
|
||||
|
@ -696,7 +684,6 @@ int is_same_network(WLAN_BSSID_EX *src, WLAN_BSSID_EX *dst, u8 feature)
|
|||
(d_cap & WLAN_CAPABILITY_IBSS)) &&
|
||||
((s_cap & WLAN_CAPABILITY_BSS) ==
|
||||
(d_cap & WLAN_CAPABILITY_BSS)));
|
||||
|
||||
}
|
||||
|
||||
struct wlan_network *_rtw_find_same_network(_queue *scanned_queue, struct wlan_network *network)
|
||||
|
@ -1405,7 +1392,7 @@ static void free_scanqueue(struct mlme_priv *pmlmepriv)
|
|||
|
||||
}
|
||||
|
||||
void rtw_reset_rx_info(struct debug_priv *pdbgpriv)
|
||||
static void rtw_reset_rx_info(struct debug_priv *pdbgpriv)
|
||||
{
|
||||
pdbgpriv->dbg_rx_ampdu_drop_count = 0;
|
||||
pdbgpriv->dbg_rx_ampdu_forced_indicate_count = 0;
|
||||
|
@ -1506,8 +1493,6 @@ void rtw_free_assoc_resources(_adapter *adapter, int lock_scanned_queue)
|
|||
adapter->securitypriv.key_mask = 0;
|
||||
|
||||
rtw_reset_rx_info(pdbgpriv);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1940,39 +1925,13 @@ void rtw_joinbss_event_prehandle(_adapter *adapter, u8 *pbuf)
|
|||
struct wlan_network *pcur_wlan = NULL, *ptarget_wlan = NULL;
|
||||
unsigned int the_same_macaddr = _FALSE;
|
||||
|
||||
|
||||
#ifdef CONFIG_RTL8712
|
||||
/* endian_convert */
|
||||
pnetwork->join_res = le32_to_cpu(pnetwork->join_res);
|
||||
pnetwork->network_type = le32_to_cpu(pnetwork->network_type);
|
||||
pnetwork->network.Length = le32_to_cpu(pnetwork->network.Length);
|
||||
pnetwork->network.Ssid.SsidLength = le32_to_cpu(pnetwork->network.Ssid.SsidLength);
|
||||
pnetwork->network.Privacy = le32_to_cpu(pnetwork->network.Privacy);
|
||||
pnetwork->network.Rssi = le32_to_cpu(pnetwork->network.Rssi);
|
||||
pnetwork->network.NetworkTypeInUse = le32_to_cpu(pnetwork->network.NetworkTypeInUse) ;
|
||||
pnetwork->network.Configuration.ATIMWindow = le32_to_cpu(pnetwork->network.Configuration.ATIMWindow);
|
||||
pnetwork->network.Configuration.BeaconPeriod = le32_to_cpu(pnetwork->network.Configuration.BeaconPeriod);
|
||||
pnetwork->network.Configuration.DSConfig = le32_to_cpu(pnetwork->network.Configuration.DSConfig);
|
||||
pnetwork->network.Configuration.FHConfig.DwellTime = le32_to_cpu(pnetwork->network.Configuration.FHConfig.DwellTime);
|
||||
pnetwork->network.Configuration.FHConfig.HopPattern = le32_to_cpu(pnetwork->network.Configuration.FHConfig.HopPattern);
|
||||
pnetwork->network.Configuration.FHConfig.HopSet = le32_to_cpu(pnetwork->network.Configuration.FHConfig.HopSet);
|
||||
pnetwork->network.Configuration.FHConfig.Length = le32_to_cpu(pnetwork->network.Configuration.FHConfig.Length);
|
||||
pnetwork->network.Configuration.Length = le32_to_cpu(pnetwork->network.Configuration.Length);
|
||||
pnetwork->network.InfrastructureMode = le32_to_cpu(pnetwork->network.InfrastructureMode);
|
||||
pnetwork->network.IELength = le32_to_cpu(pnetwork->network.IELength);
|
||||
#endif
|
||||
|
||||
|
||||
rtw_get_encrypt_decrypt_from_registrypriv(adapter);
|
||||
|
||||
|
||||
|
||||
the_same_macaddr = _rtw_memcmp(pnetwork->network.MacAddress, cur_network->network.MacAddress, ETH_ALEN);
|
||||
|
||||
pnetwork->network.Length = get_WLAN_BSSID_EX_sz(&pnetwork->network);
|
||||
if (pnetwork->network.Length > sizeof(WLAN_BSSID_EX)) {
|
||||
goto ignore_joinbss_callback;
|
||||
}
|
||||
if (pnetwork->network.Length > sizeof(WLAN_BSSID_EX))
|
||||
return;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
|
@ -2446,7 +2405,7 @@ err_2:
|
|||
}
|
||||
#endif
|
||||
|
||||
void rtw_sta_mstatus_disc_rpt(_adapter *adapter, u8 mac_id)
|
||||
static void rtw_sta_mstatus_disc_rpt(_adapter *adapter, u8 mac_id)
|
||||
{
|
||||
struct macid_ctl_t *macid_ctl = &adapter->dvobj->macid_ctl;
|
||||
|
||||
|
@ -3164,7 +3123,7 @@ int rtw_select_roaming_candidate(struct mlme_priv *mlme)
|
|||
|
||||
if (mlme->cur_network_scanned == NULL) {
|
||||
rtw_warn_on(1);
|
||||
goto exit;
|
||||
return ret;
|
||||
}
|
||||
|
||||
_enter_critical_bh(&(mlme->scanned_queue.lock), &irqL);
|
||||
|
@ -3978,10 +3937,10 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
|
|||
|
||||
_rtw_memset(&ht_capie, 0, sizeof(struct rtw_ieee80211_ht_cap));
|
||||
|
||||
ht_capie.cap_info = IEEE80211_HT_CAP_DSSSCCK40;
|
||||
ht_capie.cap_info = cpu_to_le16(IEEE80211_HT_CAP_DSSSCCK40);
|
||||
|
||||
if (phtpriv->sgi_20m)
|
||||
ht_capie.cap_info |= IEEE80211_HT_CAP_SGI_20;
|
||||
ht_capie.cap_info |= cpu_to_le16(IEEE80211_HT_CAP_SGI_20);
|
||||
|
||||
/* Get HT BW */
|
||||
if (in_ie == NULL) {
|
||||
|
@ -4024,23 +3983,23 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
|
|||
}
|
||||
|
||||
if ((cbw40_enable == 1) && (operation_bw == CHANNEL_WIDTH_40)) {
|
||||
ht_capie.cap_info |= IEEE80211_HT_CAP_SUP_WIDTH;
|
||||
ht_capie.cap_info |= cpu_to_le16(IEEE80211_HT_CAP_SUP_WIDTH);
|
||||
if (phtpriv->sgi_40m)
|
||||
ht_capie.cap_info |= IEEE80211_HT_CAP_SGI_40;
|
||||
ht_capie.cap_info |= cpu_to_le16(IEEE80211_HT_CAP_SGI_40);
|
||||
}
|
||||
|
||||
/* todo: disable SM power save mode */
|
||||
ht_capie.cap_info |= IEEE80211_HT_CAP_SM_PS;
|
||||
ht_capie.cap_info |= cpu_to_le16(IEEE80211_HT_CAP_SM_PS);
|
||||
|
||||
/* RX LDPC */
|
||||
if (TEST_FLAG(phtpriv->ldpc_cap, LDPC_HT_ENABLE_RX)) {
|
||||
ht_capie.cap_info |= IEEE80211_HT_CAP_LDPC_CODING;
|
||||
ht_capie.cap_info |= cpu_to_le16(IEEE80211_HT_CAP_LDPC_CODING);
|
||||
RTW_INFO("[HT] Declare supporting RX LDPC\n");
|
||||
}
|
||||
|
||||
/* TX STBC */
|
||||
if (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_TX)) {
|
||||
ht_capie.cap_info |= IEEE80211_HT_CAP_TX_STBC;
|
||||
ht_capie.cap_info |= cpu_to_le16(IEEE80211_HT_CAP_TX_STBC);
|
||||
RTW_INFO("[HT] Declare supporting TX STBC\n");
|
||||
}
|
||||
|
||||
|
@ -4086,13 +4045,11 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
|
|||
RTW_WARN("rf_type:%d or rx_nss:%u is not expected\n", rf_type, hal_spec->rx_nss_num);
|
||||
}
|
||||
|
||||
{
|
||||
rtw_hal_get_def_var(padapter, HAL_DEF_RX_PACKET_OFFSET, &rx_packet_offset);
|
||||
rtw_hal_get_def_var(padapter, HAL_DEF_MAX_RECVBUF_SZ, &max_recvbuf_sz);
|
||||
if (max_recvbuf_sz - rx_packet_offset >= (8191 - 256)) {
|
||||
RTW_INFO("%s IEEE80211_HT_CAP_MAX_AMSDU is set\n", __FUNCTION__);
|
||||
ht_capie.cap_info = ht_capie.cap_info | IEEE80211_HT_CAP_MAX_AMSDU;
|
||||
}
|
||||
rtw_hal_get_def_var(padapter, HAL_DEF_RX_PACKET_OFFSET, &rx_packet_offset);
|
||||
rtw_hal_get_def_var(padapter, HAL_DEF_MAX_RECVBUF_SZ, &max_recvbuf_sz);
|
||||
if (max_recvbuf_sz - rx_packet_offset >= (8191 - 256)) {
|
||||
RTW_INFO("%s IEEE80211_HT_CAP_MAX_AMSDU is set\n", __FUNCTION__);
|
||||
ht_capie.cap_info = ht_capie.cap_info | cpu_to_le16(IEEE80211_HT_CAP_MAX_AMSDU);
|
||||
}
|
||||
/*
|
||||
AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k
|
||||
|
@ -4244,7 +4201,7 @@ void rtw_update_ht_cap(_adapter *padapter, u8 *pie, uint ie_len, u8 channel)
|
|||
|
||||
/* update cur_bwmode & cur_ch_offset */
|
||||
if ((cbw40_enable) &&
|
||||
(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)) &&
|
||||
(pmlmeinfo->HT_info.infos[0] & BIT(2))) {
|
||||
struct hal_spec_t *hal_spec = GET_HAL_SPEC(padapter);
|
||||
int i;
|
||||
|
@ -4301,61 +4258,12 @@ void rtw_update_ht_cap(_adapter *padapter, u8 *pie, uint ie_len, u8 channel)
|
|||
/* */
|
||||
/* Config SM Power Save setting */
|
||||
/* */
|
||||
pmlmeinfo->SM_PS = (pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info & 0x0C) >> 2;
|
||||
if (pmlmeinfo->SM_PS == WLAN_HT_CAP_SM_PS_STATIC) {
|
||||
#if 0
|
||||
u8 i;
|
||||
/* update the MCS rates */
|
||||
for (i = 0; i < 16; i++)
|
||||
pmlmeinfo->HT_caps.HT_cap_element.MCS_rate[i] &= MCS_rate_1R[i];
|
||||
#endif
|
||||
pmlmeinfo->SM_PS = (le16_to_cpu(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info) & 0x0C) >> 2;
|
||||
if (pmlmeinfo->SM_PS == WLAN_HT_CAP_SM_PS_STATIC)
|
||||
RTW_INFO("%s(): WLAN_HT_CAP_SM_PS_STATIC\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
/* */
|
||||
/* Config current HT Protection mode. */
|
||||
/* */
|
||||
pmlmeinfo->HT_protection = pmlmeinfo->HT_info.infos[1] & 0x3;
|
||||
|
||||
|
||||
|
||||
#if 0 /* move to rtw_update_sta_info_client() */
|
||||
/* 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 */
|
||||
/* todo: check if AP can send A-MPDU packets */
|
||||
bmc_sta = rtw_get_bcmc_stainfo(padapter);
|
||||
if (bmc_sta) {
|
||||
for (i = 0; i < 16 ; i++) {
|
||||
/* preorder_ctrl = &precvpriv->recvreorder_ctrl[i]; */
|
||||
preorder_ctrl = &bmc_sta->recvreorder_ctrl[i];
|
||||
preorder_ctrl->enable = _FALSE;
|
||||
preorder_ctrl->indicate_seq = 0xffff;
|
||||
#ifdef DBG_RX_SEQ
|
||||
RTW_INFO("DBG_RX_SEQ %s:%d indicate_seq:%u\n", __FUNCTION__, __LINE__,
|
||||
preorder_ctrl->indicate_seq);
|
||||
#endif
|
||||
preorder_ctrl->wend_b = 0xffff;
|
||||
preorder_ctrl->wsize_b = 64;/* max_ampdu_sz; */ /* ex. 32(kbytes) -> wsize_b=32 */
|
||||
}
|
||||
}
|
||||
|
||||
psta = rtw_get_stainfo(&padapter->stapriv, pcur_network->network.MacAddress);
|
||||
if (psta) {
|
||||
for (i = 0; i < 16 ; i++) {
|
||||
/* preorder_ctrl = &precvpriv->recvreorder_ctrl[i]; */
|
||||
preorder_ctrl = &psta->recvreorder_ctrl[i];
|
||||
preorder_ctrl->enable = _FALSE;
|
||||
preorder_ctrl->indicate_seq = 0xffff;
|
||||
#ifdef DBG_RX_SEQ
|
||||
RTW_INFO("DBG_RX_SEQ %s:%d indicate_seq:%u\n", __FUNCTION__, __LINE__,
|
||||
preorder_ctrl->indicate_seq);
|
||||
#endif
|
||||
preorder_ctrl->wend_b = 0xffff;
|
||||
preorder_ctrl->wsize_b = 64;/* max_ampdu_sz; */ /* ex. 32(kbytes) -> wsize_b=32 */
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
|
@ -4645,9 +4553,9 @@ static bool wfd_st_match_rule(_adapter *adapter, u8 *local_naddr, u8 *local_port
|
|||
{
|
||||
struct wifi_display_info *wfdinfo = &adapter->wfd_info;
|
||||
|
||||
if (ntohs(*((u16 *)local_port)) == wfdinfo->rtsp_ctrlport
|
||||
|| ntohs(*((u16 *)local_port)) == wfdinfo->tdls_rtsp_ctrlport
|
||||
|| ntohs(*((u16 *)remote_port)) == wfdinfo->peer_rtsp_ctrlport)
|
||||
if (ntohs(*((__be16 *)local_port)) == wfdinfo->rtsp_ctrlport ||
|
||||
ntohs(*((__be16 *)local_port)) == wfdinfo->tdls_rtsp_ctrlport ||
|
||||
ntohs(*((__be16 *)remote_port)) == wfdinfo->peer_rtsp_ctrlport)
|
||||
return _TRUE;
|
||||
return _FALSE;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -210,7 +210,7 @@ exit:
|
|||
return;
|
||||
}
|
||||
|
||||
static u32 getcrc32(u8 *buf, sint len)
|
||||
static __le32 getcrc32(u8 *buf, sint len)
|
||||
{
|
||||
u8 *p;
|
||||
u32 crc;
|
||||
|
@ -221,7 +221,7 @@ static u32 getcrc32(u8 *buf, sint len)
|
|||
|
||||
for (p = buf; len > 0; ++p, --len)
|
||||
crc = crc32_table[(crc ^ *p) & 0xff] ^ (crc >> 8);
|
||||
return ~crc; /* transmit complement, per CRC-32 spec */
|
||||
return cpu_to_le32(~crc); /* transmit complement, per CRC-32 spec */
|
||||
}
|
||||
|
||||
|
||||
|
@ -231,7 +231,6 @@ static u32 getcrc32(u8 *buf, sint len)
|
|||
void rtw_wep_encrypt(_adapter *padapter, u8 *pxmitframe)
|
||||
{
|
||||
/* exclude ICV */
|
||||
|
||||
unsigned char crc[4];
|
||||
struct arc4context mycontext;
|
||||
|
||||
|
@ -278,7 +277,7 @@ void rtw_wep_encrypt(_adapter *padapter, u8 *pxmitframe)
|
|||
|
||||
length = pattrib->last_txcmdsz - pattrib->hdrlen - pattrib->iv_len - pattrib->icv_len;
|
||||
|
||||
*((u32 *)crc) = cpu_to_le32(getcrc32(payload, length));
|
||||
*((__le32 *)crc) = getcrc32(payload, length);
|
||||
|
||||
arcfour_init(&mycontext, wepkey, 3 + keylength);
|
||||
arcfour_encrypt(&mycontext, payload, payload, length);
|
||||
|
@ -286,7 +285,7 @@ void rtw_wep_encrypt(_adapter *padapter, u8 *pxmitframe)
|
|||
|
||||
} else {
|
||||
length = pxmitpriv->frag_len - pattrib->hdrlen - pattrib->iv_len - pattrib->icv_len ;
|
||||
*((u32 *)crc) = cpu_to_le32(getcrc32(payload, length));
|
||||
*((__le32 *)crc) = getcrc32(payload, length);
|
||||
arcfour_init(&mycontext, wepkey, 3 + keylength);
|
||||
arcfour_encrypt(&mycontext, payload, payload, length);
|
||||
arcfour_encrypt(&mycontext, payload + length, crc, 4);
|
||||
|
@ -337,15 +336,12 @@ void rtw_wep_decrypt(_adapter *padapter, u8 *precvframe)
|
|||
arcfour_encrypt(&mycontext, payload, payload, length);
|
||||
|
||||
/* calculate icv and compare the icv */
|
||||
*((u32 *)crc) = le32_to_cpu(getcrc32(payload, length - 4));
|
||||
*((__le32 *)crc) = getcrc32(payload, length - 4);
|
||||
|
||||
|
||||
WEP_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
/* 3 =====TKIP related===== */
|
||||
|
@ -761,7 +757,7 @@ u32 rtw_tkip_encrypt(_adapter *padapter, u8 *pxmitframe)
|
|||
|
||||
if ((curfragnum + 1) == pattrib->nr_frags) { /* 4 the last fragment */
|
||||
length = pattrib->last_txcmdsz - pattrib->hdrlen - pattrib->iv_len - pattrib->icv_len;
|
||||
*((u32 *)crc) = cpu_to_le32(getcrc32(payload, length)); /* modified by Amy*/
|
||||
*((__le32 *)crc) = getcrc32(payload, length); /* modified by Amy*/
|
||||
|
||||
arcfour_init(&mycontext, rc4key, 16);
|
||||
arcfour_encrypt(&mycontext, payload, payload, length);
|
||||
|
@ -769,7 +765,7 @@ u32 rtw_tkip_encrypt(_adapter *padapter, u8 *pxmitframe)
|
|||
|
||||
} else {
|
||||
length = pxmitpriv->frag_len - pattrib->hdrlen - pattrib->iv_len - pattrib->icv_len ;
|
||||
*((u32 *)crc) = cpu_to_le32(getcrc32(payload, length)); /* modified by Amy*/
|
||||
*((__le32 *)crc) = getcrc32(payload, length); /* modified by Amy*/
|
||||
arcfour_init(&mycontext, rc4key, 16);
|
||||
arcfour_encrypt(&mycontext, payload, payload, length);
|
||||
arcfour_encrypt(&mycontext, payload + length, crc, 4);
|
||||
|
@ -887,7 +883,7 @@ u32 rtw_tkip_decrypt(_adapter *padapter, u8 *precvframe)
|
|||
arcfour_init(&mycontext, rc4key, 16);
|
||||
arcfour_encrypt(&mycontext, payload, payload, length);
|
||||
|
||||
*((u32 *)crc) = le32_to_cpu(getcrc32(payload, length - 4));
|
||||
*((__le32 *)crc) = getcrc32(payload, length - 4);
|
||||
|
||||
if (crc[3] != payload[length - 1] || crc[2] != payload[length - 2] || crc[1] != payload[length - 3] || crc[0] != payload[length - 4]) {
|
||||
res = _FAIL;
|
||||
|
@ -1373,7 +1369,7 @@ static sint aes_cipher(u8 *key, uint hdrlen,
|
|||
u8 padded_buffer[16];
|
||||
u8 mic[8];
|
||||
/* uint offset = 0; */
|
||||
uint frtype = GetFrameType(pframe);
|
||||
u16 frtype = GetFrameType(pframe);
|
||||
uint frsubtype = get_frame_sub_type(pframe);
|
||||
|
||||
frsubtype = frsubtype >> 4;
|
||||
|
@ -2797,7 +2793,7 @@ static int omac1_aes_128_vector(u8 *key, size_t num_elem,
|
|||
* OMAC1 was standardized with the name CMAC by NIST in a Special Publication
|
||||
* (SP) 800-38B.
|
||||
*/ /* modify for CONFIG_IEEE80211W */
|
||||
int omac1_aes_128(u8 *key, u8 *data, size_t data_len, u8 *mac)
|
||||
static int omac1_aes_128(u8 *key, u8 *data, size_t data_len, u8 *mac)
|
||||
{
|
||||
return omac1_aes_128_vector(key, 1, &data, &data_len, mac);
|
||||
}
|
||||
|
|
|
@ -29,25 +29,22 @@
|
|||
#define IP_OFFSET 30
|
||||
#endif
|
||||
|
||||
unsigned char ARTHEROS_OUI1[] = {0x00, 0x03, 0x7f};
|
||||
unsigned char ARTHEROS_OUI2[] = {0x00, 0x13, 0x74};
|
||||
static unsigned char ATHEROS_OUI1[] = {0x00, 0x03, 0x7f};
|
||||
static unsigned char ATHEROS_OUI2[] = {0x00, 0x13, 0x74};
|
||||
|
||||
unsigned char BROADCOM_OUI1[] = {0x00, 0x10, 0x18};
|
||||
unsigned char BROADCOM_OUI2[] = {0x00, 0x0a, 0xf7};
|
||||
unsigned char BROADCOM_OUI3[] = {0x00, 0x05, 0xb5};
|
||||
static unsigned char BROADCOM_OUI1[] = {0x00, 0x10, 0x18};
|
||||
static unsigned char BROADCOM_OUI2[] = {0x00, 0x0a, 0xf7};
|
||||
static unsigned char BROADCOM_OUI3[] = {0x00, 0x05, 0xb5};
|
||||
u8 REALTEK_96B_IE[] = {0x00, 0xe0, 0x4c, 0x02, 0x01, 0x20};
|
||||
|
||||
|
||||
unsigned char CISCO_OUI[] = {0x00, 0x40, 0x96};
|
||||
unsigned char MARVELL_OUI[] = {0x00, 0x50, 0x43};
|
||||
unsigned char RALINK_OUI[] = {0x00, 0x0c, 0x43};
|
||||
unsigned char REALTEK_OUI[] = {0x00, 0xe0, 0x4c};
|
||||
unsigned char AIRGOCAP_OUI[] = {0x00, 0x0a, 0xf5};
|
||||
|
||||
unsigned char REALTEK_96B_IE[] = {0x00, 0xe0, 0x4c, 0x02, 0x01, 0x20};
|
||||
static unsigned char CISCO_OUI[] = {0x00, 0x40, 0x96};
|
||||
static unsigned char MARVELL_OUI[] = {0x00, 0x50, 0x43};
|
||||
static unsigned char RALINK_OUI[] = {0x00, 0x0c, 0x43};
|
||||
static unsigned char REALTEK_OUI[] = {0x00, 0xe0, 0x4c};
|
||||
static unsigned char AIRGOCAP_OUI[] = {0x00, 0x0a, 0xf5};
|
||||
|
||||
extern unsigned char RTW_WPA_OUI[];
|
||||
extern unsigned char WPA_TKIP_CIPHER[4];
|
||||
extern unsigned char RSN_TKIP_CIPHER[4];
|
||||
|
||||
#define R2T_PHY_DELAY (0)
|
||||
|
||||
|
@ -105,7 +102,7 @@ int cckratesonly_included(unsigned char *rate, int ratelen)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_GET_RAID_BY_DRV
|
||||
s8 rtw_get_tx_nss(_adapter *adapter, struct sta_info *psta)
|
||||
static s8 rtw_get_tx_nss(_adapter *adapter, struct sta_info *psta)
|
||||
{
|
||||
struct hal_spec_t *hal_spec = GET_HAL_SPEC(adapter);
|
||||
u8 rf_type = RF_1T1R, custom_rf_type;
|
||||
|
@ -813,11 +810,10 @@ __inline u8 *get_my_bssid(WLAN_BSSID_EX *pnetwork)
|
|||
|
||||
u16 get_beacon_interval(WLAN_BSSID_EX *bss)
|
||||
{
|
||||
unsigned short val;
|
||||
__le16 val;
|
||||
_rtw_memcpy((unsigned char *)&val, rtw_get_beacon_interval_from_ie(bss->IEs), 2);
|
||||
|
||||
return le16_to_cpu(val);
|
||||
|
||||
}
|
||||
|
||||
int is_client_associated_to_ap(_adapter *padapter)
|
||||
|
@ -1151,7 +1147,7 @@ inline bool rtw_sec_camid_is_drv_forbid(struct cam_ctl_t *cam_ctl, u8 id)
|
|||
return 1;
|
||||
}
|
||||
|
||||
bool _rtw_sec_camid_is_used(struct cam_ctl_t *cam_ctl, u8 id)
|
||||
static bool _rtw_sec_camid_is_used(struct cam_ctl_t *cam_ctl, u8 id)
|
||||
{
|
||||
bool ret = _FALSE;
|
||||
|
||||
|
@ -1239,7 +1235,7 @@ inline bool rtw_camid_is_gk(_adapter *adapter, u8 cam_id)
|
|||
return ret;
|
||||
}
|
||||
|
||||
bool cam_cache_chk(_adapter *adapter, u8 id, u8 *addr, s16 kid, s8 gk)
|
||||
static bool cam_cache_chk(_adapter *adapter, u8 id, u8 *addr, s16 kid, s8 gk)
|
||||
{
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
|
||||
bool ret = _FALSE;
|
||||
|
@ -1257,7 +1253,7 @@ exit:
|
|||
return ret;
|
||||
}
|
||||
|
||||
s16 _rtw_camid_search(_adapter *adapter, u8 *addr, s16 kid, s8 gk)
|
||||
static s16 _rtw_camid_search(_adapter *adapter, u8 *addr, s16 kid, s8 gk)
|
||||
{
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
|
||||
struct cam_ctl_t *cam_ctl = &dvobj->cam_ctl;
|
||||
|
@ -1297,7 +1293,7 @@ s16 rtw_camid_search(_adapter *adapter, u8 *addr, s16 kid, s8 gk)
|
|||
return cam_id;
|
||||
}
|
||||
|
||||
s16 rtw_get_camid(_adapter *adapter, struct sta_info *sta, u8 *addr, s16 kid)
|
||||
static s16 rtw_get_camid(_adapter *adapter, struct sta_info *sta, u8 *addr, s16 kid)
|
||||
{
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
|
||||
struct cam_ctl_t *cam_ctl = &dvobj->cam_ctl;
|
||||
|
@ -1411,7 +1407,7 @@ bitmap_handle:
|
|||
return cam_id;
|
||||
}
|
||||
|
||||
void rtw_camid_set(_adapter *adapter, u8 cam_id)
|
||||
static void rtw_camid_set(_adapter *adapter, u8 cam_id)
|
||||
{
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
|
||||
struct cam_ctl_t *cam_ctl = &dvobj->cam_ctl;
|
||||
|
@ -1494,7 +1490,7 @@ inline void rtw_sec_cam_swap(_adapter *adapter, u8 cam_id_a, u8 cam_id_b)
|
|||
}
|
||||
}
|
||||
|
||||
s16 rtw_get_empty_cam_entry(_adapter *adapter, u8 start_camid)
|
||||
static s16 rtw_get_empty_cam_entry(_adapter *adapter, u8 start_camid)
|
||||
{
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
|
||||
struct cam_ctl_t *cam_ctl = &dvobj->cam_ctl;
|
||||
|
@ -1959,8 +1955,8 @@ void HT_caps_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
|||
/* Commented by Albert 2010/07/12 */
|
||||
/* Have to handle the endian issue after copying. */
|
||||
/* HT_ext_caps didn't be used yet. */
|
||||
pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info = le16_to_cpu(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info);
|
||||
pmlmeinfo->HT_caps.u.HT_cap_element.HT_ext_caps = le16_to_cpu(pmlmeinfo->HT_caps.u.HT_cap_element.HT_ext_caps);
|
||||
pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info = pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info;
|
||||
pmlmeinfo->HT_caps.u.HT_cap_element.HT_ext_caps = pmlmeinfo->HT_caps.u.HT_cap_element.HT_ext_caps;
|
||||
|
||||
/* update the MCS set */
|
||||
for (i = 0; i < 16; i++)
|
||||
|
@ -2259,7 +2255,7 @@ void update_ldpc_stbc_cap(struct sta_info *psta)
|
|||
#endif /* CONFIG_80211N_HT */
|
||||
}
|
||||
|
||||
int check_ielen(u8 *start, uint len)
|
||||
static int check_ielen(u8 *start, uint len)
|
||||
{
|
||||
int left = len;
|
||||
u8 *pos = start;
|
||||
|
@ -2325,7 +2321,7 @@ int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len,
|
|||
_rtw_memset(recv_beacon, 0, sizeof(*recv_beacon));
|
||||
|
||||
/* checking capabilities */
|
||||
capability = le16_to_cpu(*(unsigned short *)(pframe + WLAN_HDR_A3_LEN + 10));
|
||||
capability = le16_to_cpu(*(__le16 *)(pframe + WLAN_HDR_A3_LEN + 10));
|
||||
|
||||
/* checking IEs */
|
||||
left = packet_len - sizeof(struct rtw_ieee80211_hdr_3addr) - _BEACON_IE_OFFSET_;
|
||||
|
@ -2339,7 +2335,7 @@ int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len,
|
|||
return _FALSE;
|
||||
|
||||
pht_cap = (struct rtw_ieee80211_ht_cap *) elems.ht_capabilities;
|
||||
recv_beacon->ht_cap_info = pht_cap->cap_info;
|
||||
recv_beacon->ht_cap_info = le16_to_cpu(pht_cap->cap_info);
|
||||
}
|
||||
|
||||
if (elems.ht_operation) {
|
||||
|
@ -2715,10 +2711,9 @@ void update_beacon_info(_adapter *padapter, u8 *pframe, uint pkt_len, struct sta
|
|||
case _VENDOR_SPECIFIC_IE_:
|
||||
/* to update WMM paramter set while receiving beacon */
|
||||
if (_rtw_memcmp(pIE->data, WMM_PARA_OUI, 6) && pIE->Length == WLAN_WMM_LEN) /* WMM */
|
||||
(WMM_param_handler(padapter, pIE)) ? report_wmm_edca_update(padapter) : 0;
|
||||
|
||||
if (WMM_param_handler(padapter, pIE))
|
||||
report_wmm_edca_update(padapter);
|
||||
break;
|
||||
|
||||
case _HT_EXTRA_INFO_IE_: /* HT info */
|
||||
/* HT_info_handler(padapter, pIE); */
|
||||
bwmode_update_check(padapter, pIE);
|
||||
|
@ -2887,7 +2882,6 @@ unsigned int is_ap_in_wep(_adapter *padapter)
|
|||
|
||||
}
|
||||
|
||||
int wifirate2_ratetbl_inx(unsigned char rate);
|
||||
int wifirate2_ratetbl_inx(unsigned char rate)
|
||||
{
|
||||
int inx = 0;
|
||||
|
@ -2983,7 +2977,7 @@ int support_short_GI(_adapter *padapter, struct HT_caps_element *pHT_caps, u8 bw
|
|||
|
||||
bit_offset = (bwmode & CHANNEL_WIDTH_40) ? 6 : 5;
|
||||
|
||||
if (pHT_caps->u.HT_cap_element.HT_caps_info & (0x1 << bit_offset))
|
||||
if (le16_to_cpu(pHT_caps->u.HT_cap_element.HT_caps_info) & (0x1 << bit_offset))
|
||||
return _SUCCESS;
|
||||
else
|
||||
return _FAIL;
|
||||
|
@ -3065,7 +3059,7 @@ unsigned char check_assoc_AP(u8 *pframe, uint len)
|
|||
|
||||
switch (pIE->ElementID) {
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
if ((_rtw_memcmp(pIE->data, ARTHEROS_OUI1, 3)) || (_rtw_memcmp(pIE->data, ARTHEROS_OUI2, 3))) {
|
||||
if ((_rtw_memcmp(pIE->data, ATHEROS_OUI1, 3)) || (_rtw_memcmp(pIE->data, ATHEROS_OUI2, 3))) {
|
||||
RTW_INFO("link to Artheros AP\n");
|
||||
return HT_IOT_PEER_ATHEROS;
|
||||
} else if ((_rtw_memcmp(pIE->data, BROADCOM_OUI1, 3))
|
||||
|
@ -3369,10 +3363,10 @@ exit:
|
|||
void update_TSF(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len)
|
||||
{
|
||||
u8 *pIE;
|
||||
u32 *pbuf;
|
||||
__le32 *pbuf;
|
||||
|
||||
pIE = pframe + sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
pbuf = (u32 *)pIE;
|
||||
pbuf = (__le32 *)pIE;
|
||||
|
||||
pmlmeext->TSFValue = le32_to_cpu(*(pbuf + 1));
|
||||
|
||||
|
@ -3383,23 +3377,22 @@ void update_TSF(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len)
|
|||
|
||||
void correct_TSF(_adapter *padapter, struct mlme_ext_priv *pmlmeext)
|
||||
{
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_CORRECT_TSF, 0);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_CORRECT_TSF, NULL);
|
||||
}
|
||||
|
||||
void adaptive_early_32k(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len)
|
||||
{
|
||||
int i;
|
||||
u8 *pIE;
|
||||
u32 *pbuf;
|
||||
__le32 *pbuf;
|
||||
u64 tsf = 0;
|
||||
u32 delay_ms;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
||||
|
||||
pmlmeext->bcn_cnt++;
|
||||
|
||||
pIE = pframe + sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
pbuf = (u32 *)pIE;
|
||||
pbuf = (__le32 *)pIE;
|
||||
|
||||
tsf = le32_to_cpu(*(pbuf + 1));
|
||||
tsf = tsf << 32;
|
||||
|
|
|
@ -3677,7 +3677,6 @@ int rtw_br_client_tx(_adapter *padapter, struct sk_buff **pskb)
|
|||
_irqL irqL;
|
||||
/* if(check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == _TRUE) */
|
||||
{
|
||||
void dhcp_flag_bcast(_adapter *priv, struct sk_buff *skb);
|
||||
int res, is_vlan_tag = 0, i, do_nat25 = 1;
|
||||
unsigned short vlan_hdr = 0;
|
||||
void *br_port = NULL;
|
||||
|
@ -3721,7 +3720,6 @@ int rtw_br_client_tx(_adapter *padapter, struct sk_buff **pskb)
|
|||
|
||||
if (*((unsigned short *)(skb->data + MACADDRLEN * 2)) == __constant_htons(ETH_P_IP)) {
|
||||
if (memcmp(padapter->scdb_mac, skb->data + MACADDRLEN, MACADDRLEN)) {
|
||||
void *scdb_findEntry(_adapter *priv, unsigned char *macAddr, unsigned char *ipAddr);
|
||||
|
||||
padapter->scdb_entry = (struct nat25_network_db_entry *)scdb_findEntry(padapter,
|
||||
skb->data + MACADDRLEN, skb->data + WLAN_ETHHDR_LEN + 12);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue