Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing unused variables #223

Open
wants to merge 3 commits into
base: 5.8.7.1_35809.20191129_COEX20191120-7777
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions core/efuse/rtw_efuse.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ BOOLEAN rtw_file_efuse_IsMasked(PADAPTER pAdapter, u16 Offset, u8 *maskbuf)
}
BOOLEAN efuse_IsBT_Masked(PADAPTER pAdapter, u16 Offset)
{
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(pAdapter);

if (pAdapter->registrypriv.boffefusemask)
return FALSE;

Expand All @@ -82,8 +80,6 @@ BOOLEAN efuse_IsBT_Masked(PADAPTER pAdapter, u16 Offset)

void rtw_bt_efuse_mask_array(PADAPTER pAdapter, u8 *pArray)
{
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(pAdapter);

#ifdef CONFIG_BT_EFUSE_MASK
#ifdef CONFIG_USB_HCI
if (IS_HARDWARE_TYPE_8822CU(pAdapter))
Expand All @@ -103,8 +99,6 @@ if (IS_HARDWARE_TYPE_8822CU(pAdapter))

u16 rtw_get_bt_efuse_mask_arraylen(PADAPTER pAdapter)
{
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);

#ifdef CONFIG_BT_EFUSE_MASK
#ifdef CONFIG_USB_HCI
if (IS_HARDWARE_TYPE_8822CU(pAdapter))
Expand Down Expand Up @@ -1184,7 +1178,7 @@ u8 rtw_efuse_map_read(PADAPTER adapter, u16 addr, u16 cnts, u8 *data)
{
struct dvobj_priv *d;
u8 *efuse = NULL;
u32 size, i;
u32 size;
int err;
u32 backupRegs[4] = {0};
u8 status = _SUCCESS;
Expand Down Expand Up @@ -1566,8 +1560,6 @@ void hal_ReadEFuse_BT_logic_map(
)
{

PHAL_DATA_TYPE pHalData = GET_HAL_DATA(padapter);

u8 *efuseTbl, *phyefuse;
u8 bank;
u16 eFuse_Addr = 0;
Expand Down
2 changes: 0 additions & 2 deletions core/rtw_ap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,6 @@ void start_bss_network(_adapter *padapter, struct createbss_parm *parm)
u8 mlme_act = MLME_ACTION_UNKNOWN;
u8 val8;
u16 bcn_interval;
u32 acparm;
struct registry_priv *pregpriv = &padapter->registrypriv;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
struct security_priv *psecuritypriv = &(padapter->securitypriv);
Expand Down Expand Up @@ -4569,7 +4568,6 @@ u8 rtw_ap_chbw_decision(_adapter *adapter, u8 ifbmp, u8 excl_ifbmp
{
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
RT_CHANNEL_INFO *chset = adapter_to_chset(adapter);
struct rf_ctl_t *rfctl = adapter_to_rfctl(adapter);
bool ch_avail = _FALSE;
u8 cur_ie_ch[CONFIG_IFACE_NUMBER] = {0};
u8 cur_ie_bw[CONFIG_IFACE_NUMBER] = {0};
Expand Down
10 changes: 0 additions & 10 deletions core/rtw_beamforming.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ static void _get_txvector_parameter(PADAPTER adapter, struct sta_info *sta, u8 *
u16 aid;
u8 *bssid;
u16 val16;
u8 i;


mlme = &adapter->mlmepriv;
Expand Down Expand Up @@ -170,9 +169,7 @@ static u8 _send_ht_ndpa_packet(PADAPTER adapter, u8 *ra, enum channel_width bw)
struct mlme_ext_info *pmlmeinfo;
struct xmit_frame *pmgntframe;
/* Beamforming */
struct beamforming_info *info;
struct beamformee_entry *bfee;
struct ndpa_sta_info sta_info;
u8 ActionHdr[4] = {ACT_CAT_VENDOR, 0x00, 0xE0, 0x4C};
/* MISC */
struct pkt_attrib *attrib;
Expand Down Expand Up @@ -715,8 +712,6 @@ static void _sounding_handler(PADAPTER adapter)
struct sounding_info *sounding;
struct beamformee_entry *bfee;
u8 su_idx, i;
u32 timeout_period = 0;
u8 set_timer = _FALSE;
int ret = 0;
static u16 wait_cnt = 0;

Expand Down Expand Up @@ -1000,8 +995,6 @@ static struct beamformer_entry *_bfer_add_entry(PADAPTER adapter,
struct mlme_priv *mlme;
struct beamforming_info *info;
struct beamformer_entry *bfer;
u8 *bssid;
u16 val16;
u8 i;


Expand Down Expand Up @@ -1185,8 +1178,6 @@ static struct beamformee_entry *_bfee_add_entry(PADAPTER adapter,
struct mlme_priv *mlme;
struct beamforming_info *info;
struct beamformee_entry *bfee;
u8 *bssid;
u16 val16;
u8 i;


Expand Down Expand Up @@ -1460,7 +1451,6 @@ static void _beamforming_leave(PADAPTER adapter, u8 *ra)
struct beamforming_info *info;
struct beamformer_entry *bfer = NULL;
struct beamformee_entry *bfee = NULL;
u8 bHwStateAddInit = _FALSE;


RTW_INFO("+%s\n", __FUNCTION__);
Expand Down
11 changes: 0 additions & 11 deletions core/rtw_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -6078,20 +6078,9 @@ ssize_t proc_set_tx_auth(struct file *file, const char __user *buffer, size_t co
{
struct net_device *dev = data;
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
struct sta_priv *pstapriv = &padapter->stapriv;
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
struct macid_ctl_t *macid_ctl = dvobj_to_macidctl(dvobj);
struct sta_info *psta;
_list *plist, *phead;
_irqL irqL;
char tmp[16];
u8 mac_addr[NUM_STA][ETH_ALEN];
u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
u32 tx_auth;
u8 index;


if (count > 2) {
Expand Down
2 changes: 2 additions & 0 deletions core/rtw_mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1563,7 +1563,9 @@ void rtw_survey_event_callback(_adapter *adapter, u8 *pbuf)
void rtw_surveydone_event_callback(_adapter *adapter, u8 *pbuf)
{
_irqL irqL;
#ifdef CONFIG_RTW_ACS
struct surveydone_event *parm = (struct surveydone_event *)pbuf;
#endif
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
#ifdef CONFIG_RTW_80211R
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
Expand Down
27 changes: 18 additions & 9 deletions core/rtw_mlme_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ void rtw_txpwr_init_regd(struct rf_ctl_t *rfctl)
, rfctl->country_ent ? rfctl->country_ent->alpha2 : NULL
, rfctl->ChannelPlan);
if (exc) {
#ifdef CONFIG_RTW_DEBUG
u8 has_country = (exc->country[0] == '\0' && exc->country[1] == '\0') ? 0 : 1;
#endif

if (strcmp(exc->regd_name, regd_str(TXPWR_LMT_NONE)) == 0)
rfctl->regd_name = regd_str(TXPWR_LMT_NONE);
Expand Down Expand Up @@ -393,7 +395,6 @@ bool _rtw_rfctl_overlap_radar_detect_ch(struct rf_ctl_t *rfctl, u8 ch, u8 bw, u8
bool ret = _FALSE;
u32 hi = 0, lo = 0;
u32 r_hi = 0, r_lo = 0;
int i;

if (rfctl->radar_detect_by_others)
goto exit;
Expand Down Expand Up @@ -549,7 +550,6 @@ inline void rtw_chset_update_non_ocp_ms(RT_CHANNEL_INFO *ch_set, u8 ch, u8 bw, u

u32 rtw_get_ch_waiting_ms(struct rf_ctl_t *rfctl, u8 ch, u8 bw, u8 offset, u32 *r_non_ocp_ms, u32 *r_cac_ms)
{
struct dvobj_priv *dvobj = rfctl_to_dvobj(rfctl);
u32 non_ocp_ms;
u32 cac_ms;
u8 in_rd_range = 0; /* if in current radar detection range*/
Expand Down Expand Up @@ -6165,7 +6165,9 @@ int issue_probereq_p2p_ex(_adapter *adapter, u8 *da, int try_cnt, int wait_ms)
{
int ret;
int i = 0;
#ifdef CONFIG_RTW_DEBUG
systime start = rtw_get_current_time();
#endif

do {
ret = _issue_probereq_p2p(adapter, da, wait_ms > 0 ? _TRUE : _FALSE);
Expand Down Expand Up @@ -7277,10 +7279,8 @@ unsigned int OnAction_sa_query(_adapter *padapter, union recv_frame *precv_frame
{
u8 *pframe = precv_frame->u.hdr.rx_data;
struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib;
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct sta_info *psta;
struct sta_priv *pstapriv = &padapter->stapriv;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
u16 tid;
/* Baron */

Expand Down Expand Up @@ -8568,7 +8568,9 @@ int issue_probereq_ex(_adapter *padapter, const NDIS_802_11_SSID *pssid, const u
{
int ret = _FAIL;
int i = 0;
#ifdef CONFIG_RTW_DEBUG
systime start = rtw_get_current_time();
#endif

if (rtw_rfctl_is_tx_blocked_by_ch_waiting(adapter_to_rfctl(padapter)))
goto exit;
Expand Down Expand Up @@ -9597,7 +9599,9 @@ int issue_nulldata(_adapter *padapter, unsigned char *da, unsigned int power_mod
{
int ret = _FAIL;
int i = 0;
#ifdef CONFIG_RTW_DEBUG
systime start = rtw_get_current_time();
#endif
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);

Expand Down Expand Up @@ -9751,7 +9755,9 @@ int issue_qos_nulldata(_adapter *padapter, unsigned char *da, u16 tid, u8 ps, in
{
int ret = _FAIL;
int i = 0;
#ifdef CONFIG_RTW_DEBUG
systime start = rtw_get_current_time();
#endif
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);

Expand Down Expand Up @@ -9892,7 +9898,9 @@ int issue_deauth_ex(_adapter *padapter, u8 *da, unsigned short reason, int try_c
{
int ret = _FAIL;
int i = 0;
#ifdef CONFIG_RTW_DEBUG
systime start = rtw_get_current_time();
#endif

if (rtw_rfctl_is_tx_blocked_by_ch_waiting(adapter_to_rfctl(padapter)))
goto exit;
Expand Down Expand Up @@ -9998,7 +10006,6 @@ void issue_action_spct_ch_switch(_adapter *padapter, u8 *ra, u8 new_ch, u8 ch_of
void issue_action_SA_Query(_adapter *padapter, unsigned char *raddr, unsigned char action, unsigned short tid, u8 key_type)
{
u8 category = RTW_WLAN_CATEGORY_SA_QUERY;
u16 reason_code;
struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib;
u8 *pframe;
Expand All @@ -10009,8 +10016,6 @@ void issue_action_SA_Query(_adapter *padapter, unsigned char *raddr, unsigned ch
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
struct sta_info *psta;
struct sta_priv *pstapriv = &padapter->stapriv;
struct registry_priv *pregpriv = &padapter->registrypriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;

if (rtw_rfctl_is_tx_blocked_by_ch_waiting(adapter_to_rfctl(padapter)))
return;
Expand Down Expand Up @@ -10308,7 +10313,9 @@ inline u8 issue_addba_rsp_wait_ack(_adapter *adapter, unsigned char *ra, u8 tid,
{
int ret = _FAIL;
int i = 0;
#ifdef CONFIG_RTW_DEBUG
systime start = rtw_get_current_time();
#endif

if (rtw_rfctl_is_tx_blocked_by_ch_waiting(adapter_to_rfctl(adapter)))
goto exit;
Expand Down Expand Up @@ -10386,7 +10393,9 @@ int issue_del_ba_ex(_adapter *adapter, unsigned char *ra, u8 tid, u16 reason, u8
{
int ret = _FAIL;
int i = 0;
#ifdef CONFIG_RTW_DEBUG
systime start = rtw_get_current_time();
#endif

if (rtw_rfctl_is_tx_blocked_by_ch_waiting(adapter_to_rfctl(adapter)))
goto exit;
Expand Down Expand Up @@ -10664,7 +10673,9 @@ int issue_action_SM_PS_wait_ack(_adapter *padapter, unsigned char *raddr, u8 New
{
int ret = _FAIL;
int i = 0;
#ifdef CONFIG_RTW_DEBUG
systime start = rtw_get_current_time();
#endif

if (rtw_rfctl_is_tx_blocked_by_ch_waiting(adapter_to_rfctl(padapter)))
goto exit;
Expand Down Expand Up @@ -13068,8 +13079,6 @@ void sa_query_timer_hdl(void *ctx)
{
struct sta_info *psta = (struct sta_info *)ctx;
_adapter *padapter = psta->padapter;
_irqL irqL;
struct sta_priv *pstapriv = &padapter->stapriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;

if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE &&
Expand Down
3 changes: 0 additions & 3 deletions core/rtw_mp.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,6 @@ void mpt_InitHWConfig(PADAPTER Adapter)

#ifdef CONFIG_RTL8822B
else if (IS_HARDWARE_TYPE_8822B(Adapter)) {
u32 tmp_reg = 0;

PlatformEFIOWrite2Byte(Adapter, REG_RXFLTMAP1_8822B, 0x2000);
/* fixed wifi can't 2.4g tx suggest by Szuyitasi 20160504 */
phy_set_bb_reg(Adapter, 0x70, bMaskByte3, 0x0e);
Expand Down Expand Up @@ -2403,7 +2401,6 @@ static u32 rtw_GetPSDData(PADAPTER pAdapter, u32 point)
*/
u32 mp_query_psd(PADAPTER pAdapter, u8 *data)
{
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);
struct dm_struct *p_dm = adapter_to_phydm(pAdapter);

u32 i, psd_pts = 0, psd_start = 0, psd_stop = 0;
Expand Down
6 changes: 6 additions & 0 deletions core/rtw_odm.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ void rtw_odm_parse_rx_phy_status_chinfo(union recv_frame *rframe, u8 *phys)
_adapter *adapter = rframe->u.hdr.adapter;
struct dm_struct *phydm = adapter_to_phydm(adapter);
struct rx_pkt_attrib *attrib = &rframe->u.hdr.attrib;
#ifdef CONFIG_RTW_DEBUG
u8 *wlanhdr = get_recvframe_data(rframe);
#endif

if (phydm->support_ic_type & PHYSTS_2ND_TYPE_IC) {
/*
Expand Down Expand Up @@ -247,7 +249,9 @@ void rtw_odm_parse_rx_phy_status_chinfo(union recv_frame *rframe, u8 *phys)
*/

if ((*phys & 0xf) == 0) {
#ifdef CONFIG_RTW_DEBUG
struct phy_sts_rpt_jgr2_type0 *phys_t0 = (struct phy_sts_rpt_jgr2_type0 *)phys;
#endif

if (DBG_RX_PHYSTATUS_CHINFO) {
RTW_PRINT("phys_t%u ta="MAC_FMT" %s, %s(band:%u, ch:%u, l_rxsc:%u)\n"
Expand Down Expand Up @@ -375,7 +379,9 @@ void rtw_odm_parse_rx_phy_status_chinfo(union recv_frame *rframe, u8 *phys)
attrib->ch = pkt_cch;

} else {
#ifdef CONFIG_RTW_DEBUG
struct phy_sts_rpt_jgr2_type2 *phys_t2 = (struct phy_sts_rpt_jgr2_type2 *)phys;
#endif

if (DBG_RX_PHYSTATUS_CHINFO) {
RTW_PRINT("phys_t%u ta="MAC_FMT" %s, %s(band:%u, ch:%u, l_rxsc:%u, ht_rxsc:%u)\n"
Expand Down
2 changes: 2 additions & 0 deletions core/rtw_pwrctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,9 @@ bool rtw_pwr_unassociated_idle(_adapter *adapter)
void rtw_ps_processor(_adapter *padapter)
{
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
#ifdef CONFIG_RTW_DEBUG
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
#endif
struct dvobj_priv *psdpriv = padapter->dvobj;
struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
#ifdef SUPPORT_HW_RFOFF_DETECTED
Expand Down
4 changes: 4 additions & 0 deletions core/rtw_recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,11 @@ sint recv_decache(union recv_frame *precv_frame)
{
struct sta_info *psta = precv_frame->u.hdr.psta;
struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib;
#ifdef CONFIG_RTW_DEBUG
#if defined(DBG_RX_SEQ) || defined(DBG_RX_DROP_FRAME)
_adapter *adapter = psta->padapter;
#endif
#endif
sint tid = pattrib->priority;
u16 seq_ctrl = ((precv_frame->u.hdr.attrib.seq_num & 0xffff) << 4) |
(precv_frame->u.hdr.attrib.frag_num & 0xf);
Expand Down
2 changes: 1 addition & 1 deletion core/rtw_security.c
Original file line number Diff line number Diff line change
Expand Up @@ -2038,7 +2038,7 @@ u32 rtw_BIP_verify(_adapter *padapter, u8 *whdr_pos, sint flen
{
u8 *BIP_AAD, *mme;
u32 res = _FAIL;
uint len, ori_len;
uint ori_len;
u16 pkt_keyid = 0;
u64 pkt_ipn = 0;
struct rtw_ieee80211_hdr *pwlanhdr;
Expand Down
4 changes: 2 additions & 2 deletions core/rtw_wlan_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -2631,9 +2631,7 @@ bool rtw_bcn_key_compare(struct beacon_keys *cur, struct beacon_keys *recv)

int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
{
u8 *pbssid = GetAddr3Ptr(pframe);
struct mlme_priv *pmlmepriv = &Adapter->mlmepriv;
struct wlan_network *cur_network = &(Adapter->mlmepriv.cur_network);
struct beacon_keys *cur_beacon = &pmlmepriv->cur_beacon_keys;
struct beacon_keys recv_beacon;
int ret = 0;
Expand Down Expand Up @@ -2798,7 +2796,9 @@ void parsing_eapol_packet(_adapter *padapter, u8 *key_payload, struct sta_info *
struct ieee802_1x_hdr *hdr;
struct wpa_eapol_key *key;
u16 key_info, key_data_length;
#ifdef CONFIG_RTW_DEBUG
char *trx_msg = trx_type ? "send" : "recv";
#endif

hdr = (struct ieee802_1x_hdr *) key_payload;

Expand Down
Loading