diff --git a/core/rtw_ap.c b/core/rtw_ap.c index 9c0f951..d666fad 100644 --- a/core/rtw_ap.c +++ b/core/rtw_ap.c @@ -28,7 +28,6 @@ void init_mlme_ap_info(struct adapter *padapter) { - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct sta_priv *pstapriv = &padapter->stapriv; struct wlan_acl_pool *pacl_list = &pstapriv->acl_list; @@ -687,7 +686,6 @@ static void update_hw_ht_param(struct adapter *padapter) { unsigned char max_AMPDU_len; unsigned char min_MPDU_spacing; - struct registry_priv *pregpriv = &padapter->registrypriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); @@ -863,13 +861,11 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len) u8 channel, network_type, supportRate[NDIS_802_11_LENGTH_RATES_EX]; int supportRateNum = 0; u8 OUI1[] = {0x00, 0x50, 0xf2, 0x01}; - u8 wps_oui[4] = {0x0, 0x50, 0xf2, 0x04}; u8 WMM_PARA_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x01, 0x01}; struct registry_priv *pregistrypriv = &padapter->registrypriv; struct security_priv *psecuritypriv = &padapter->securitypriv; struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct wlan_bssid_ex *pbss_network = (struct wlan_bssid_ex *)&pmlmepriv->cur_network.network; - struct sta_priv *pstapriv = &padapter->stapriv; u8 *ie = pbss_network->IEs; @@ -1202,7 +1198,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr) { unsigned long irqL; struct list_head *plist, *phead; - int i, ret = 0; + int ret = 0; struct rtw_wlan_acl_node *paclnode; struct sta_priv *pstapriv = &padapter->stapriv; struct wlan_acl_pool *pacl_list = &pstapriv->acl_list; @@ -1733,8 +1729,6 @@ u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta, { unsigned long irqL; u8 beacon_updated = false; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct sta_priv *pstapriv = &padapter->stapriv; if (!psta) diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index ea37793..2e23bbe 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -486,9 +486,6 @@ u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid, struct sitesurvey_parm *psurveyPara; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -#ifdef CONFIG_P2P - struct wifidirect_info *pwdinfo = &(padapter->wdinfo); -#endif /* CONFIG_P2P */ _func_enter_; @@ -1198,8 +1195,6 @@ u8 rtw_clearstakey_cmd(struct adapter *padapter, u8 *psta, u8 entry, u8 enqueue) struct set_stakey_parm *psetstakey_para; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct set_stakey_rsp *psetstakey_rsp = NULL; - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - struct security_priv *psecuritypriv = &padapter->securitypriv; struct sta_info *sta = (struct sta_info *)psta; u8 res = _SUCCESS; @@ -1590,7 +1585,6 @@ u8 rtw_set_csa_cmd(struct adapter *padapter, u8 new_ch_no) { struct cmd_obj *pcmdobj; struct SetChannelSwitch_param *setChannelSwitch_param; - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; u8 res = _SUCCESS; diff --git a/core/rtw_debug.c b/core/rtw_debug.c index c54fe99..97ae2bb 100644 --- a/core/rtw_debug.c +++ b/core/rtw_debug.c @@ -26,8 +26,6 @@ int proc_get_drv_version(char *page, char **start, off_t offset, int count, int *eof, void *data) { - struct net_device *dev = data; - int len = 0; len += snprintf(page + len, count - len, "%s\n", DRIVERVERSION); @@ -557,7 +555,6 @@ int proc_get_rx_signal(char *page, char **start, { struct net_device *dev = data; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); int len = 0; @@ -641,8 +638,6 @@ int proc_set_ht_enable(struct file *file, const char __user *buffer, return -EFAULT; if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) { - int num = sscanf(tmp, "%d ", &mode); - if (pregpriv && mode >= 0 && mode < 2) { pregpriv->ht_enable = mode; pr_info("ht_enable=%d\n", pregpriv->ht_enable); @@ -685,8 +680,6 @@ int proc_set_cbw40_enable(struct file *file, const char __user *buffer, return -EFAULT; if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) { - int num = sscanf(tmp, "%d ", &mode); - if (pregpriv && mode >= 0 && mode < 2) { pregpriv->cbw40_enable = mode; pr_info("cbw40_enable=%d\n", mode); @@ -728,8 +721,6 @@ int proc_set_ampdu_enable(struct file *file, const char __user *buffer, return -EFAULT; if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) { - int num = sscanf(tmp, "%d ", &mode); - if (pregpriv && mode >= 0 && mode < 3) { pregpriv->ampdu_enable = mode; pr_info("ampdu_enable=%d\n", mode); @@ -791,8 +782,6 @@ int proc_set_rx_stbc(struct file *file, const char __user *buffer, return -EFAULT; if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) { - int num = sscanf(tmp, "%d ", &mode); - if (pregpriv && (mode == 0 || mode == 1 || mode == 2 || mode == 3)) { pregpriv->rx_stbc = mode; printk("rx_stbc=%d\n", mode); diff --git a/core/rtw_ieee80211.c b/core/rtw_ieee80211.c index b5bbf2f..67f8409 100644 --- a/core/rtw_ieee80211.c +++ b/core/rtw_ieee80211.c @@ -1340,7 +1340,6 @@ static uint rtw_p2p_attr_remove(u8 *ie, uint ielen_ori, u8 attr_id) u8 *target_attr; u32 target_attr_len; uint ielen = ielen_ori; - int index = 0; while (1) { target_attr = rtw_get_p2p_attr(ie, ielen, attr_id, NULL, &target_attr_len); @@ -1364,7 +1363,6 @@ void rtw_wlan_bssid_ex_remove_p2p_attr(struct wlan_bssid_ex *bss_ex, u8 attr_id) { u8 *p2p_ie; uint p2p_ielen, p2p_ielen_ori; - int cnt; p2p_ie = rtw_get_p2p_ie(bss_ex->IEs+_FIXED_IE_LENGTH_, bss_ex->IELength-_FIXED_IE_LENGTH_, NULL, &p2p_ielen_ori); if (p2p_ie) { diff --git a/core/rtw_ioctl_set.c b/core/rtw_ioctl_set.c index 59e1869..c81eddb 100644 --- a/core/rtw_ioctl_set.c +++ b/core/rtw_ioctl_set.c @@ -1135,9 +1135,6 @@ int rtw_set_scan_mode(struct adapter *adapter, enum rt_scan_type scan_mode) */ int rtw_set_channel_plan(struct adapter *adapter, u8 channel_plan) { - struct registry_priv *pregistrypriv = &adapter->registrypriv; - struct mlme_priv *pmlmepriv = &adapter->mlmepriv; - /* handle by cmd_thread to sync with scan operation */ return rtw_set_chplan_cmd(adapter, channel_plan, 1); } diff --git a/core/rtw_led.c b/core/rtw_led.c index 5aafcfa..bd9ae82 100644 --- a/core/rtw_led.c +++ b/core/rtw_led.c @@ -185,9 +185,7 @@ static void SwLedBlink(struct LED_871x *pLed) static void SwLedBlink1(struct LED_871x *pLed) { struct adapter *padapter = pLed->padapter; - struct led_priv *ledpriv = &(padapter->ledpriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct LED_871x *pLed1 = &(ledpriv->SwLed1); u8 bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ @@ -525,7 +523,6 @@ static void SwLedBlink4(struct LED_871x *pLed) { struct adapter *padapter = pLed->padapter; struct led_priv *ledpriv = &(padapter->ledpriv); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct LED_871x *pLed1 = &(ledpriv->SwLed1); u8 bStopBlinking = false; @@ -667,7 +664,6 @@ static void SwLedBlink4(struct LED_871x *pLed) static void SwLedBlink5(struct LED_871x *pLed) { struct adapter *padapter = pLed->padapter; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); u8 bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ @@ -753,8 +749,6 @@ static void SwLedBlink5(struct LED_871x *pLed) static void SwLedBlink6(struct LED_871x *pLed) { struct adapter *padapter = pLed->padapter; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - u8 bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ if (pLed->BlinkingLedState == RTW_LED_ON) { @@ -1671,7 +1665,6 @@ SwLedControlMode6( ) { struct led_priv *ledpriv = &(padapter->ledpriv); - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct LED_871x *pLed0 = &(ledpriv->SwLed0); switch (LedAction) { diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c index 60f9724..892570f 100644 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -562,13 +562,9 @@ _func_exit_; void update_network(struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src, struct adapter *padapter, bool update_ie) { - u8 ss_ori = dst->PhyInfo.SignalStrength; - u8 sq_ori = dst->PhyInfo.SignalQuality; long rssi_ori = dst->Rssi; - u8 ss_smp = src->PhyInfo.SignalStrength; u8 sq_smp = src->PhyInfo.SignalQuality; - long rssi_smp = src->Rssi; u8 ss_final; u8 sq_final; @@ -722,9 +718,6 @@ _func_exit_; void rtw_add_network(struct adapter *adapter, struct wlan_bssid_ex *pnetwork) { - unsigned long irqL; - struct mlme_priv *pmlmepriv = &(((struct adapter *)adapter)->mlmepriv); - _func_enter_; #if defined(CONFIG_P2P) @@ -1055,7 +1048,6 @@ _func_exit_; void rtw_indicate_connect(struct adapter *padapter) { struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - struct xmit_priv *pxmitpriv = &padapter->xmitpriv; _func_enter_; @@ -1085,11 +1077,6 @@ _func_exit_; void rtw_indicate_disconnect(struct adapter *padapter) { struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network); - struct sta_info *psta; - struct sta_priv *pstapriv = &padapter->stapriv; _func_enter_; @@ -1126,7 +1113,6 @@ inline void rtw_indicate_scan_done(struct adapter *padapter, bool aborted) void rtw_scan_abort(struct adapter *adapter) { - u32 cnt = 0; u32 start; struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv); @@ -1693,7 +1679,6 @@ void rtw_scan_timeout_handler (struct adapter *adapter) static void rtw_auto_scan_handler(struct adapter *padapter) { struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - struct pwrctrl_priv *pwrctrlpriv = &padapter->pwrctrlpriv; /* auto site survey per 60sec */ if (pmlmepriv->scan_interval > 0) { @@ -2105,10 +2090,8 @@ static int rtw_append_pmkid(struct adapter *Adapter, int iEntry, u8 *ie, uint ie int rtw_restruct_sec_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_len) { - u8 authmode, securitytype, match; - u8 sec_ie[255], uncst_oui[4], bkup_ie[255]; - u8 wpa_oui[4] = {0x0, 0x50, 0xf2, 0x01}; - uint ielength, cnt, remove_cnt; + u8 authmode; + uint ielength; int iEntry; struct mlme_priv *pmlmepriv = &adapter->mlmepriv; diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index 97380e1..cbc858d 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -339,8 +339,8 @@ static void init_channel_list(struct adapter *padapter, struct rt_channel_info * static u8 init_channel_set(struct adapter *padapter, u8 ChannelPlan, struct rt_channel_info *channel_set) { u8 index, chanset_size = 0; - u8 b5GBand = false, b2_4GBand = false; - u8 Index2G = 0, Index5G = 0; + u8 b2_4GBand = false; + u8 Index2G = 0; _rtw_memset(channel_set, 0, sizeof(struct rt_channel_info) * MAX_CHANNEL_NUM); @@ -584,7 +584,6 @@ unsigned int OnProbeReq(struct adapter *padapter, union recv_frame *precv_frame) #ifdef CONFIG_P2P struct wifidirect_info *pwdinfo = &(padapter->wdinfo); - struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib; u8 wifi_test_chk_rate = 1; if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE) && @@ -650,10 +649,7 @@ _issue_probersp: unsigned int OnProbeRsp(struct adapter *padapter, union recv_frame *precv_frame) { - struct sta_info *psta; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - struct sta_priv *pstapriv = &padapter->stapriv; u8 *pframe = precv_frame->u.hdr.rx_data; #ifdef CONFIG_P2P struct wifidirect_info *pwdinfo = &padapter->wdinfo; @@ -1527,7 +1523,6 @@ unsigned int OnAssocRsp(struct adapter *padapter, union recv_frame *precv_frame) /* struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network); */ u8 *pframe = precv_frame->u.hdr.rx_data; uint pkt_len = precv_frame->u.hdr.len; - struct ndis_802_11_var_ie *pWapiIE = NULL; DBG_88E("%s\n", __func__); @@ -1805,7 +1800,6 @@ unsigned int on_action_spct(struct adapter *padapter, union recv_frame *precv_fr struct sta_info *psta = NULL; struct sta_priv *pstapriv = &padapter->stapriv; u8 *pframe = precv_frame->u.hdr.rx_data; - uint frame_len = precv_frame->u.hdr.len; u8 *frame_body = (u8 *)(pframe + sizeof(struct rtw_ieee80211_hdr_3addr)); u8 category; u8 action; @@ -1968,8 +1962,7 @@ void issue_p2p_GO_request(struct adapter *padapter, u8 *raddr) __be32 p2poui = cpu_to_be32(P2POUI); u8 oui_subtype = P2P_GO_NEGO_REQ; u8 wpsie[255] = { 0x00 }, p2pie[255] = { 0x00 }; - u8 wpsielen = 0, p2pielen = 0, i; - u8 channel_cnt_24g = 0, channel_cnt_5gl = 0, channel_cnt_5gh = 0; + u8 wpsielen = 0, p2pielen = 0; u16 len_channellist_attr = 0; struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; @@ -1978,7 +1971,6 @@ void issue_p2p_GO_request(struct adapter *padapter, u8 *raddr) unsigned short *fctrl; struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct wifidirect_info *pwdinfo = &(padapter->wdinfo); @@ -2322,12 +2314,11 @@ static void issue_p2p_GO_response(struct adapter *padapter, u8 *raddr, u8 *frame __be32 p2poui = cpu_to_be32(P2POUI); u8 oui_subtype = P2P_GO_NEGO_RESP; u8 wpsie[255] = { 0x00 }, p2pie[255] = { 0x00 }; - u8 p2pielen = 0, i; + u8 p2pielen = 0; uint wpsielen = 0; u16 wps_devicepassword_id = 0x0000; __be16 be_tmp; uint wps_devicepassword_id_len = 0; - u8 channel_cnt_24g = 0, channel_cnt_5gl = 0, channel_cnt_5gh; u16 len_channellist_attr = 0; struct xmit_frame *pmgntframe; @@ -2337,7 +2328,6 @@ static void issue_p2p_GO_response(struct adapter *padapter, u8 *raddr, u8 *frame unsigned short *fctrl; struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct wifidirect_info *pwdinfo = &(padapter->wdinfo); pmgntframe = alloc_mgtxmitframe(pxmitpriv); @@ -2699,8 +2689,8 @@ static void issue_p2p_GO_confirm(struct adapter *padapter, u8 *raddr, u8 result) u8 action = P2P_PUB_ACTION_ACTION; __be32 p2poui = cpu_to_be32(P2POUI); u8 oui_subtype = P2P_GO_NEGO_CONF; - u8 wpsie[255] = { 0x00 }, p2pie[255] = { 0x00 }; - u8 wpsielen = 0, p2pielen = 0; + u8 p2pie[255] = { 0x00 }; + u8 p2pielen = 0; struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; @@ -2709,7 +2699,6 @@ static void issue_p2p_GO_confirm(struct adapter *padapter, u8 *raddr, u8 result) unsigned short *fctrl; struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct wifidirect_info *pwdinfo = &(padapter->wdinfo); pmgntframe = alloc_mgtxmitframe(pxmitpriv); @@ -2885,9 +2874,8 @@ void issue_p2p_invitation_request(struct adapter *padapter, u8 *raddr) __be32 p2poui = cpu_to_be32(P2POUI); u8 oui_subtype = P2P_INVIT_REQ; u8 p2pie[255] = { 0x00 }; - u8 p2pielen = 0, i; + u8 p2pielen = 0; u8 dialogToken = 3; - u8 channel_cnt_24g = 0, channel_cnt_5gl = 0, channel_cnt_5gh = 0; u16 len_channellist_attr = 0; struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; @@ -2896,7 +2884,6 @@ void issue_p2p_invitation_request(struct adapter *padapter, u8 *raddr) unsigned short *fctrl; struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct wifidirect_info *pwdinfo = &(padapter->wdinfo); pmgntframe = alloc_mgtxmitframe(pxmitpriv); @@ -3145,8 +3132,7 @@ void issue_p2p_invitation_response(struct adapter *padapter, u8 *raddr, u8 dialo __be32 p2poui = cpu_to_be32(P2POUI); u8 oui_subtype = P2P_INVIT_RESP; u8 p2pie[255] = { 0x00 }; - u8 p2pielen = 0, i; - u8 channel_cnt_24g = 0, channel_cnt_5gl = 0, channel_cnt_5gh = 0; + u8 p2pielen = 0; u16 len_channellist_attr = 0; struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; @@ -3155,7 +3141,6 @@ void issue_p2p_invitation_response(struct adapter *padapter, u8 *raddr, u8 dialo unsigned short *fctrl; struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct wifidirect_info *pwdinfo = &(padapter->wdinfo); @@ -3351,7 +3336,6 @@ void issue_p2p_provision_request(struct adapter *padapter, u8 *pssid, u8 ussidle unsigned short *fctrl; struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct wifidirect_info *pwdinfo = &(padapter->wdinfo); @@ -3460,10 +3444,8 @@ void issue_probersp_p2p(struct adapter *padapter, unsigned char *da) struct rtw_ieee80211_hdr *pwlanhdr; unsigned short *fctrl; unsigned char *mac; - struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); + struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); u16 beacon_interval = 100; u16 capInfo = 0; struct wifidirect_info *pwdinfo = &(padapter->wdinfo); @@ -3713,11 +3695,8 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack) struct rtw_ieee80211_hdr *pwlanhdr; unsigned short *fctrl; unsigned char *mac; - unsigned char bssrate[NumRates]; struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - int bssrate_len = 0; u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; struct wifidirect_info *pwdinfo = &(padapter->wdinfo); u8 wpsie[255] = { 0x00 }, p2pie[255] = { 0x00 }; @@ -4082,7 +4061,7 @@ static unsigned int on_action_public_p2p(union recv_frame *precv_frame) u8 dialogToken = 0; #ifdef CONFIG_P2P u8 *p2p_ie; - u32 p2p_ielen, wps_ielen; + u32 p2p_ielen; struct wifidirect_info *pwdinfo = &(padapter->wdinfo); u8 result = P2P_STATUS_SUCCESS; u8 empty_addr[ETH_ALEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; @@ -4367,7 +4346,6 @@ static unsigned int on_action_public_vendor(union recv_frame *precv_frame) { unsigned int ret = _FAIL; u8 *pframe = precv_frame->u.hdr.rx_data; - uint frame_len = precv_frame->u.hdr.len; u8 *frame_body = pframe + sizeof(struct rtw_ieee80211_hdr_3addr); if (_rtw_memcmp(frame_body + 2, P2P_OUI, 4) == true) { @@ -4381,12 +4359,8 @@ static unsigned int on_action_public_default(union recv_frame *precv_frame, u8 a { unsigned int ret = _FAIL; u8 *pframe = precv_frame->u.hdr.rx_data; - uint frame_len = precv_frame->u.hdr.len; u8 *frame_body = pframe + sizeof(struct rtw_ieee80211_hdr_3addr); u8 token; - struct adapter *adapter = precv_frame->u.hdr.adapter; - int cnt = 0; - char msg[64]; token = frame_body[2]; @@ -4403,7 +4377,6 @@ unsigned int on_action_public(struct adapter *padapter, union recv_frame *precv_ { unsigned int ret = _FAIL; u8 *pframe = precv_frame->u.hdr.rx_data; - uint frame_len = precv_frame->u.hdr.len; u8 *frame_body = pframe + sizeof(struct rtw_ieee80211_hdr_3addr); u8 category, action; @@ -5068,7 +5041,6 @@ static int _issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *ps struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); int bssrate_len = 0; u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; @@ -5476,7 +5448,6 @@ void issue_assocreq(struct adapter *padapter) unsigned char *pframe, *p; struct rtw_ieee80211_hdr *pwlanhdr; unsigned short *fctrl; - unsigned short val16; __le16 le_tmp; unsigned int i, j, ie_len, index = 0; unsigned char rf_type, bssrate[NumRates], sta_bssrate[NumRates]; @@ -6162,17 +6133,13 @@ exit: void issue_action_spct_ch_switch (struct adapter *padapter, u8 *ra, u8 new_ch, u8 ch_offset) { - unsigned long irqL; - struct list_head *plist, *phead; struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; unsigned char *pframe; struct rtw_ieee80211_hdr *pwlanhdr; unsigned short *fctrl; struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); DBG_88E(FUNC_NDEV_FMT" ra =%pM, ch:%u, offset:%u\n", @@ -6621,8 +6588,6 @@ void site_survey(struct adapter *padapter) #ifdef CONFIG_P2P struct wifidirect_info *pwdinfo = &(padapter->wdinfo); - static unsigned char prev_survey_channel; - static unsigned int p2p_scan_count; if ((pwdinfo->rx_invitereq_info.scan_op_ch_only) || (pwdinfo->p2p_info.scan_op_ch_only)) { if (pwdinfo->rx_invitereq_info.scan_op_ch_only) { @@ -7825,8 +7790,6 @@ void _linked_rx_signal_strehgth_display(struct adapter *padapter) static u8 chk_ap_is_alive(struct adapter *padapter, struct sta_info *psta) { u8 ret = false; - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); if ((sta_rx_data_pkts(psta) == sta_last_rx_data_pkts(psta)) && sta_rx_beacon_pkts(psta) == sta_last_rx_beacon_pkts(psta) && @@ -8717,7 +8680,6 @@ u8 tx_beacon_hdl(struct adapter *padapter, unsigned char *pbuf) u8 set_ch_hdl(struct adapter *padapter, u8 *pbuf) { struct set_ch_parm *set_ch_parm; - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; if (!pbuf) @@ -8741,7 +8703,6 @@ u8 set_ch_hdl(struct adapter *padapter, u8 *pbuf) u8 set_chplan_hdl(struct adapter *padapter, unsigned char *pbuf) { struct SetChannelPlan_param *setChannelPlan_param; - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; if (!pbuf) diff --git a/core/rtw_mp.c b/core/rtw_mp.c index 5926c32..6a82c9c 100644 --- a/core/rtw_mp.c +++ b/core/rtw_mp.c @@ -342,8 +342,6 @@ void GetPowerTracking(struct adapter *padapter, u8 *enable) static void disable_dm(struct adapter *padapter) { u8 v8; - struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter); - struct dm_priv *pdmpriv = &pHalData->dmpriv; /* 3 1. disable firmware dynamic mechanism */ @@ -783,7 +781,7 @@ void fill_txdesc_for_mp(struct adapter *padapter, struct tx_desc *ptxdesc) void SetPacketTx(struct adapter *padapter) { u8 *ptr, *pkt_start, *pkt_end; - u32 pkt_size, offset; + u32 pkt_size; struct tx_desc *desc; struct rtw_ieee80211_hdr *hdr; u8 payload; @@ -1057,7 +1055,6 @@ void _rtw_mp_xmit_priv(struct xmit_priv *pxmitpriv) { int i, res; struct adapter *padapter = pxmitpriv->adapter; - struct xmit_frame *pxmitframe = (struct xmit_frame *) pxmitpriv->pxmit_frame_buf; struct xmit_buf *pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmitbuf; u32 max_xmit_extbuf_size = MAX_XMIT_EXTBUF_SZ; diff --git a/core/rtw_p2p.c b/core/rtw_p2p.c index 3d9aa44..cb753f7 100644 --- a/core/rtw_p2p.c +++ b/core/rtw_p2p.c @@ -304,7 +304,6 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr, unsigned short *fctrl; struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); pmgntframe = alloc_mgtxmitframe(pxmitpriv); if (pmgntframe == NULL) @@ -1195,7 +1194,6 @@ u8 process_p2p_group_negotation_req(struct wifidirect_info *pwdinfo, u8 *pframe, u8 peer_ch_num = 0; u8 ch_list_inclusioned[50] = { 0x00 }; u8 ch_num_inclusioned = 0; - __le16 le_tmp; rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_ING); @@ -1306,14 +1304,11 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe u8 attr_content = 0x00; u32 attr_contentlen = 0; u8 operatingch_info[5] = { 0x00 }; - uint ch_cnt = 0; - u8 ch_content[50] = { 0x00 }; u8 groupid[38]; u8 peer_ch_list[50] = { 0x00 }; u8 peer_ch_num = 0; u8 ch_list_inclusioned[50] = { 0x00 }; u8 ch_num_inclusioned = 0; - __le16 le_tmp; while (p2p_ie) { /* Found the P2P IE. */ rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, &attr_content, &attr_contentlen); @@ -1556,7 +1551,6 @@ void p2p_concurrent_handler(struct adapter *padapter); static void restore_p2p_state_handler(struct adapter *padapter) { struct wifidirect_info *pwdinfo = &padapter->wdinfo; - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; _func_enter_; @@ -1616,8 +1610,6 @@ _func_exit_; void p2p_protocol_wk_hdl(struct adapter *padapter, int intCmdType) { - struct wifidirect_info *pwdinfo = &(padapter->wdinfo); - _func_enter_; switch (intCmdType) { @@ -1875,7 +1867,6 @@ static void pre_tx_scan_timer_process(void *FunctionContext) struct wifidirect_info *pwdinfo = &adapter->wdinfo; unsigned long irqL; struct mlme_priv *pmlmepriv = &adapter->mlmepriv; - u8 _status = 0; if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) return; @@ -2045,12 +2036,8 @@ int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role) { int ret = _SUCCESS; struct wifidirect_info *pwdinfo = &(padapter->wdinfo); - struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; if (role == P2P_ROLE_DEVICE || role == P2P_ROLE_CLIENT || role == P2P_ROLE_GO) { - u8 channel, ch_offset; - u16 bwmode; - /* leave IPS/Autosuspend */ if (_FAIL == rtw_pwr_wakeup(padapter)) { ret = _FAIL; diff --git a/core/rtw_pwrctrl.c b/core/rtw_pwrctrl.c index 2d7032b..d916889 100644 --- a/core/rtw_pwrctrl.c +++ b/core/rtw_pwrctrl.c @@ -31,7 +31,6 @@ void ips_enter(struct adapter *padapter) { struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct xmit_priv *pxmit_priv = &padapter->xmitpriv; if (padapter->registrypriv.mp_mode == 1) @@ -170,9 +169,6 @@ exit: void rtw_ps_processor(struct adapter *padapter) { -#ifdef CONFIG_P2P - struct wifidirect_info *pwdinfo = &(padapter->wdinfo); -#endif /* CONFIG_P2P */ struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); enum rt_rf_power_state rfpwrstate; @@ -427,8 +423,6 @@ s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms) void LPS_Enter(struct adapter *padapter) { struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct adapter *buddy = padapter->pbuddy_adapter; _func_enter_; @@ -461,8 +455,6 @@ void LPS_Leave(struct adapter *padapter) #define LPS_LEAVE_TIMEOUT_MS 100 struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; - u32 start_time; - u8 bAwake = false; _func_enter_; diff --git a/core/rtw_recv.c b/core/rtw_recv.c index 07c92cd..0ca4bec 100644 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -1201,7 +1201,6 @@ int validate_recv_data_frame(struct adapter *adapter, union recv_frame *precv_fr struct sta_info *psta = NULL; u8 *ptr = precv_frame->u.hdr.rx_data; struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib; - struct sta_priv *pstapriv = &adapter->stapriv; struct security_priv *psecuritypriv = &adapter->securitypriv; int ret = _SUCCESS; @@ -1785,7 +1784,6 @@ static int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe) /* Indicat the packets to upper layer */ if (sub_skb) { /* Insert NAT2.5 RX here! */ - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35)) rcu_read_lock(); @@ -2088,7 +2086,6 @@ static int recv_func_prehandle(struct adapter *padapter, union recv_frame *rfram { int ret = _SUCCESS; struct rx_pkt_attrib *pattrib = &rframe->u.hdr.attrib; - struct recv_priv *precvpriv = &padapter->recvpriv; struct __queue *pfree_recv_queue = &padapter->recvpriv.free_recv_queue; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; @@ -2124,7 +2121,6 @@ static int recv_func_posthandle(struct adapter *padapter, union recv_frame *prfr { int ret = _SUCCESS; union recv_frame *orig_prframe = prframe; - struct rx_pkt_attrib *pattrib = &prframe->u.hdr.attrib; struct recv_priv *precvpriv = &padapter->recvpriv; struct __queue *pfree_recv_queue = &padapter->recvpriv.free_recv_queue; @@ -2172,14 +2168,12 @@ int recv_func(struct adapter *padapter, union recv_frame *rframe) { int ret; struct rx_pkt_attrib *prxattrib = &rframe->u.hdr.attrib; - struct recv_priv *recvpriv = &padapter->recvpriv; struct security_priv *psecuritypriv = &padapter->securitypriv; struct mlme_priv *mlmepriv = &padapter->mlmepriv; /* check if need to handle uc_swdec_pending_queue*/ if (check_fwstate(mlmepriv, WIFI_STATION_STATE) && psecuritypriv->busetkipkey) { union recv_frame *pending_frame; - unsigned long irqL; while ((pending_frame = rtw_alloc_recvframe(&padapter->recvpriv.uc_swdec_pending_queue))) { if (recv_func_posthandle(padapter, pending_frame) == _SUCCESS) diff --git a/core/rtw_sreset.c b/core/rtw_sreset.c index 8815722..ce124c6 100644 --- a/core/rtw_sreset.c +++ b/core/rtw_sreset.c @@ -49,7 +49,6 @@ u8 sreset_get_wifi_status(struct adapter *padapter) u8 status = WIFI_STATUS_SUCCESS; u32 val32 = 0; - unsigned long irqL; if (psrtpriv->silent_reset_inprogress) return status; val32 = rtw_read32(padapter, REG_TXDMA_STATUS); diff --git a/core/rtw_wlan_util.c b/core/rtw_wlan_util.c index f0eb7d6..0c69e31 100644 --- a/core/rtw_wlan_util.c +++ b/core/rtw_wlan_util.c @@ -354,8 +354,6 @@ inline void rtw_set_oper_choffset(struct adapter *adapter, u8 offset) void SelectChannel(struct adapter *padapter, unsigned char channel) { - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - /* saved channel info */ rtw_set_oper_ch(padapter, channel); @@ -364,8 +362,6 @@ void SelectChannel(struct adapter *padapter, unsigned char channel) void SetBWMode(struct adapter *padapter, unsigned short bwmode, unsigned char channel_offset) { - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - /* saved bw info */ rtw_set_oper_bw(padapter, bwmode); rtw_set_oper_choffset(padapter, channel_offset); @@ -376,7 +372,6 @@ void SetBWMode(struct adapter *padapter, unsigned short bwmode, unsigned char ch void set_channel_bwmode(struct adapter *padapter, unsigned char channel, unsigned char channel_offset, unsigned short bwmode) { u8 center_ch; - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; if (padapter->bNotifyChannelChange) DBG_88E("[%s] ch = %d, offset = %d, bwmode = %d\n", __func__, channel, channel_offset, bwmode); @@ -766,7 +761,6 @@ void HT_caps_handler(struct adapter *padapter, struct ndis_802_11_var_ie *pIE) struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct ht_priv *phtpriv = &pmlmepriv->htpriv; - struct registry_priv *pregistrypriv = &padapter->registrypriv; if (pIE == NULL) return; @@ -925,7 +919,6 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len) u32 wpa_ielen = 0; u8 *pbssid = GetAddr3Ptr(pframe); u32 hidden_ssid = 0; - u8 cur_network_type, network_type = 0; struct HT_info_element *pht_info = NULL; struct rtw_ieee80211_ht_cap *pht_cap = NULL; u32 bcn_channel; @@ -1437,7 +1430,7 @@ unsigned char check_assoc_AP(u8 *pframe, uint len) return HT_IOT_PEER_ATHEROS; } else if ((_rtw_memcmp(pIE->data, BROADCOM_OUI1, 3)) || (_rtw_memcmp(pIE->data, BROADCOM_OUI2, 3)) || - (_rtw_memcmp(pIE->data, BROADCOM_OUI2, 3))) { + (_rtw_memcmp(pIE->data, BROADCOM_OUI3, 3))) { DBG_88E("link to Broadcom AP\n"); return HT_IOT_PEER_BROADCOM; } else if (_rtw_memcmp(pIE->data, MARVELL_OUI, 3)) { @@ -1695,7 +1688,6 @@ static struct adapter *pbuddy_padapter; int rtw_handle_dualmac(struct adapter *adapter, bool init) { int status = _SUCCESS; - struct dvobj_priv *dvobj = adapter_to_dvobj(adapter); if (init) { if (pbuddy_padapter == NULL) { diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c index 90f9f2b..90054ae 100644 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -672,7 +672,6 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr u8 *pframe, *payload, mic[8]; struct mic_data micdata; struct sta_info *stainfo; - struct qos_priv *pqospriv = &(padapter->mlmepriv.qospriv); struct pkt_attrib *pattrib = &pxmitframe->attrib; struct security_priv *psecuritypriv = &padapter->securitypriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv; @@ -1428,7 +1427,6 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* _queue *pf struct xmit_frame *pxframe = NULL; struct list_head *plist, *phead; struct __queue *pfree_xmit_queue = &pxmitpriv->free_xmit_queue; - struct adapter *padapter = pxmitpriv->adapter; _func_enter_; @@ -1593,7 +1591,7 @@ _func_enter_; inx[0] = 0; inx[1] = 1; inx[2] = 2; inx[3] = 3; if (pregpriv->wifi_spec == 1) { - int j, tmp, acirp_cnt[4]; + int j; for (j = 0; j < 4; j++) inx[j] = pxmitpriv->wmm_para_seq[j]; @@ -1763,7 +1761,6 @@ _func_exit_; static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb) { struct sk_buff *skb = *pskb; - struct xmit_priv *pxmitpriv = &padapter->xmitpriv; unsigned long irql; int res, is_vlan_tag = 0, i, do_nat25 = 1; unsigned short vlan_hdr = 0;