mirror of
https://github.com/amazingfate/rtl8723ds.git
synced 2026-06-18 18:29:01 +01:00
rtl8723ds: Clean up some Coverity and Smatch warnings
The includes turning CONGIG_MP_INCLUDED off. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
+4
-2
@@ -1929,12 +1929,12 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||
#endif /* CONFIG_80211AC_VHT */
|
||||
|
||||
if(pbss_network->Configuration.DSConfig <= 14 && padapter->registrypriv.wifi_spec == 1) {
|
||||
uint len = 0;
|
||||
uint lena = 0;
|
||||
#ifdef CONFIG_80211N_HT
|
||||
SET_EXT_CAPABILITY_ELE_BSS_COEXIST(pmlmepriv->ext_capab_ie_data, 1);
|
||||
#endif /* CONFIG_80211N_HT */
|
||||
pmlmepriv->ext_capab_ie_len = 10;
|
||||
rtw_set_ie(pbss_network->IEs + pbss_network->IELength, EID_EXTCapability, 8, pmlmepriv->ext_capab_ie_data, &len);
|
||||
rtw_set_ie(pbss_network->IEs + pbss_network->IELength, EID_EXTCapability, 8, pmlmepriv->ext_capab_ie_data, &lena);
|
||||
pbss_network->IELength += pmlmepriv->ext_capab_ie_len;
|
||||
}
|
||||
|
||||
@@ -3904,7 +3904,9 @@ bool rtw_ap_chbw_decision(_adapter *adapter, s16 req_ch, s8 req_bw, s8 req_offse
|
||||
if (rtw_chset_is_ch_non_ocp(mlmeext->channel_set, dec_ch, dec_bw, dec_offset) == _FALSE)
|
||||
goto update_bss_chbw;
|
||||
|
||||
#if defined(CONFIG_DFS_MASTER)
|
||||
choose_chbw:
|
||||
#endif
|
||||
if (req_bw < 0)
|
||||
req_bw = cur_ie_bw;
|
||||
|
||||
|
||||
+1
-9
@@ -2311,10 +2311,7 @@ u8 rtw_tdls_cmd(_adapter *padapter, u8 *addr, u8 option)
|
||||
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
|
||||
|
||||
pcmdobj = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (pcmdobj == NULL) {
|
||||
res = _FAIL;
|
||||
@@ -2336,12 +2333,8 @@ u8 rtw_tdls_cmd(_adapter *padapter, u8 *addr, u8 option)
|
||||
init_h2fwcmd_w_parm_no_rsp(pcmdobj, TDLSoption, GEN_CMD_CODE(_TDLS));
|
||||
res = rtw_enqueue_cmd(pcmdpriv, pcmdobj);
|
||||
|
||||
#endif /* CONFIG_TDLS */
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
|
||||
#endif /* CONFIG_TDLS */
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -4565,7 +4558,6 @@ void rtw_create_ibss_post_hdl(_adapter *padapter, int status)
|
||||
|
||||
createbss_cmd_fail:
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
exit:
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -2131,6 +2131,7 @@ int proc_get_rx_signal(struct seq_file *m, void *v)
|
||||
/* RTW_PRINT_SEL(m, "rxpwdb:%d\n", padapter->recvpriv.rxpwdb); */
|
||||
RTW_PRINT_SEL(m, "signal_strength:%u\n", padapter->recvpriv.signal_strength);
|
||||
RTW_PRINT_SEL(m, "signal_qual:%u\n", padapter->recvpriv.signal_qual);
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1) {
|
||||
if (padapter->mppriv.antenna_rx == ANTENNA_A)
|
||||
RTW_PRINT_SEL(m, "Antenna: A\n");
|
||||
@@ -2150,6 +2151,7 @@ int proc_get_rx_signal(struct seq_file *m, void *v)
|
||||
RTW_PRINT_SEL(m, "Antenna: __\n");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
rtw_get_noise(padapter);
|
||||
RTW_PRINT_SEL(m, "noise:%d\n", padapter->recvpriv.noise);
|
||||
@@ -2389,10 +2391,9 @@ ssize_t proc_set_rx_ampdu(struct file *file, const char __user *buffer, size_t c
|
||||
|
||||
rtw_rx_ampdu_apply(padapter);
|
||||
}
|
||||
|
||||
exit:
|
||||
return count;
|
||||
}
|
||||
|
||||
int proc_get_rx_ampdu_factor(struct seq_file *m, void *v)
|
||||
{
|
||||
struct net_device *dev = m->private;
|
||||
|
||||
@@ -1380,9 +1380,9 @@ extern char *rtw_initmac;
|
||||
void rtw_macaddr_cfg(u8 *out, const u8 *hw_mac_addr)
|
||||
{
|
||||
#define DEFAULT_RANDOM_MACADDR 1
|
||||
u8 mac[ETH_ALEN];
|
||||
u8 mac[ETH_ALEN] = {0};
|
||||
|
||||
if (out == NULL) {
|
||||
if (!out) {
|
||||
rtw_warn_on(1);
|
||||
return;
|
||||
}
|
||||
|
||||
+1
-3
@@ -718,7 +718,6 @@ struct wlan_network *_rtw_find_same_network(_queue *scanned_queue, struct wlan_n
|
||||
|
||||
if (plist == phead)
|
||||
found = NULL;
|
||||
exit:
|
||||
return found;
|
||||
}
|
||||
|
||||
@@ -2441,7 +2440,7 @@ static void rtw_sta_mstatus_disc_rpt(_adapter *adapter, u8 mac_id)
|
||||
|
||||
RTW_INFO("%s "ADPT_FMT" - mac_id=%d\n", __func__, ADPT_ARG(adapter), mac_id);
|
||||
|
||||
if (mac_id >= 0 && mac_id < macid_ctl->num) {
|
||||
if (mac_id < macid_ctl->num) {
|
||||
rtw_hal_set_FwMediaStatusRpt_single_cmd(adapter, 0, 0, 0, 0, mac_id);
|
||||
/*
|
||||
* For safety, prevent from keeping macid sleep.
|
||||
@@ -2784,7 +2783,6 @@ void rtw_mlme_reset_auto_scan_int(_adapter *adapter, u8 *reason)
|
||||
*reason |= RTW_AUTO_SCAN_REASON_2040_BSS;
|
||||
}
|
||||
|
||||
exit:
|
||||
if (interval_ms == 0xffffffff)
|
||||
interval_ms = 0;
|
||||
|
||||
|
||||
@@ -1465,7 +1465,9 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame)
|
||||
ptable->func = &OnAuth;
|
||||
else
|
||||
ptable->func = &OnAuthClient;
|
||||
{
|
||||
__attribute__ ((__fallthrough__));/* FALL THRU */
|
||||
}
|
||||
case WIFI_ASSOCREQ:
|
||||
case WIFI_REASSOCREQ:
|
||||
_mgt_dispatcher(padapter, ptable, precv_frame);
|
||||
@@ -13977,7 +13979,9 @@ void survey_done_set_ch_bw(_adapter *padapter)
|
||||
FUNC_ADPT_ARG(padapter), cur_channel, cur_bwmode, cur_ch_offset);
|
||||
}
|
||||
}
|
||||
#ifdef CONFIG_MCC_MODE
|
||||
exit:
|
||||
#endif
|
||||
set_channel_bwmode(padapter, cur_channel, cur_ch_offset, cur_bwmode);
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -2388,13 +2388,13 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
||||
if (num_of_secdev_type == 0)
|
||||
psta->num_of_secdev_type = 0;
|
||||
else {
|
||||
u32 len;
|
||||
u32 lena;
|
||||
|
||||
psta->num_of_secdev_type = num_of_secdev_type;
|
||||
|
||||
len = (sizeof(psta->secdev_types_list) < (num_of_secdev_type * 8)) ? (sizeof(psta->secdev_types_list)) : (num_of_secdev_type * 8);
|
||||
lena = (sizeof(psta->secdev_types_list) < (num_of_secdev_type * 8)) ? (sizeof(psta->secdev_types_list)) : (num_of_secdev_type * 8);
|
||||
|
||||
_rtw_memcpy(psta->secdev_types_list, pattr_content, len);
|
||||
_rtw_memcpy(psta->secdev_types_list, pattr_content, lena);
|
||||
|
||||
pattr_content += (num_of_secdev_type * 8);
|
||||
}
|
||||
|
||||
+2
-15
@@ -3106,8 +3106,6 @@ int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prframe)
|
||||
|
||||
return retval;
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
_enter_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
@@ -3124,15 +3122,7 @@ int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prframe)
|
||||
#ifdef DBG_RX_DROP_FRAME
|
||||
RTW_INFO("DBG_RX_DROP_FRAME %s check_indicate_seq fail\n", __FUNCTION__);
|
||||
#endif
|
||||
#if 0
|
||||
rtw_recv_indicatepkt(padapter, prframe);
|
||||
|
||||
_exit_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
|
||||
goto _success_exit;
|
||||
#else
|
||||
goto _err_exit;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -3170,14 +3160,9 @@ int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prframe)
|
||||
_exit_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
_cancel_timer_ex(&preorder_ctrl->reordering_ctrl_timer);
|
||||
}
|
||||
|
||||
|
||||
_success_exit:
|
||||
|
||||
return _SUCCESS;
|
||||
|
||||
_err_exit:
|
||||
|
||||
_exit_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
|
||||
return _FAIL;
|
||||
@@ -4078,7 +4063,9 @@ int recv_func_posthandle(_adapter *padapter, union recv_frame *prframe)
|
||||
}
|
||||
#endif /* CONFIG_80211N_HT */
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
_exit_recv_func:
|
||||
#endif
|
||||
return ret;
|
||||
|
||||
_recv_data_drop:
|
||||
|
||||
@@ -951,7 +951,9 @@ const struct country_chplan *rtw_get_chplan_from_country(const char *country_cod
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(CONFIG_CUSTOMIZED_COUNTRY_CHPLAN_MAP) && RTW_DEF_MODULE_REGULATORY_CERT
|
||||
exit:
|
||||
#endif
|
||||
#if RTW_DEF_MODULE_REGULATORY_CERT
|
||||
if (ent && !(COUNTRY_CHPLAN_DEF_MODULE_FALGS(ent) & RTW_DEF_MODULE_REGULATORY_CERT))
|
||||
ent = NULL;
|
||||
|
||||
+2
-9
@@ -463,9 +463,6 @@ void rtw_get_adapter_tx_rate_bmp_by_bw(_adapter *adapter, u8 bw, u16 *r_bmp_cck_
|
||||
bmp_ht |= (macid_ctl->rate_bmp0[i] >> 12) | (macid_ctl->rate_bmp1[i] << 20);
|
||||
}
|
||||
|
||||
/* TODO: mlmeext->tx_rate*/
|
||||
|
||||
exit:
|
||||
if (r_bmp_cck_ofdm)
|
||||
*r_bmp_cck_ofdm = bmp_cck_ofdm;
|
||||
if (r_bmp_ht)
|
||||
@@ -2722,9 +2719,6 @@ static struct xmit_buf *__rtw_alloc_cmd_xmitbuf(struct xmit_priv *pxmitpriv,
|
||||
} else
|
||||
RTW_INFO("%s fail, no xmitbuf available !!!\n", __func__);
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return pxmitbuf;
|
||||
}
|
||||
|
||||
@@ -4407,9 +4401,6 @@ void stop_sta_xmit(_adapter *padapter, struct sta_info *psta)
|
||||
if (!(psta->tdls_sta_state & TDLS_LINKED_STATE))
|
||||
#endif /* CONFIG_TDLS */
|
||||
pstapriv->sta_dz_bitmap |= BIT(psta->aid);
|
||||
|
||||
|
||||
|
||||
dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->vo_q.sta_pending);
|
||||
rtw_list_delete(&(pstaxmitpriv->vo_q.tx_pending));
|
||||
|
||||
@@ -4698,7 +4689,9 @@ void xmit_delivery_enabled_frames(_adapter *padapter, struct sta_info *psta)
|
||||
|
||||
}
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
exit:
|
||||
#endif
|
||||
/* _exit_critical_bh(&psta->sleep_q.lock, &irqL); */
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user