Remove unused code blocks as required in TODO file
Fabio Aiuto (15):
staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_AUTO_AP_MODE
staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_HW_PWRP_DETECTION
staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_QOS_OPTIMIZATION
staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_AP_WOWLAN
staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_PM
staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_SIGNAL_DISPLAY_DBM
staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_BACKGROUND_NOISE_MONITOR
staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_SKIP_SIGNAL_SCALE_MAPPING
staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_GPIO_API
staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_EXT_CLK
staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_CHECK_BT_HANG
staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_SDIO_TX_TASKLET
staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_SW_CHANNEL_PLAN
staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_C2H_PACKET_EN
staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_ODM_ADAPTIVITY
drivers/staging/rtl8723bs/core/rtw_ap.c | 4 -
drivers/staging/rtl8723bs/core/rtw_mlme.c | 3 -
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 250 -------------
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 35 --
drivers/staging/rtl8723bs/core/rtw_recv.c | 32 --
.../staging/rtl8723bs/core/rtw_wlan_util.c | 126 -------
drivers/staging/rtl8723bs/core/rtw_xmit.c | 5 -
drivers/staging/rtl8723bs/hal/hal_com.c | 37 --
drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 9 -
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 339 ------------------
drivers/staging/rtl8723bs/hal/rtl8723b_dm.c | 3 -
.../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 71 ----
.../staging/rtl8723bs/hal/rtl8723bs_xmit.c | 8 -
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 126 -------
drivers/staging/rtl8723bs/hal/sdio_ops.c | 37 --
drivers/staging/rtl8723bs/include/drv_types.h | 6 -
.../rtl8723bs/include/drv_types_sdio.h | 5 -
drivers/staging/rtl8723bs/include/hal_com.h | 10 -
.../staging/rtl8723bs/include/hal_com_h2c.h | 30 --
drivers/staging/rtl8723bs/include/hal_data.h | 5 -
drivers/staging/rtl8723bs/include/hal_intf.h | 3 -
.../staging/rtl8723bs/include/osdep_service.h | 7 -
.../staging/rtl8723bs/include/rtl8723b_cmd.h | 6 -
.../staging/rtl8723bs/include/rtl8723b_hal.h | 11 -
drivers/staging/rtl8723bs/include/rtw_mp.h | 3 -
drivers/staging/rtl8723bs/include/rtw_recv.h | 5 -
drivers/staging/rtl8723bs/include/rtw_xmit.h | 4 -
drivers/staging/rtl8723bs/include/sdio_ops.h | 7 -
drivers/staging/rtl8723bs/include/sta_info.h | 5 -
.../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 8 -
.../staging/rtl8723bs/os_dep/ioctl_linux.c | 130 +------
drivers/staging/rtl8723bs/os_dep/os_intfs.c | 142 --------
drivers/staging/rtl8723bs/os_dep/recv_linux.c | 41 ---
33 files changed, 1 insertion(+), 1512 deletions(-)
--
2.20.1
remove conditional code blocks checked by unused CONFIG_AUTO_AP_MODE
cleaning required in TODO file:
find and remove code blocks guarded by never set CONFIG_FOO defines
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_ap.c | 4 -
drivers/staging/rtl8723bs/core/rtw_mlme.c | 3 -
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 238 ------------------
drivers/staging/rtl8723bs/core/rtw_recv.c | 32 ---
drivers/staging/rtl8723bs/core/rtw_xmit.c | 5 -
.../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 3 -
drivers/staging/rtl8723bs/include/sta_info.h | 5 -
drivers/staging/rtl8723bs/os_dep/recv_linux.c | 41 ---
8 files changed, 331 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
index abb2a2299511..63b339484289 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -270,10 +270,6 @@ void expire_timeout_chk(struct adapter *padapter)
while (phead != plist) {
psta = container_of(plist, struct sta_info, asoc_list);
plist = get_next(plist);
-#ifdef CONFIG_AUTO_AP_MODE
- if (psta->isrc)
- continue;
-#endif
if (chk_sta_is_alive(psta) || !psta->expire_to) {
psta->expire_to = pstapriv->expire_to;
psta->keep_alive_trycnt = 0;
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 723187a78484..725f699abda9 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -1478,8 +1478,6 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
rtw_sta_media_status_rpt(adapter, psta, 1);
-#ifndef CONFIG_AUTO_AP_MODE
-
ap_sta_info_defer_update(adapter, psta);
/* report to upper layer */
@@ -1503,7 +1501,6 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
kfree(passoc_req);
}
-#endif /* CONFIG_AUTO_AP_MODE */
}
return;
}
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 23362b39082b..0ca3ddfc8b08 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -619,115 +619,6 @@ unsigned int OnProbeReq(struct adapter *padapter, union recv_frame *precv_frame)
/* DBG_871X("+OnProbeReq\n"); */
-#ifdef CONFIG_AUTO_AP_MODE
- if (check_fwstate(pmlmepriv, _FW_LINKED) &&
- pmlmepriv->cur_network.join_res) {
- struct sta_info *psta;
- u8 *mac_addr, *peer_addr;
- struct sta_priv *pstapriv = &padapter->stapriv;
- u8 RC_OUI[4] = {0x00, 0xE0, 0x4C, 0x0A};
- /* EID[1] + EID_LEN[1] + RC_OUI[4] + MAC[6] + PairingID[2] + ChannelNum[2] */
-
- p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + _PROBEREQ_IE_OFFSET_, WLAN_EID_VENDOR_SPECIFIC, (int *)&ielen,
- len - WLAN_HDR_A3_LEN - _PROBEREQ_IE_OFFSET_);
-
- if (!p || ielen != 14)
- goto _non_rc_device;
-
- if (memcmp(p+2, RC_OUI, sizeof(RC_OUI)))
- goto _non_rc_device;
-
- if (memcmp(p+6, get_sa(pframe), ETH_ALEN)) {
- DBG_871X("%s, do rc pairing (%pM), but mac addr mismatch!(%pM)\n", __func__,
- MAC_ARG(get_sa(pframe)), MAC_ARG(p+6));
-
- goto _non_rc_device;
- }
-
- DBG_871X("%s, got the pairing device(%pM)\n", __func__, MAC_ARG(get_sa(pframe)));
-
- /* new a station */
- psta = rtw_get_stainfo(pstapriv, get_sa(pframe));
- if (psta == NULL) {
- /* allocate a new one */
- DBG_871X("going to alloc stainfo for rc =%pM\n", MAC_ARG(get_sa(pframe)));
- psta = rtw_alloc_stainfo(pstapriv, get_sa(pframe));
- if (!psta) {
- /* TODO: */
- DBG_871X(" Exceed the upper limit of supported clients...\n");
- return _SUCCESS;
- }
-
- spin_lock_bh(&pstapriv->asoc_list_lock);
- if (list_empty(&psta->asoc_list)) {
- psta->expire_to = pstapriv->expire_to;
- list_add_tail(&psta->asoc_list, &pstapriv->asoc_list);
- pstapriv->asoc_list_cnt++;
- }
- spin_unlock_bh(&pstapriv->asoc_list_lock);
-
- /* generate pairing ID */
- mac_addr = myid(&(padapter->eeprompriv));
- peer_addr = psta->hwaddr;
- psta->pid = (u16)(((mac_addr[4]<<8) + mac_addr[5]) + ((peer_addr[4]<<8) + peer_addr[5]));
-
- /* update peer stainfo */
- psta->isrc = true;
- /* psta->aid = 0; */
- /* psta->mac_id = 2; */
-
- /* get a unique AID */
- if (psta->aid > 0) {
- DBG_871X("old AID %d\n", psta->aid);
- } else {
- for (psta->aid = 1; psta->aid <= NUM_STA; psta->aid++)
- if (pstapriv->sta_aid[psta->aid - 1] == NULL)
- break;
-
- if (psta->aid > pstapriv->max_num_sta) {
- psta->aid = 0;
- DBG_871X("no room for more AIDs\n");
- return _SUCCESS;
- }
- pstapriv->sta_aid[psta->aid - 1] = psta;
- DBG_871X("allocate new AID = (%d)\n", psta->aid);
- }
-
- psta->qos_option = 1;
- psta->bw_mode = CHANNEL_WIDTH_20;
- psta->ieee8021x_blocked = false;
- psta->htpriv.ht_option = true;
- psta->htpriv.ampdu_enable = false;
- psta->htpriv.sgi_20m = false;
- psta->htpriv.sgi_40m = false;
- psta->htpriv.ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
- psta->htpriv.agg_enable_bitmap = 0x0;/* reset */
- psta->htpriv.candidate_tid_bitmap = 0x0;/* reset */
-
- rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, true);
-
- memset((void *)&psta->sta_stats, 0, sizeof(struct stainfo_stats));
-
- spin_lock_bh(&psta->lock);
- psta->state |= _FW_LINKED;
- spin_unlock_bh(&psta->lock);
-
- report_add_sta_event(padapter, psta->hwaddr, psta->aid);
-
- }
-
- issue_probersp(padapter, get_sa(pframe), false);
-
- return _SUCCESS;
-
- }
-
-_non_rc_device:
-
- return _SUCCESS;
-
-#endif /* CONFIG_AUTO_AP_MODE */
-
p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + _PROBEREQ_IE_OFFSET_, WLAN_EID_SSID, (int *)&ielen,
len - WLAN_HDR_A3_LEN - _PROBEREQ_IE_OFFSET_);
@@ -2771,36 +2662,6 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
}
-#ifdef CONFIG_AUTO_AP_MODE
-{
- struct sta_info *psta;
- struct sta_priv *pstapriv = &padapter->stapriv;
-
- DBG_871X("(%s)\n", __func__);
-
- /* check rc station */
- psta = rtw_get_stainfo(pstapriv, da);
- if (psta && psta->isrc && psta->pid > 0) {
- u8 RC_OUI[4] = {0x00, 0xE0, 0x4C, 0x0A};
- u8 RC_INFO[14] = {0};
- /* EID[1] + EID_LEN[1] + RC_OUI[4] + MAC[6] + PairingID[2] + ChannelNum[2] */
- u16 cu_ch = (u16)cur_network->Configuration.DSConfig;
-
- DBG_871X("%s, reply rc(pid = 0x%x) device %pM in ch =%d\n", __func__,
- psta->pid, MAC_ARG(psta->hwaddr), cu_ch);
-
- /* append vendor specific ie */
- memcpy(RC_INFO, RC_OUI, sizeof(RC_OUI));
- memcpy(&RC_INFO[4], mac, ETH_ALEN);
- memcpy(&RC_INFO[10], (u8 *)&psta->pid, 2);
- memcpy(&RC_INFO[12], (u8 *)&cu_ch, 2);
-
- pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, sizeof(RC_INFO), RC_INFO, &pattrib->pktlen);
- }
-}
-#endif /* CONFIG_AUTO_AP_MODE */
-
-
pattrib->last_txcmdsz = pattrib->pktlen;
@@ -5912,99 +5773,6 @@ u8 NULL_hdl(struct adapter *padapter, u8 *pbuf)
return H2C_SUCCESS;
}
-#ifdef CONFIG_AUTO_AP_MODE
-static int rtw_auto_ap_start_beacon(struct adapter *adapter)
-{
- int ret = 0;
- u8 *pbuf = NULL;
- uint len;
- u8 supportRate[16];
- int sz = 0, rateLen;
- u8 *ie;
- u8 wireless_mode, oper_channel;
- u8 ssid[3] = {0}; /* hidden ssid */
- u32 ssid_len = sizeof(ssid);
- struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
-
-
- if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true)
- return -EINVAL;
-
-
- len = 128;
- pbuf = rtw_zmalloc(len);
- if (!pbuf)
- return -ENOMEM;
-
-
- /* generate beacon */
- ie = pbuf;
-
- /* timestamp will be inserted by hardware */
- sz += 8;
- ie += sz;
-
- /* beacon interval : 2bytes */
- *(u16 *)ie = cpu_to_le16((u16)100);/* BCN_INTERVAL = 100; */
- sz += 2;
- ie += 2;
-
- /* capability info */
- *(u16 *)ie = 0;
- *(u16 *)ie |= cpu_to_le16(WLAN_CAPABILITY_ESS);
- *(u16 *)ie |= cpu_to_le16(WLAN_CAPABILITY_SHORT_PREAMBLE);
- /* u16*)ie |= cpu_to_le16(WLAN_CAPABILITY_PRIVACY); */
- sz += 2;
- ie += 2;
-
- /* SSID */
- ie = rtw_set_ie(ie, WLAN_EID_SSID, ssid_len, ssid, &sz);
-
- /* supported rates */
- wireless_mode = WIRELESS_11BG_24N;
- rtw_set_supported_rate(supportRate, wireless_mode);
- rateLen = rtw_get_rateset_len(supportRate);
- if (rateLen > 8) {
- ie = rtw_set_ie(ie, WLAN_EID_SUPP_RATES, 8, supportRate, &sz);
- } else {
- ie = rtw_set_ie(ie, WLAN_EID_SUPP_RATES, rateLen, supportRate, &sz);
- }
-
-
- /* DS parameter set */
- if (check_buddy_fwstate(adapter, _FW_LINKED) &&
- check_buddy_fwstate(adapter, WIFI_STATION_STATE)) {
- struct adapter *pbuddystruct adapter = adapter->pbuddystruct adapter;
- struct mlme_ext_priv *pbuddy_mlmeext = &pbuddystruct adapter->mlmeextpriv;
-
- oper_channel = pbuddy_mlmeext->cur_channel;
- } else {
- oper_channel = adapter_to_dvobj(adapter)->oper_channel;
- }
- ie = rtw_set_ie(ie, WLAN_EID_DS_PARAMS, 1, &oper_channel, &sz);
-
- /* ext supported rates */
- if (rateLen > 8) {
- ie = rtw_set_ie(ie, WLAN_EID_EXT_SUPP_RATES, (rateLen - 8), (supportRate + 8), &sz);
- }
-
- DBG_871X("%s, start auto ap beacon sz =%d\n", __func__, sz);
-
- /* lunch ap mode & start to issue beacon */
- if (rtw_check_beacon_data(adapter, pbuf, sz) == _SUCCESS) {
-
- } else {
- ret = -EINVAL;
- }
-
-
- kfree(pbuf);
-
- return ret;
-
-}
-#endif/* CONFIG_AUTO_AP_MODE */
-
u8 setopmode_hdl(struct adapter *padapter, u8 *pbuf)
{
u8 type;
@@ -6029,12 +5797,6 @@ u8 setopmode_hdl(struct adapter *padapter, u8 *pbuf)
rtw_hal_set_hwreg(padapter, HW_VAR_SET_OPMODE, (u8 *)(&type));
/* Set_MSR(padapter, type); */
-
-#ifdef CONFIG_AUTO_AP_MODE
- if (psetop->mode == Ndis802_11APMode)
- rtw_auto_ap_start_beacon(padapter);
-#endif
-
if (psetop->mode == Ndis802_11APMode) {
/* Do this after port switch to */
/* prevent from downloading rsvd page to wrong port */
diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
index 697da6834810..1fa381663b4c 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -1600,38 +1600,6 @@ signed int wlanhdr_to_ethhdr(union recv_frame *precvframe)
eth_type = ntohs(be_tmp); /* pattrib->ether_type */
pattrib->eth_type = eth_type;
-#ifdef CONFIG_AUTO_AP_MODE
- if (0x8899 == pattrib->eth_type) {
- struct sta_info *psta = precvframe->u.hdr.psta;
-
- DBG_871X("wlan rx: got eth_type = 0x%x\n", pattrib->eth_type);
-
- if (psta && psta->isrc && psta->pid > 0) {
- u16 rx_pid;
-
- rx_pid = *(u16 *)(ptr+rmv_len+2);
-
- DBG_871X("wlan rx(pid = 0x%x): sta(%pM) pid = 0x%x\n",
- rx_pid, MAC_ARG(psta->hwaddr), psta->pid);
-
- if (rx_pid == psta->pid) {
- int i;
- u16 len = *(u16 *)(ptr+rmv_len+4);
- /* u16 ctrl_type = *(u16*)(ptr+rmv_len+6); */
-
- /* DBG_871X("RC: len = 0x%x, ctrl_type = 0x%x\n", len, ctrl_type); */
- DBG_871X("RC: len = 0x%x\n", len);
-
- for (i = 0; i < len ; i++)
- DBG_871X("0x%x\n", *(ptr+rmv_len+6+i));
- /* DBG_871X("0x%x\n", *(ptr+rmv_len+8+i)); */
-
- DBG_871X("RC-end\n");
- }
- }
- }
-#endif /* CONFIG_AUTO_AP_MODE */
-
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true)) {
ptr += rmv_len;
*ptr = 0x87;
diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index 9d45484acdeb..2daf5c461a4d 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -467,11 +467,6 @@ static void update_attrib_phy_info(struct adapter *padapter, struct pkt_attrib *
pattrib->ampdu_spacing = psta->htpriv.rx_ampdu_min_spacing;
pattrib->retry_ctrl = false;
-
-#ifdef CONFIG_AUTO_AP_MODE
- if (psta->isrc && psta->pid > 0)
- pattrib->pctrl = true;
-#endif
}
static s32 update_attrib_sec_info(struct adapter *padapter, struct pkt_attrib *pattrib, struct sta_info *psta)
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 618b40ede2e4..49085525de05 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -3079,9 +3079,6 @@ static void rtl8723b_fill_default_txdesc(
(pattrib->ether_type != 0x88B4) &&
(pattrib->dhcp_pkt != 1) &&
(drv_userate != 1)
-#ifdef CONFIG_AUTO_AP_MODE
- && (!pattrib->pctrl)
-#endif
) {
/* Non EAP & ARP & DHCP type data packet */
diff --git a/drivers/staging/rtl8723bs/include/sta_info.h b/drivers/staging/rtl8723bs/include/sta_info.h
index 78a9091661a5..33e6e00c126d 100644
--- a/drivers/staging/rtl8723bs/include/sta_info.h
+++ b/drivers/staging/rtl8723bs/include/sta_info.h
@@ -182,11 +182,6 @@ struct sta_info {
u8 keep_alive_trycnt;
-#ifdef CONFIG_AUTO_AP_MODE
- u8 isrc; /* this device is rc */
- u16 pid; /* pairing id */
-#endif
-
u8 *passoc_req;
u32 assoc_req_len;
diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c b/drivers/staging/rtl8723bs/os_dep/recv_linux.c
index a4a1b34281c3..fbdbcd04d44a 100644
--- a/drivers/staging/rtl8723bs/os_dep/recv_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/recv_linux.c
@@ -190,39 +190,6 @@ void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup)
wrqu.data.length = sizeof(ev);
}
-#ifdef CONFIG_AUTO_AP_MODE
-static void rtw_os_ksocket_send(struct adapter *padapter, union recv_frame *precv_frame)
-{
- struct sk_buff *skb = precv_frame->u.hdr.pkt;
- struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib;
- struct sta_info *psta = precv_frame->u.hdr.psta;
-
- DBG_871X("eth rx: got eth_type = 0x%x\n", pattrib->eth_type);
-
- if (psta && psta->isrc && psta->pid > 0) {
- u16 rx_pid;
-
- rx_pid = *(u16 *)(skb->data+ETH_HLEN);
-
- DBG_871X("eth rx(pid = 0x%x): sta(%pM) pid = 0x%x\n",
- rx_pid, MAC_ARG(psta->hwaddr), psta->pid);
-
- if (rx_pid == psta->pid) {
- int i;
- u16 len = *(u16 *)(skb->data+ETH_HLEN+2);
- DBG_871X("eth, RC: len = 0x%x\n", len);
-
- for (i = 0; i < len; i++)
- DBG_871X("0x%x\n", *(skb->data+ETH_HLEN+4+i));
-
- DBG_871X("eth, RC-end\n");
- }
-
- }
-
-}
-#endif /* CONFIG_AUTO_AP_MODE */
-
int rtw_recv_indicatepkt(struct adapter *padapter, union recv_frame *precv_frame)
{
struct recv_priv *precvpriv;
@@ -251,14 +218,6 @@ int rtw_recv_indicatepkt(struct adapter *padapter, union recv_frame *precv_frame
RT_TRACE(_module_recv_osdep_c_, _drv_info_, ("\n skb->head =%p skb->data =%p skb->tail =%p skb->end =%p skb->len =%d\n", skb->head, skb->data, skb_tail_pointer(skb), skb_end_pointer(skb), skb->len));
-#ifdef CONFIG_AUTO_AP_MODE
- if (0x8899 == pattrib->eth_type) {
- rtw_os_ksocket_send(padapter, precv_frame);
-
- /* goto _recv_indicatepkt_drop; */
- }
-#endif /* CONFIG_AUTO_AP_MODE */
-
rtw_os_recv_indicate_pkt(padapter, skb, pattrib);
/* pointers to NULL before rtw_free_recvframe() */
--
2.20.1
remove conditional code blocks checked by unused CONFIG_QOS_OPTIMIZATION
cleaning required in TODO file:
find and remove code blocks guarded by never set CONFIG_FOO defines
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/os_dep/os_intfs.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index d643e9a59e6b..270f93e90e07 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -121,11 +121,7 @@ int rtw_mc2u_disable = 0;
static int rtw_80211d;
-#ifdef CONFIG_QOS_OPTIMIZATION
-static int rtw_qos_opt_enable = 1;/* 0: disable, 1:enable */
-#else
static int rtw_qos_opt_enable;/* 0: disable, 1:enable */
-#endif
module_param(rtw_qos_opt_enable, int, 0644);
static char *ifname = "wlan%d";
--
2.20.1
remove conditional code blocks checked by unused CONFIG_AP_WOWLAN
cleaning required in TODO file:
find and remove code blocks guarded by never set CONFIG_FOO defines
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 35 --
.../staging/rtl8723bs/core/rtw_wlan_util.c | 31 --
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 339 ------------------
.../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 33 --
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 105 ------
drivers/staging/rtl8723bs/hal/sdio_ops.c | 35 --
.../rtl8723bs/include/drv_types_sdio.h | 5 -
.../staging/rtl8723bs/include/hal_com_h2c.h | 30 --
drivers/staging/rtl8723bs/include/hal_intf.h | 3 -
.../staging/rtl8723bs/include/osdep_service.h | 7 -
.../staging/rtl8723bs/include/rtl8723b_cmd.h | 6 -
.../staging/rtl8723bs/include/rtl8723b_hal.h | 4 -
drivers/staging/rtl8723bs/include/rtw_mp.h | 3 -
drivers/staging/rtl8723bs/include/sdio_ops.h | 7 -
.../staging/rtl8723bs/os_dep/ioctl_linux.c | 4 -
drivers/staging/rtl8723bs/os_dep/os_intfs.c | 134 -------
16 files changed, 781 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index 2e6c522b74e3..b942cf49cd27 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -350,17 +350,8 @@ static u8 PS_RDY_CHECK(struct adapter *padapter)
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
-#ifdef CONFIG_AP_WOWLAN
- if (pwrpriv->bInSuspend && pwrpriv->wowlan_mode)
- return true;
- else if (pwrpriv->bInSuspend && pwrpriv->wowlan_ap_mode)
- return true;
- else if (pwrpriv->bInSuspend)
- return false;
-#else
if (pwrpriv->bInSuspend)
return false;
-#endif
curr_time = jiffies;
@@ -391,9 +382,6 @@ static u8 PS_RDY_CHECK(struct adapter *padapter)
void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode, const char *msg)
{
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
-#ifdef CONFIG_AP_WOWLAN
- struct debug_priv *pdbgpriv = &padapter->dvobj->drv_dbg;
-#endif
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_,
("%s: PowerMode =%d Smart_PS =%d\n",
@@ -422,29 +410,6 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a
pwrpriv->pwr_mode = ps_mode;
rtw_set_rpwm(padapter, PS_STATE_S4);
-#ifdef CONFIG_AP_WOWLAN
- if (pwrpriv->wowlan_mode || pwrpriv->wowlan_ap_mode) {
- unsigned long start_time;
- u32 delay_ms;
- u8 val8;
- delay_ms = 20;
- start_time = jiffies;
- do {
- rtw_hal_get_hwreg(padapter, HW_VAR_SYS_CLKR, &val8);
- if (!(val8 & BIT(4))) { /* 0x08 bit4 = 1 --> in 32k, bit4 = 0 --> leave 32k */
- pwrpriv->cpwm = PS_STATE_S4;
- break;
- }
- if (jiffies_to_msecs(jiffies - start_time) > delay_ms) {
- DBG_871X("%s: Wait for FW 32K leave more than %u ms!!!\n",
- __func__, delay_ms);
- pdbgpriv->dbg_wow_leave_ps_fail_cnt++;
- break;
- }
- msleep(1);
- } while (1);
- }
-#endif
rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
pwrpriv->bFwCurrentInPSMode = false;
diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index 355e43c4cf9a..d04514d36b49 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -10,10 +10,6 @@
#include <rtw_debug.h>
#include <hal_com_h2c.h>
-#ifdef CONFIG_AP_WOWLAN
-#include <linux/inetdevice.h>
-#endif
-
static unsigned char ARTHEROS_OUI1[] = {0x00, 0x03, 0x7f};
static unsigned char ARTHEROS_OUI2[] = {0x00, 0x13, 0x74};
@@ -2113,30 +2109,3 @@ int rtw_config_gpio(struct net_device *netdev, int gpio_num, bool isOutput)
EXPORT_SYMBOL(rtw_config_gpio);
#endif
-#ifdef CONFIG_AP_WOWLAN
-void rtw_get_current_ip_address(struct adapter *padapter, u8 *pcurrentip)
-{
- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
- struct in_device *my_ip_ptr = padapter->pnetdev->ip_ptr;
- u8 ipaddress[4];
-
- if ((pmlmeinfo->state & WIFI_FW_LINKING_STATE) ||
- pmlmeinfo->state & WIFI_FW_AP_STATE) {
- if (my_ip_ptr) {
- struct in_ifaddr *my_ifa_list = my_ip_ptr->ifa_list;
-
- if (my_ifa_list) {
- ipaddress[0] = my_ifa_list->ifa_address & 0xFF;
- ipaddress[1] = (my_ifa_list->ifa_address >> 8) & 0xFF;
- ipaddress[2] = (my_ifa_list->ifa_address >> 16) & 0xFF;
- ipaddress[3] = my_ifa_list->ifa_address >> 24;
- DBG_871X("%s: %d.%d.%d.%d ==========\n", __func__,
- ipaddress[0], ipaddress[1], ipaddress[2], ipaddress[3]);
- memcpy(pcurrentip, ipaddress, 4);
- }
- }
- }
-}
-#endif
-
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
index 61fd643c244f..11e7a7121f30 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
@@ -312,119 +312,6 @@ static void ConstructNullFunctionData(
*pLength = pktlen;
}
-#ifdef CONFIG_AP_WOWLAN
-static void ConstructProbeRsp(struct adapter *padapter, u8 *pframe, u32 *pLength, u8 *StaAddr, bool bHideSSID)
-{
- struct ieee80211_hdr *pwlanhdr;
- u16 *fctrl;
- u8 *mac, *bssid;
- u32 pktlen;
- struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
- struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network);
- u8 *pwps_ie;
- uint wps_ielen;
- struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-
- /* DBG_871X("%s\n", __func__); */
-
- pwlanhdr = (struct ieee80211_hdr *)pframe;
-
- mac = myid(&(padapter->eeprompriv));
- bssid = cur_network->MacAddress;
-
- fctrl = &(pwlanhdr->frame_control);
- *(fctrl) = 0;
- memcpy(pwlanhdr->addr1, StaAddr, ETH_ALEN);
- memcpy(pwlanhdr->addr2, mac, ETH_ALEN);
- memcpy(pwlanhdr->addr3, bssid, ETH_ALEN);
-
- DBG_871X("%s FW Mac Addr:%pM\n", __func__, MAC_ARG(mac));
- DBG_871X("%s FW IP Addr:%pI4\n", __func__, IP_ARG(StaAddr));
-
- SetSeqNum(pwlanhdr, 0);
- SetFrameSubType(fctrl, WIFI_PROBERSP);
-
- pktlen = sizeof(struct ieee80211_hdr_3addr);
- pframe += pktlen;
-
- if (cur_network->IELength > MAX_IE_SZ)
- return;
-
- pwps_ie = rtw_get_wps_ie(cur_network->IEs+_FIXED_IE_LENGTH_,
- cur_network->IELength-_FIXED_IE_LENGTH_, NULL, &wps_ielen);
-
- /* inerset & update wps_probe_resp_ie */
- if (pmlmepriv->wps_probe_resp_ie && pwps_ie && (wps_ielen > 0)) {
- uint wps_offset, remainder_ielen;
- u8 *premainder_ie;
-
- wps_offset = (uint)(pwps_ie - cur_network->IEs);
-
- premainder_ie = pwps_ie + wps_ielen;
-
- remainder_ielen = cur_network->IELength - wps_offset - wps_ielen;
-
- memcpy(pframe, cur_network->IEs, wps_offset);
- pframe += wps_offset;
- pktlen += wps_offset;
-
- wps_ielen = (uint)pmlmepriv->wps_probe_resp_ie[1];/* to get ie data len */
- if ((wps_offset+wps_ielen+2) <= MAX_IE_SZ) {
- memcpy(pframe, pmlmepriv->wps_probe_resp_ie, wps_ielen+2);
- pframe += wps_ielen+2;
- pktlen += wps_ielen+2;
- }
-
- if ((wps_offset+wps_ielen+2+remainder_ielen) <= MAX_IE_SZ) {
- memcpy(pframe, premainder_ie, remainder_ielen);
- pframe += remainder_ielen;
- pktlen += remainder_ielen;
- }
- } else {
- memcpy(pframe, cur_network->IEs, cur_network->IELength);
- pframe += cur_network->IELength;
- pktlen += cur_network->IELength;
- }
-
- /* retrieve SSID IE from cur_network->Ssid */
- {
- u8 *ssid_ie;
- signed int ssid_ielen;
- signed int ssid_ielen_diff;
- u8 buf[MAX_IE_SZ];
- u8 *ies = pframe + sizeof(struct ieee80211_hdr_3addr);
-
- ssid_ie = rtw_get_ie(ies+_FIXED_IE_LENGTH_, WLAN_EID_SSID, &ssid_ielen,
- (pframe-ies)-_FIXED_IE_LENGTH_);
-
- ssid_ielen_diff = cur_network->Ssid.SsidLength - ssid_ielen;
-
- if (ssid_ie && cur_network->Ssid.SsidLength) {
- uint remainder_ielen;
- u8 *remainder_ie;
- remainder_ie = ssid_ie+2;
- remainder_ielen = (pframe-remainder_ie);
-
- if (remainder_ielen > MAX_IE_SZ) {
- DBG_871X_LEVEL(_drv_warning_, FUNC_ADPT_FMT" remainder_ielen > MAX_IE_SZ\n", FUNC_ADPT_ARG(padapter));
- remainder_ielen = MAX_IE_SZ;
- }
-
- memcpy(buf, remainder_ie, remainder_ielen);
- memcpy(remainder_ie+ssid_ielen_diff, buf, remainder_ielen);
- *(ssid_ie+1) = cur_network->Ssid.SsidLength;
- memcpy(ssid_ie+2, cur_network->Ssid.Ssid, cur_network->Ssid.SsidLength);
- pframe += ssid_ielen_diff;
- pktlen += ssid_ielen_diff;
- }
- }
-
- *pLength = pktlen;
-
-}
-#endif /* CONFIG_AP_WOWLAN */
-
/*
* To check if reserved page content is destroyed by beacon because beacon
* is too large.
@@ -457,42 +344,6 @@ static void rtl8723b_set_FwAoacRsvdPage_cmd(struct adapter *padapter, struct RSV
{
}
-#ifdef CONFIG_AP_WOWLAN
-static void rtl8723b_set_ap_wow_rsvdpage_cmd(
- struct adapter *padapter, struct RSVDPAGE_LOC *rsvdpageloc
-)
-{
- u8 header;
- u8 rsvdparm[H2C_AOAC_RSVDPAGE_LOC_LEN] = {0};
-
- header = rtw_read8(padapter, REG_BCNQ_BDNY);
-
- DBG_871X("%s: beacon: %d, probeRsp: %d, header:0x%02x\n", __func__,
- rsvdpageloc->LocApOffloadBCN,
- rsvdpageloc->LocProbeRsp,
- header);
-
- SET_H2CCMD_AP_WOWLAN_RSVDPAGE_LOC_BCN(rsvdparm,
- rsvdpageloc->LocApOffloadBCN + header);
-
- FillH2CCmd8723B(padapter, H2C_8723B_BCN_RSVDPAGE,
- H2C_BCN_RSVDPAGE_LEN, rsvdparm);
-
- msleep(10);
-
- memset(&rsvdparm, 0, sizeof(rsvdparm));
-
- SET_H2CCMD_AP_WOWLAN_RSVDPAGE_LOC_ProbeRsp(
- rsvdparm,
- rsvdpageloc->LocProbeRsp + header);
-
- FillH2CCmd8723B(padapter, H2C_8723B_PROBERSP_RSVDPAGE,
- H2C_PROBERSP_RSVDPAGE_LEN, rsvdparm);
-
- msleep(10);
-}
-#endif /* CONFIG_AP_WOWLAN */
-
void rtl8723b_set_FwMediaStatusRpt_cmd(struct adapter *padapter, u8 mstatus, u8 macid)
{
u8 u1H2CMediaStatusRptParm[H2C_MEDIA_STATUS_RPT_LEN] = {0};
@@ -698,64 +549,6 @@ void rtl8723b_set_FwPwrModeInIPS_cmd(struct adapter *padapter, u8 cmd_param)
FillH2CCmd8723B(padapter, H2C_8723B_FWLPS_IN_IPS_, 1, &cmd_param);
}
-#ifdef CONFIG_AP_WOWLAN
-static void rtl8723b_set_FwAPWoWlanCtrl_Cmd(struct adapter *padapter, u8 bFuncEn)
-{
- u8 u1H2CAPWoWlanCtrlParm[H2C_WOWLAN_LEN] = {0};
- u8 gpionum = 0, gpio_dur = 0;
- u8 gpio_high_active = 1; /* 0: low active, 1: high active */
- u8 gpio_pulse = bFuncEn;
-
- DBG_871X("%s(): bFuncEn =%d\n", __func__, bFuncEn);
-
- if (bFuncEn)
- gpio_dur = 16;
- else
- gpio_dur = 0;
-
- SET_H2CCMD_AP_WOW_GPIO_CTRL_INDEX(u1H2CAPWoWlanCtrlParm,
- gpionum);
- SET_H2CCMD_AP_WOW_GPIO_CTRL_PLUS(u1H2CAPWoWlanCtrlParm,
- gpio_pulse);
- SET_H2CCMD_AP_WOW_GPIO_CTRL_HIGH_ACTIVE(u1H2CAPWoWlanCtrlParm,
- gpio_high_active);
- SET_H2CCMD_AP_WOW_GPIO_CTRL_EN(u1H2CAPWoWlanCtrlParm,
- bFuncEn);
- SET_H2CCMD_AP_WOW_GPIO_CTRL_DURATION(u1H2CAPWoWlanCtrlParm,
- gpio_dur);
-
- FillH2CCmd8723B(padapter, H2C_8723B_AP_WOW_GPIO_CTRL,
- H2C_AP_WOW_GPIO_CTRL_LEN, u1H2CAPWoWlanCtrlParm);
-}
-
-static void rtl8723b_set_Fw_AP_Offload_Cmd(struct adapter *padapter, u8 bFuncEn)
-{
- u8 u1H2CAPOffloadCtrlParm[H2C_WOWLAN_LEN] = {0};
-
- DBG_871X("%s(): bFuncEn =%d\n", __func__, bFuncEn);
-
- SET_H2CCMD_AP_WOWLAN_EN(u1H2CAPOffloadCtrlParm, bFuncEn);
-
- FillH2CCmd8723B(padapter, H2C_8723B_AP_OFFLOAD,
- H2C_AP_OFFLOAD_LEN, u1H2CAPOffloadCtrlParm);
-}
-
-void rtl8723b_set_ap_wowlan_cmd(struct adapter *padapter, u8 enable)
-{
- DBG_871X_LEVEL(_drv_always_, "+%s()+: enable =%d\n", __func__, enable);
- if (enable) {
- rtl8723b_set_FwJoinBssRpt_cmd(padapter, RT_MEDIA_CONNECT);
- issue_beacon(padapter, 0);
- }
-
- rtl8723b_set_FwAPWoWlanCtrl_Cmd(padapter, enable);
- msleep(10);
- rtl8723b_set_Fw_AP_Offload_Cmd(padapter, enable);
- msleep(10);
- DBG_871X_LEVEL(_drv_always_, "-%s()-\n", __func__);
-}
-#endif /* CONFIG_AP_WOWLAN */
-
/*
* Description: Fill the reserved packets that FW will use to RSVD page.
* Now we just send 4 types packet to rsvd page.
@@ -928,134 +721,9 @@ static void rtl8723b_set_FwRsvdPagePkt(
rtw_free_xmitframe(pxmitpriv, pcmdframe);
}
-#ifdef CONFIG_AP_WOWLAN
-/*
- * Description: Fill the reserved packets that FW will use to RSVD page.
- * Now we just send 2 types packet to rsvd page. (1)Beacon, (2)ProbeRsp.
- *
- * Input: bDLFinished
- *
- * false: At the first time we will send all the packets as a large packet to
- * Hw, so we need to set the packet length to total length.
- *
- * true: At the second time, we should send the first packet (default:beacon)
- * to Hw again and set the length in descriptor to the real beacon length.
- */
-/* 2009.10.15 by tynli. */
-static void rtl8723b_set_AP_FwRsvdPagePkt(
- struct adapter *padapter, bool bDLFinished
-)
-{
- struct hal_com_data *pHalData;
- struct xmit_frame *pcmdframe;
- struct pkt_attrib *pattrib;
- struct xmit_priv *pxmitpriv;
- struct mlme_ext_priv *pmlmeext;
- struct mlme_ext_info *pmlmeinfo;
- struct pwrctrl_priv *pwrctl;
- u32 BeaconLength = 0, ProbeRspLength = 0;
- u8 *ReservedPagePacket;
- u8 TxDescLen = TXDESC_SIZE, TxDescOffset = TXDESC_OFFSET;
- u8 TotalPageNum = 0, CurtPktPageNum = 0, RsvdPageNum = 0;
- u8 currentip[4];
- u16 BufIndex, PageSize = 128;
- u32 TotalPacketLen = 0, MaxRsvdPageBufSize = 0;
- struct RSVDPAGE_LOC RsvdPageLoc;
-
- /* DBG_871X("%s---->\n", __func__); */
- DBG_8192C("+" FUNC_ADPT_FMT ": iface_type =%d\n",
- FUNC_ADPT_ARG(padapter), get_iface_type(padapter));
-
- pHalData = GET_HAL_DATA(padapter);
- pxmitpriv = &padapter->xmitpriv;
- pmlmeext = &padapter->mlmeextpriv;
- pmlmeinfo = &pmlmeext->mlmext_info;
- pwrctl = adapter_to_pwrctl(padapter);
-
- RsvdPageNum = BCNQ_PAGE_NUM_8723B + AP_WOWLAN_PAGE_NUM_8723B;
- MaxRsvdPageBufSize = RsvdPageNum*PageSize;
-
- pcmdframe = rtw_alloc_cmdxmitframe(pxmitpriv);
- if (!pcmdframe) {
- DBG_871X("%s: alloc ReservedPagePacket fail!\n", __func__);
- return;
- }
-
- ReservedPagePacket = pcmdframe->buf_addr;
- memset(&RsvdPageLoc, 0, sizeof(struct RSVDPAGE_LOC));
-
- /* 3 (1) beacon */
- BufIndex = TxDescOffset;
- ConstructBeacon(padapter, &ReservedPagePacket[BufIndex], &BeaconLength);
-
- /* When we count the first page size, we need to reserve description size for the RSVD */
- /* packet, it will be filled in front of the packet in TXPKTBUF. */
- CurtPktPageNum = (u8)PageNum_128(TxDescLen + BeaconLength);
- /* If we don't add 1 more page, the WOWLAN function has a problem. Baron thinks it's a bug of firmware */
- if (CurtPktPageNum == 1)
- CurtPktPageNum += 1;
- TotalPageNum += CurtPktPageNum;
-
- BufIndex += (CurtPktPageNum*PageSize);
-
- /* 2 (4) probe response */
- RsvdPageLoc.LocProbeRsp = TotalPageNum;
-
- rtw_get_current_ip_address(padapter, currentip);
-
- ConstructProbeRsp(
- padapter,
- &ReservedPagePacket[BufIndex],
- &ProbeRspLength,
- currentip,
- false);
- rtl8723b_fill_fake_txdesc(padapter,
- &ReservedPagePacket[BufIndex-TxDescLen],
- ProbeRspLength,
- false, false, false);
-
- DBG_871X("%s(): HW_VAR_SET_TX_CMD: PROBE RSP %p %d\n",
- __func__, &ReservedPagePacket[BufIndex-TxDescLen],
- (ProbeRspLength+TxDescLen));
-
- CurtPktPageNum = (u8)PageNum_128(TxDescLen + ProbeRspLength);
-
- TotalPageNum += CurtPktPageNum;
-
- BufIndex += (CurtPktPageNum*PageSize);
-
- TotalPacketLen = BufIndex + ProbeRspLength;
-
- if (TotalPacketLen > MaxRsvdPageBufSize) {
- DBG_871X("%s(): ERROR: The rsvd page size is not enough \
- !!TotalPacketLen %d, MaxRsvdPageBufSize %d\n",
- __func__, TotalPacketLen, MaxRsvdPageBufSize);
- goto error;
- } else {
- /* update attribute */
- pattrib = &pcmdframe->attrib;
- update_mgntframe_attrib(padapter, pattrib);
- pattrib->qsel = 0x10;
- pattrib->pktlen = TotalPacketLen - TxDescOffset;
- pattrib->last_txcmdsz = TotalPacketLen - TxDescOffset;
- dump_mgntframe_and_wait(padapter, pcmdframe, 100);
- }
-
- DBG_871X("%s: Set RSVD page location to Fw , TotalPacketLen(%d), TotalPageNum(%d)\n", __func__, TotalPacketLen, TotalPageNum);
- rtl8723b_set_ap_wow_rsvdpage_cmd(padapter, &RsvdPageLoc);
-
- return;
-error:
- rtw_free_xmitframe(pxmitpriv, pcmdframe);
-}
-#endif /* CONFIG_AP_WOWLAN */
-
void rtl8723b_download_rsvd_page(struct adapter *padapter, u8 mstatus)
{
struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
-#ifdef CONFIG_AP_WOWLAN
- struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
-#endif
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
bool bcn_valid = false;
@@ -1102,15 +770,8 @@ void rtl8723b_download_rsvd_page(struct adapter *padapter, u8 mstatus)
DLBcnCount = 0;
poll = 0;
do {
-#ifdef CONFIG_AP_WOWLAN
- if (pwrpriv->wowlan_ap_mode)
- rtl8723b_set_AP_FwRsvdPagePkt(padapter, 0);
- else
- rtl8723b_set_FwRsvdPagePkt(padapter, 0);
-#else
/* download rsvd page. */
rtl8723b_set_FwRsvdPagePkt(padapter, 0);
-#endif
DLBcnCount++;
do {
yield();
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 49085525de05..9f059fb78c7d 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -527,39 +527,6 @@ void rtl8723b_InitializeFirmwareVars(struct adapter *padapter)
/* pHalData->H2CStopInsertQueue = false; */
}
-#ifdef CONFIG_AP_WOWLAN
-/* */
-
-/* */
-/* Description: Prepare some information to Fw for WoWLAN. */
-/* (1) Download wowlan Fw. */
-/* (2) Download RSVD page packets. */
-/* (3) Enable AP offload if needed. */
-/* */
-/* 2011.04.12 by tynli. */
-/* */
-void SetFwRelatedForWoWLAN8723b(
- struct adapter *padapter, u8 bHostIsGoingtoSleep
-)
-{
- int status = _FAIL;
- /* */
- /* 1. Before WoWLAN we need to re-download WoWLAN Fw. */
- /* */
- status = rtl8723b_FirmwareDownload(padapter, bHostIsGoingtoSleep);
- if (status != _SUCCESS) {
- DBG_871X("SetFwRelatedForWoWLAN8723b(): Re-Download Firmware failed!!\n");
- return;
- } else {
- DBG_871X("SetFwRelatedForWoWLAN8723b(): Re-Download Firmware Success !!\n");
- }
- /* */
- /* 2. Re-Init the variables about Fw related setting. */
- /* */
- rtl8723b_InitializeFirmwareVars(padapter);
-}
-#endif /* CONFIG_AP_WOWLAN */
-
static void rtl8723b_free_hal_data(struct adapter *padapter)
{
}
diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index 47cd3ae63687..a64274fa9907 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -1294,16 +1294,6 @@ static void SetHwReg8723BS(struct adapter *padapter, u8 variable, u8 *val)
{
u8 val8;
-#ifdef CONFIG_AP_WOWLAN
- struct wowlan_ioctl_param *poidparam;
- struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(padapter);
- int res;
- u32 tmp;
- u16 len = 0;
- u8 trycnt = 100;
- u32 himr = 0;
-#endif
-
switch (variable) {
case HW_VAR_SET_RPWM:
/* rpwm value only use BIT0(clock bit) , BIT6(Ack bit), and BIT7(Toggle bit) */
@@ -1328,101 +1318,6 @@ static void SetHwReg8723BS(struct adapter *padapter, u8 variable, u8 *val)
val8 = *val;
break;
-#ifdef CONFIG_AP_WOWLAN
- case HW_VAR_AP_WOWLAN:
- {
- poidparam = (struct wowlan_ioctl_param *)val;
- switch (poidparam->subcode) {
- case WOWLAN_AP_ENABLE:
- DBG_871X("%s, WOWLAN_AP_ENABLE\n", __func__);
- /* 1. Download WOWLAN FW */
- DBG_871X_LEVEL(_drv_always_, "Re-download WoWlan FW!\n");
- SetFwRelatedForWoWLAN8723b(padapter, true);
-
- /* 2. RX DMA stop */
- DBG_871X_LEVEL(_drv_always_, "Pause DMA\n");
- rtw_write32(padapter, REG_RXPKT_NUM,
- (rtw_read32(padapter, REG_RXPKT_NUM) | RW_RELEASE_EN));
- do {
- if ((rtw_read32(padapter, REG_RXPKT_NUM) & RXDMA_IDLE)) {
- DBG_871X_LEVEL(_drv_always_, "RX_DMA_IDLE is true\n");
- break;
- } else {
- /* If RX_DMA is not idle, receive one pkt from DMA */
- res = sdio_local_read(padapter, SDIO_REG_RX0_REQ_LEN, 4, (u8 *)&tmp);
- len = le16_to_cpu(tmp);
-
- DBG_871X_LEVEL(_drv_always_, "RX len:%d\n", len);
- if (len > 0)
- res = RecvOnePkt(padapter, len);
- else
- DBG_871X_LEVEL(_drv_always_, "read length fail %d\n", len);
-
- DBG_871X_LEVEL(_drv_always_, "RecvOnePkt Result: %d\n", res);
- }
- } while (trycnt--);
-
- if (trycnt == 0)
- DBG_871X_LEVEL(_drv_always_, "Stop RX DMA failed......\n");
-
- /* 3. Clear IMR and ISR */
- DBG_871X_LEVEL(_drv_always_, "Clear IMR and ISR\n");
- tmp = 0;
- sdio_local_write(padapter, SDIO_REG_HIMR_ON, 4, (u8 *)&tmp);
- sdio_local_write(padapter, SDIO_REG_HIMR, 4, (u8 *)&tmp);
- sdio_local_read(padapter, SDIO_REG_HISR, 4, (u8 *)&tmp);
- sdio_local_write(padapter, SDIO_REG_HISR, 4, (u8 *)&tmp);
-
- /* 4. Enable CPWM2 only */
- DBG_871X_LEVEL(_drv_always_, "Enable only CPWM2\n");
- sdio_local_read(padapter, SDIO_REG_HIMR, 4, (u8 *)&tmp);
- DBG_871X("DisableInterruptButCpwm28723BSdio(): Read SDIO_REG_HIMR: 0x%08x\n", tmp);
-
- himr = cpu_to_le32(SDIO_HIMR_DISABLED) | SDIO_HIMR_CPWM2_MSK;
- sdio_local_write(padapter, SDIO_REG_HIMR, 4, (u8 *)&himr);
-
- sdio_local_read(padapter, SDIO_REG_HIMR, 4, (u8 *)&tmp);
- DBG_871X("DisableInterruptButCpwm28723BSdio(): Read again SDIO_REG_HIMR: 0x%08x\n", tmp);
-
- /* 5. Set Enable WOWLAN H2C command. */
- DBG_871X_LEVEL(_drv_always_, "Set Enable AP WOWLan cmd\n");
- rtl8723b_set_ap_wowlan_cmd(padapter, 1);
- /* 6. add some delay for H2C cmd ready */
- msleep(10);
-
- rtw_write8(padapter, REG_WOWLAN_WAKE_REASON, 0);
- break;
- case WOWLAN_AP_DISABLE:
- DBG_871X("%s, WOWLAN_AP_DISABLE\n", __func__);
- /* 1. Read wakeup reason */
- pwrctl->wowlan_wake_reason =
- rtw_read8(padapter, REG_WOWLAN_WAKE_REASON);
-
- DBG_871X_LEVEL(_drv_always_, "wakeup_reason: 0x%02x\n",
- pwrctl->wowlan_wake_reason);
-
- /* 2. Set Disable WOWLAN H2C command. */
- DBG_871X_LEVEL(_drv_always_, "Set Disable WOWLan cmd\n");
- rtl8723b_set_ap_wowlan_cmd(padapter, 0);
- /* 6. add some delay for H2C cmd ready */
- msleep(2);
-
- DBG_871X_LEVEL(_drv_always_, "Release RXDMA\n");
-
- rtw_write32(padapter, REG_RXPKT_NUM,
- (rtw_read32(padapter, REG_RXPKT_NUM) & (~RW_RELEASE_EN)));
-
- SetFwRelatedForWoWLAN8723b(padapter, false);
-
- rtl8723b_set_FwJoinBssRpt_cmd(padapter, RT_MEDIA_CONNECT);
- issue_beacon(padapter, 0);
- break;
- default:
- break;
- }
-}
- break;
-#endif /* CONFIG_AP_WOWLAN */
case HW_VAR_DM_IN_LPS:
rtl8723b_hal_dm_in_lps(padapter);
break;
diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c
index 2400b06dff36..0ea97e85e6a2 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_ops.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c
@@ -1114,39 +1114,4 @@ void HalQueryTxOQTBufferStatus8723BSdio(struct adapter *adapter)
haldata->SdioTxOQTFreeSpace = SdioLocalCmd52Read1Byte(adapter, SDIO_REG_OQT_FREE_PG);
}
-#ifdef CONFIG_AP_WOWLAN
-u8 RecvOnePkt(struct adapter *adapter, u32 size)
-{
- struct recv_buf *recvbuf;
- struct dvobj_priv *sddev;
- struct sdio_func *func;
-
- u8 res = false;
-
- DBG_871X("+%s: size: %d+\n", __func__, size);
-
- if (!adapter) {
- DBG_871X(KERN_ERR "%s: adapter is NULL!\n", __func__);
- return false;
- }
- sddev = adapter_to_dvobj(adapter);
- psdio_data = &sddev->intf_data;
- func = psdio_data->func;
-
- if (size) {
- sdio_claim_host(func);
- recvbuf = sd_recv_rxfifo(adapter, size);
-
- if (recvbuf) {
- sd_rxhandler(adapter, recvbuf);
- res = true;
- } else {
- res = false;
- }
- sdio_release_host(func);
- }
- DBG_871X("-%s-\n", __func__);
- return res;
-}
-#endif /* CONFIG_AP_WOWLAN */
diff --git a/drivers/staging/rtl8723bs/include/drv_types_sdio.h b/drivers/staging/rtl8723bs/include/drv_types_sdio.h
index 83f5e912baa7..25b3c3a39ee4 100644
--- a/drivers/staging/rtl8723bs/include/drv_types_sdio.h
+++ b/drivers/staging/rtl8723bs/include/drv_types_sdio.h
@@ -11,11 +11,6 @@
#include <linux/mmc/sdio_func.h>
#include <linux/mmc/sdio_ids.h>
-#ifdef CONFIG_AP_WOWLAN
- #include <linux/mmc/host.h>
- #include <linux/mmc/card.h>
-#endif
-
struct sdio_data {
u8 func_number;
diff --git a/drivers/staging/rtl8723bs/include/hal_com_h2c.h b/drivers/staging/rtl8723bs/include/hal_com_h2c.h
index eca394a8e565..dedbd0a1efb4 100644
--- a/drivers/staging/rtl8723bs/include/hal_com_h2c.h
+++ b/drivers/staging/rtl8723bs/include/hal_com_h2c.h
@@ -120,28 +120,6 @@ enum h2c_cmd {
#define SET_H2CCMD_DISCONDECISION_PARM_CHECK_PERIOD(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd+1, 0, 8, __Value)
#define SET_H2CCMD_DISCONDECISION_PARM_TRY_PKT_NUM(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd+2, 0, 8, __Value)
-#ifdef CONFIG_AP_WOWLAN
-/* _AP_Offload 0x08 */
-#define SET_H2CCMD_AP_WOWLAN_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd, 0, 8, __Value)
-/* _BCN_RsvdPage 0x09 */
-#define SET_H2CCMD_AP_WOWLAN_RSVDPAGE_LOC_BCN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd, 0, 8, __Value)
-/* _Probersp_RsvdPage 0x0a */
-#define SET_H2CCMD_AP_WOWLAN_RSVDPAGE_LOC_ProbeRsp(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd, 0, 8, __Value)
-/* _Probersp_RsvdPage 0x13 */
-#define SET_H2CCMD_AP_WOW_GPIO_CTRL_INDEX(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 4, __Value)
-#define SET_H2CCMD_AP_WOW_GPIO_CTRL_C2H_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 4, 1, __Value)
-#define SET_H2CCMD_AP_WOW_GPIO_CTRL_PLUS(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 5, 1, __Value)
-#define SET_H2CCMD_AP_WOW_GPIO_CTRL_HIGH_ACTIVE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 6, 1, __Value)
-#define SET_H2CCMD_AP_WOW_GPIO_CTRL_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 7, 1, __Value)
-#define SET_H2CCMD_AP_WOW_GPIO_CTRL_DURATION(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+1, 0, 8, __Value)
-#define SET_H2CCMD_AP_WOW_GPIO_CTRL_C2H_DURATION(__pH2CCmd, __Value)SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+2, 0, 8, __Value)
-/* _AP_PS 0x26 */
-#define SET_H2CCMD_AP_WOW_PS_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
-#define SET_H2CCMD_AP_WOW_PS_32K_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
-#define SET_H2CCMD_AP_WOW_PS_RF(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 2, 1, __Value)
-#define SET_H2CCMD_AP_WOW_PS_DURATION(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+1, 0, 8, __Value)
-#endif
-
/* _WoWLAN PARAM_CMD_0x80 */
#define SET_H2CCMD_WOWLAN_FUNC_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
#define SET_H2CCMD_WOWLAN_PATTERN_MATCH_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
@@ -186,14 +164,6 @@ struct RSVDPAGE_LOC {
u8 LocNullData;
u8 LocQosNull;
u8 LocBTQosNull;
-#ifdef CONFIG_AP_WOWLAN
- u8 LocApOffloadBCN;
-#endif /* CONFIG_AP_WOWLAN */
};
#endif
-#ifdef CONFIG_AP_WOWLAN
-void rtw_get_current_ip_address(struct adapter *padapter, u8 *pcurrentip);
-void rtw_get_sec_iv(struct adapter *padapter, u8*pcur_dot11txpn, u8 *StaAddr);
-void rtw_set_sec_pn(struct adapter *padapter);
-#endif
diff --git a/drivers/staging/rtl8723bs/include/hal_intf.h b/drivers/staging/rtl8723bs/include/hal_intf.h
index 093e00b9349b..02cad39be5c9 100644
--- a/drivers/staging/rtl8723bs/include/hal_intf.h
+++ b/drivers/staging/rtl8723bs/include/hal_intf.h
@@ -85,9 +85,6 @@ enum HW_VARIABLES {
HW_VAR_APFM_ON_MAC, /* Auto FSM to Turn On, include clock, isolation, power control for MAC only */
/* The valid upper nav range for the HW updating, if the true value is larger than the upper range, the HW won't update it. */
/* Unit in microsecond. 0 means disable this function. */
-#ifdef CONFIG_AP_WOWLAN
- HW_VAR_AP_WOWLAN,
-#endif
HW_VAR_SYS_CLKR,
HW_VAR_NAV_UPPER,
HW_VAR_C2H_HANDLE,
diff --git a/drivers/staging/rtl8723bs/include/osdep_service.h b/drivers/staging/rtl8723bs/include/osdep_service.h
index 63971fd691ed..57e668988a1c 100644
--- a/drivers/staging/rtl8723bs/include/osdep_service.h
+++ b/drivers/staging/rtl8723bs/include/osdep_service.h
@@ -136,15 +136,8 @@ static inline int rtw_bug_check(void *parg1, void *parg2, void *parg3, void *par
#define MAC_ARG(x) (x)
#endif
-
-#ifdef CONFIG_AP_WOWLAN
-extern void rtw_softap_lock_suspend(void);
-extern void rtw_softap_unlock_suspend(void);
-#endif
-
extern void rtw_free_netdev(struct net_device * netdev);
-
/* Macros for handling unaligned memory accesses */
void rtw_buf_free(u8 **buf, u32 *buf_len);
diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_cmd.h b/drivers/staging/rtl8723bs/include/rtl8723b_cmd.h
index b85e67ccc7db..9629a8844c2d 100644
--- a/drivers/staging/rtl8723bs/include/rtl8723b_cmd.h
+++ b/drivers/staging/rtl8723bs/include/rtl8723b_cmd.h
@@ -177,12 +177,6 @@ void rtl8723b_download_BTCoex_AP_mode_rsvd_page(struct adapter *padapter);
void CheckFwRsvdPageContent(struct adapter *padapter);
-#ifdef CONFIG_AP_WOWLAN
-void rtl8723b_set_wowlan_cmd(struct adapter *padapter, u8 enable);
-void rtl8723b_set_ap_wowlan_cmd(struct adapter *padapter, u8 enable);
-void SetFwRelatedForWoWLAN8723b(struct adapter *padapter, u8 bHostIsGoingtoSleep);
-#endif
-
void rtl8723b_set_FwPwrModeInIPS_cmd(struct adapter *padapter, u8 cmd_param);
s32 FillH2CCmd8723B(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8 *pCmdBuffer);
diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
index da3679d2c8f9..0f787ec44b5b 100644
--- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
+++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
@@ -98,10 +98,6 @@ struct rt_firmware_hdr {
/* ARP Rsp:1, RWC:1, GTK Info:1, GTK RSP:2, GTK EXT MEM:2, PNO: 6 */
#define WOWLAN_PAGE_NUM_8723B 0x00
-#ifdef CONFIG_AP_WOWLAN
-#define AP_WOWLAN_PAGE_NUM_8723B 0x02
-#endif
-
#define TX_TOTAL_PAGE_NUMBER_8723B \
(0xFF - BCNQ_PAGE_NUM_8723B - \
BCNQ1_PAGE_NUM_8723B - \
diff --git a/drivers/staging/rtl8723bs/include/rtw_mp.h b/drivers/staging/rtl8723bs/include/rtw_mp.h
index 8b6e4e9578f9..fb254d88f503 100644
--- a/drivers/staging/rtl8723bs/include/rtw_mp.h
+++ b/drivers/staging/rtl8723bs/include/rtw_mp.h
@@ -189,9 +189,6 @@ enum {
CTA_TEST,
MP_DISABLE_BT_COEXIST,
MP_PwrCtlDM,
-#ifdef CONFIG_AP_WOWLAN
- MP_AP_WOW_ENABLE,
-#endif
MP_NULL,
MP_GET_TXPOWER_INX,
};
diff --git a/drivers/staging/rtl8723bs/include/sdio_ops.h b/drivers/staging/rtl8723bs/include/sdio_ops.h
index 1f1f368cded4..c7559a884608 100644
--- a/drivers/staging/rtl8723bs/include/sdio_ops.h
+++ b/drivers/staging/rtl8723bs/include/sdio_ops.h
@@ -25,17 +25,10 @@ s32 _sdio_write32(struct adapter *padapter, u32 addr, u32 val);
extern void sd_int_hdl(struct adapter *padapter);
extern u8 CheckIPSStatus(struct adapter *padapter);
-#ifdef CONFIG_AP_WOWLAN
-extern u8 RecvOnePkt(struct adapter *padapter, u32 size);
-#endif
extern void InitInterrupt8723BSdio(struct adapter *padapter);
extern void InitSysInterrupt8723BSdio(struct adapter *padapter);
extern void EnableInterrupt8723BSdio(struct adapter *padapter);
extern void DisableInterrupt8723BSdio(struct adapter *padapter);
extern u8 HalQueryTxBufferStatus8723BSdio(struct adapter *padapter);
extern void HalQueryTxOQTBufferStatus8723BSdio(struct adapter *padapter);
-#ifdef CONFIG_AP_WOWLAN
-extern void ClearInterrupt8723BSdio(struct adapter *padapter);
-#endif
-
#endif /* !__SDIO_OPS_H__ */
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index 9ee95fe4266e..822e6b650c6b 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -4668,10 +4668,6 @@ static const struct iw_priv_args rtw_private_args[] = {
SIOCIWFIRSTPRIV + 0x1D,
IW_PRIV_TYPE_CHAR | 40, IW_PRIV_TYPE_CHAR | 0x7FF, "test"
},
-
-#ifdef CONFIG_AP_WOWLAN
- { MP_AP_WOW_ENABLE, IW_PRIV_TYPE_CHAR | 1024, 0, "ap_wow_mode" }, /* set */
-#endif
};
static iw_handler rtw_private_handler[] = {
diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 270f93e90e07..fe19be2186c3 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -1227,58 +1227,6 @@ static int rtw_suspend_free_assoc_resource(struct adapter *padapter)
return _SUCCESS;
}
-#ifdef CONFIG_AP_WOWLAN
-void rtw_suspend_ap_wow(struct adapter *padapter)
-{
- u8 ch, bw, offset;
- struct net_device *pnetdev = padapter->pnetdev;
- struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
- struct wowlan_ioctl_param poidparam;
-
- DBG_871X("==> " FUNC_ADPT_FMT " entry....\n", FUNC_ADPT_ARG(padapter));
-
- pwrpriv->wowlan_ap_mode = true;
-
- DBG_871X("wowlan_ap_mode: %d\n", pwrpriv->wowlan_ap_mode);
-
- if (pnetdev)
- rtw_netif_stop_queue(pnetdev);
- /* 1. stop thread */
- padapter->bDriverStopped = true; /* for stop thread */
- rtw_stop_drv_threads(padapter);
- padapter->bDriverStopped = false; /* for 32k command */
-
- /* 2. disable interrupt */
- rtw_hal_disable_interrupt(padapter); /* It need wait for leaving 32K. */
-
- /* 2.1 clean interrupt */
- if (padapter->HalFunc.clear_interrupt)
- padapter->HalFunc.clear_interrupt(padapter);
-
- /* 2.2 free irq */
- /* sdio_free_irq(adapter_to_dvobj(padapter)); */
- if (padapter->intf_free_irq)
- padapter->intf_free_irq(adapter_to_dvobj(padapter));
-
- poidparam.subcode = WOWLAN_AP_ENABLE;
- padapter->HalFunc.SetHwRegHandler(padapter,
- HW_VAR_AP_WOWLAN, (u8 *)&poidparam);
-
- DBG_871X_LEVEL(_drv_always_, "%s: wowmode suspending\n", __func__);
-
- if (rtw_get_ch_setting_union(padapter, &ch, &bw, &offset) != 0) {
- DBG_871X(FUNC_ADPT_FMT " back to linked/linking union - ch:%u, bw:%u, offset:%u\n",
- FUNC_ADPT_ARG(padapter), ch, bw, offset);
- set_channel_bwmode(padapter, ch, offset, bw);
- }
-
- rtw_set_ps_mode(padapter, PS_MODE_MIN, 0, 0, "AP-WOWLAN");
-
- DBG_871X("<== " FUNC_ADPT_FMT " exit....\n", FUNC_ADPT_ARG(padapter));
-}
-#endif /* ifdef CONFIG_AP_WOWLAN */
-
-
static void rtw_suspend_normal(struct adapter *padapter)
{
struct net_device *pnetdev = padapter->pnetdev;
@@ -1350,11 +1298,7 @@ int rtw_suspend_common(struct adapter *padapter)
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
rtw_suspend_normal(padapter);
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
- #ifdef CONFIG_AP_WOWLAN
- rtw_suspend_ap_wow(padapter);
- #else
rtw_suspend_normal(padapter);
- #endif /* CONFIG_AP_WOWLAN */
} else {
rtw_suspend_normal(padapter);
}
@@ -1369,80 +1313,6 @@ int rtw_suspend_common(struct adapter *padapter)
return ret;
}
-#ifdef CONFIG_AP_WOWLAN
-int rtw_resume_process_ap_wow(struct adapter *padapter)
-{
- struct net_device *pnetdev = padapter->pnetdev;
- struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
- struct dvobj_priv *psdpriv = padapter->dvobj;
- struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
- struct wowlan_ioctl_param poidparam;
- int ret = _SUCCESS;
-
- DBG_871X("==> " FUNC_ADPT_FMT " entry....\n", FUNC_ADPT_ARG(padapter));
-
- if (padapter) {
- pnetdev = padapter->pnetdev;
- pwrpriv = adapter_to_pwrctl(padapter);
- } else {
- pdbgpriv->dbg_resume_error_cnt++;
- ret = -1;
- goto exit;
- }
-
- rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0, "AP-WOWLAN");
-
- pwrpriv->bFwCurrentInPSMode = false;
-
- rtw_hal_disable_interrupt(padapter);
-
- if (padapter->HalFunc.clear_interrupt)
- padapter->HalFunc.clear_interrupt(padapter);
-
- /* if (sdio_alloc_irq(adapter_to_dvobj(padapter)) != _SUCCESS) { */
- if ((padapter->intf_alloc_irq) && (padapter->intf_alloc_irq(adapter_to_dvobj(padapter)) != _SUCCESS)) {
- ret = -1;
- RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("%s: sdio_alloc_irq Failed!!\n", __func__));
- goto exit;
- }
-
- /* Disable WOW, set H2C command */
- poidparam.subcode = WOWLAN_AP_DISABLE;
- padapter->HalFunc.SetHwRegHandler(padapter,
- HW_VAR_AP_WOWLAN, (u8 *)&poidparam);
- pwrpriv->wowlan_ap_mode = false;
-
- padapter->bDriverStopped = false;
- DBG_871X("%s: wowmode resuming, DriverStopped:%d\n", __func__, padapter->bDriverStopped);
- rtw_start_drv_threads(padapter);
-
- if (padapter->intf_start)
- padapter->intf_start(padapter);
-
- /* start netif queue */
- if (pnetdev) {
- if (!rtw_netif_queue_stopped(pnetdev))
- rtw_netif_start_queue(pnetdev);
- else
- rtw_netif_wake_queue(pnetdev);
- }
-
- if (padapter->pid[1] != 0) {
- DBG_871X("pid[1]:%d\n", padapter->pid[1]);
- rtw_signal_process(padapter->pid[1], SIGUSR2);
- }
-
- pwrpriv->bips_processing = false;
- _set_timer(&padapter->mlmepriv.dynamic_chk_timer, 2000);
-
- /* clean driver side wake up reason. */
- pwrpriv->wowlan_wake_reason = 0;
-exit:
- DBG_871X("<== " FUNC_ADPT_FMT " exit....\n", FUNC_ADPT_ARG(padapter));
- return ret;
-}
-#endif /* ifdef CONFIG_APWOWLAN */
-
static int rtw_resume_process_normal(struct adapter *padapter)
{
struct net_device *pnetdev;
@@ -1532,11 +1402,7 @@ int rtw_resume_common(struct adapter *padapter)
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
rtw_resume_process_normal(padapter);
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
- #ifdef CONFIG_AP_WOWLAN
- rtw_resume_process_ap_wow(padapter);
- #else
rtw_resume_process_normal(padapter);
- #endif /* CONFIG_AP_WOWLAN */
} else {
rtw_resume_process_normal(padapter);
}
--
2.20.1
remove conditional code blocks checked by unused CONFIG_SIGNAL_DISPLAY_DBM
cleaning required in TODO file:
find and remove code blocks guarded by never set CONFIG_FOO defines
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +-
drivers/staging/rtl8723bs/hal/hal_com.c | 4 ++--
.../staging/rtl8723bs/os_dep/ioctl_linux.c | 21 +++----------------
3 files changed, 6 insertions(+), 21 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 0ca3ddfc8b08..5d0611c5119b 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -4211,7 +4211,7 @@ void site_survey(struct adapter *padapter)
channel_scan_time_ms = pmlmeext->chan_scan_time;
set_survey_timer(pmlmeext, channel_scan_time_ms);
-#if defined(CONFIG_SIGNAL_DISPLAY_DBM) && defined(CONFIG_BACKGROUND_NOISE_MONITOR)
+#ifdef CONFIG_BACKGROUND_NOISE_MONITOR
{
struct noise_info info;
diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c
index 4a1ca57c2e15..7c65ec60a982 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -1262,7 +1262,7 @@ void GetHalODMVar(
)
{
switch (eVariable) {
-#if defined(CONFIG_SIGNAL_DISPLAY_DBM) && defined(CONFIG_BACKGROUND_NOISE_MONITOR)
+#ifdef CONFIG_BACKGROUND_NOISE_MONITOR
case HAL_ODM_NOISE_MONITOR:
{
struct hal_com_data *pHalData = GET_HAL_DATA(Adapter);
@@ -1313,7 +1313,7 @@ void SetHalODMVar(
case HAL_ODM_WIFI_DISPLAY_STATE:
ODM_CmnInfoUpdate(podmpriv, ODM_CMNINFO_WIFI_DISPLAY, bSet);
break;
- #if defined(CONFIG_SIGNAL_DISPLAY_DBM) && defined(CONFIG_BACKGROUND_NOISE_MONITOR)
+ #ifdef CONFIG_BACKGROUND_NOISE_MONITOR
case HAL_ODM_NOISE_MONITOR:
{
struct noise_info *pinfo = pValue1;
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index 822e6b650c6b..a52d04582aa1 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -313,14 +313,11 @@ static char *translate_scan(struct adapter *padapter,
/* Add quality statistics */
iwe.cmd = IWEVQUAL;
iwe.u.qual.updated = IW_QUAL_QUAL_UPDATED | IW_QUAL_LEVEL_UPDATED
- #if defined(CONFIG_SIGNAL_DISPLAY_DBM) && defined(CONFIG_BACKGROUND_NOISE_MONITOR)
+ #ifdef CONFIG_BACKGROUND_NOISE_MONITOR
| IW_QUAL_NOISE_UPDATED
#else
| IW_QUAL_NOISE_INVALID
#endif
- #ifdef CONFIG_SIGNAL_DISPLAY_DBM
- | IW_QUAL_DBM
- #endif
;
if (check_fwstate(pmlmepriv, _FW_LINKED) == true &&
@@ -333,9 +330,6 @@ static char *translate_scan(struct adapter *padapter,
}
- #ifdef CONFIG_SIGNAL_DISPLAY_DBM
- iwe.u.qual.level = (u8)translate_percentage_to_dbm(ss);/* dbm */
- #else
#ifdef CONFIG_SKIP_SIGNAL_SCALE_MAPPING
{
/* Do signal scale mapping when using percentage as the unit of signal strength, since the scale mapping is skipped in odm */
@@ -347,11 +341,10 @@ static char *translate_scan(struct adapter *padapter,
#else
iwe.u.qual.level = (u8)ss;/* */
#endif
- #endif
iwe.u.qual.qual = (u8)sq; /* signal quality */
- #if defined(CONFIG_SIGNAL_DISPLAY_DBM) && defined(CONFIG_BACKGROUND_NOISE_MONITOR)
+ #ifdef CONFIG_BACKGROUND_NOISE_MONITOR
{
s16 tmp_noise = 0;
rtw_hal_get_odm_var(padapter, HAL_ODM_NOISE_MONITOR, &(pnetwork->network.Configuration.DSConfig), &(tmp_noise));
@@ -4728,9 +4721,6 @@ static struct iw_statistics *rtw_get_wireless_stats(struct net_device *dev)
piwstats->qual.noise = 0;
/* DBG_871X("No link level:%d, qual:%d, noise:%d\n", tmp_level, tmp_qual, tmp_noise); */
} else {
- #ifdef CONFIG_SIGNAL_DISPLAY_DBM
- tmp_level = translate_percentage_to_dbm(padapter->recvpriv.signal_strength);
- #else
#ifdef CONFIG_SKIP_SIGNAL_SCALE_MAPPING
{
/* Do signal scale mapping when using percentage as the unit of signal strength, since the scale mapping is skipped in odm */
@@ -4742,10 +4732,9 @@ static struct iw_statistics *rtw_get_wireless_stats(struct net_device *dev)
#else
tmp_level = padapter->recvpriv.signal_strength;
#endif
- #endif
tmp_qual = padapter->recvpriv.signal_qual;
-#if defined(CONFIG_SIGNAL_DISPLAY_DBM) && defined(CONFIG_BACKGROUND_NOISE_MONITOR)
+#ifdef CONFIG_BACKGROUND_NOISE_MONITOR
if (rtw_linked_check(padapter)) {
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct noise_info info;
@@ -4772,10 +4761,6 @@ static struct iw_statistics *rtw_get_wireless_stats(struct net_device *dev)
}
piwstats->qual.updated = IW_QUAL_ALL_UPDATED ;/* IW_QUAL_DBM; */
- #ifdef CONFIG_SIGNAL_DISPLAY_DBM
- piwstats->qual.updated = piwstats->qual.updated | IW_QUAL_DBM;
- #endif
-
return &padapter->iwstats;
}
--
2.20.1
remove conditional code blocks checked by unused
CONFIG_BACKGROUND_NOISE_MONITOR
cleaning required in TODO file:
find and remove code blocks guarded by never set CONFIG_FOO defines
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 12 -----
drivers/staging/rtl8723bs/hal/hal_com.c | 35 -------------
drivers/staging/rtl8723bs/include/hal_com.h | 10 ----
drivers/staging/rtl8723bs/include/hal_data.h | 5 --
.../staging/rtl8723bs/os_dep/ioctl_linux.c | 50 +------------------
5 files changed, 1 insertion(+), 111 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 5d0611c5119b..e60a2ed32de5 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -4211,18 +4211,6 @@ void site_survey(struct adapter *padapter)
channel_scan_time_ms = pmlmeext->chan_scan_time;
set_survey_timer(pmlmeext, channel_scan_time_ms);
-#ifdef CONFIG_BACKGROUND_NOISE_MONITOR
- {
- struct noise_info info;
-
- info.bPauseDIG = false;
- info.IGIValue = 0;
- info.max_time = channel_scan_time_ms/2;/* ms */
- info.chan = survey_channel;
- rtw_hal_set_odm_var(padapter, HAL_ODM_NOISE_MONITOR, &info, false);
- }
-#endif
-
} else {
/* channel number is 0 or this channel is not valid. */
diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c
index 7c65ec60a982..bf07251a07d7 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -1262,20 +1262,6 @@ void GetHalODMVar(
)
{
switch (eVariable) {
-#ifdef CONFIG_BACKGROUND_NOISE_MONITOR
- case HAL_ODM_NOISE_MONITOR:
- {
- struct hal_com_data *pHalData = GET_HAL_DATA(Adapter);
- u8 chan = *(u8 *)pValue1;
- *(s16 *)pValue2 = pHalData->noise[chan];
- #ifdef DBG_NOISE_MONITOR
- DBG_8192C("### Noise monitor chan(%d)-noise:%d (dBm) ###\n",
- chan, pHalData->noise[chan]);
- #endif
-
- }
- break;
-#endif/* ifdef CONFIG_BACKGROUND_NOISE_MONITOR */
default:
break;
}
@@ -1313,27 +1299,6 @@ void SetHalODMVar(
case HAL_ODM_WIFI_DISPLAY_STATE:
ODM_CmnInfoUpdate(podmpriv, ODM_CMNINFO_WIFI_DISPLAY, bSet);
break;
- #ifdef CONFIG_BACKGROUND_NOISE_MONITOR
- case HAL_ODM_NOISE_MONITOR:
- {
- struct noise_info *pinfo = pValue1;
-
- #ifdef DBG_NOISE_MONITOR
- DBG_8192C("### Noise monitor chan(%d)-bPauseDIG:%d, IGIValue:0x%02x, max_time:%d (ms) ###\n",
- pinfo->chan, pinfo->bPauseDIG, pinfo->IGIValue, pinfo->max_time);
- #endif
-
- pHalData->noise[pinfo->chan] = ODM_InbandNoise_Monitor(podmpriv, pinfo->bPauseDIG, pinfo->IGIValue, pinfo->max_time);
- DBG_871X("chan_%d, noise = %d (dBm)\n", pinfo->chan, pHalData->noise[pinfo->chan]);
- #ifdef DBG_NOISE_MONITOR
- DBG_871X("noise_a = %d, noise_b = %d noise_all:%d\n",
- podmpriv->noise_level.noise[ODM_RF_PATH_A],
- podmpriv->noise_level.noise[ODM_RF_PATH_B],
- podmpriv->noise_level.noise_all);
- #endif
- }
- break;
- #endif/* ifdef CONFIG_BACKGROUND_NOISE_MONITOR */
default:
break;
diff --git a/drivers/staging/rtl8723bs/include/hal_com.h b/drivers/staging/rtl8723bs/include/hal_com.h
index c4b83eb16326..8669155dcddc 100644
--- a/drivers/staging/rtl8723bs/include/hal_com.h
+++ b/drivers/staging/rtl8723bs/include/hal_com.h
@@ -286,14 +286,4 @@ void SetHalODMVar(
enum HAL_ODM_VARIABLE eVariable,
void * pValue1,
bool bSet);
-
-#ifdef CONFIG_BACKGROUND_NOISE_MONITOR
-struct noise_info {
- u8 bPauseDIG;
- u8 IGIValue;
- u32 max_time;/* ms */
- u8 chan;
-};
-#endif
-
#endif /* __HAL_COMMON_H__ */
diff --git a/drivers/staging/rtl8723bs/include/hal_data.h b/drivers/staging/rtl8723bs/include/hal_data.h
index 8f5de747ae4e..8e75a334c60b 100644
--- a/drivers/staging/rtl8723bs/include/hal_data.h
+++ b/drivers/staging/rtl8723bs/include/hal_data.h
@@ -439,11 +439,6 @@ struct hal_com_data {
/* Interrupt related register information. */
u32 SysIntrStatus;
u32 SysIntrMask;
-
-#ifdef CONFIG_BACKGROUND_NOISE_MONITOR
- s16 noise[ODM_MAX_CHANNEL_NUM];
-#endif
-
};
#define GET_HAL_DATA(__padapter) ((struct hal_com_data *)((__padapter)->HalData))
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index a52d04582aa1..b6ae7dfc51fe 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -313,12 +313,7 @@ static char *translate_scan(struct adapter *padapter,
/* Add quality statistics */
iwe.cmd = IWEVQUAL;
iwe.u.qual.updated = IW_QUAL_QUAL_UPDATED | IW_QUAL_LEVEL_UPDATED
- #ifdef CONFIG_BACKGROUND_NOISE_MONITOR
- | IW_QUAL_NOISE_UPDATED
- #else
- | IW_QUAL_NOISE_INVALID
- #endif
- ;
+ | IW_QUAL_NOISE_INVALID;
if (check_fwstate(pmlmepriv, _FW_LINKED) == true &&
is_same_network(&pmlmepriv->cur_network.network, &pnetwork->network, 0)) {
@@ -344,15 +339,7 @@ static char *translate_scan(struct adapter *padapter,
iwe.u.qual.qual = (u8)sq; /* signal quality */
- #ifdef CONFIG_BACKGROUND_NOISE_MONITOR
- {
- s16 tmp_noise = 0;
- rtw_hal_get_odm_var(padapter, HAL_ODM_NOISE_MONITOR, &(pnetwork->network.Configuration.DSConfig), &(tmp_noise));
- iwe.u.qual.noise = tmp_noise;
- }
- #else
iwe.u.qual.noise = 0; /* noise level */
- #endif
/* DBG_871X("iqual =%d, ilevel =%d, inoise =%d, iupdated =%d\n", iwe.u.qual.qual, iwe.u.qual.level , iwe.u.qual.noise, iwe.u.qual.updated); */
@@ -3076,23 +3063,6 @@ static int rtw_dbg_port(struct net_device *dev,
}
}
break;
-#ifdef CONFIG_BACKGROUND_NOISE_MONITOR
- case 0x1e:
- {
- struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
- PDM_ODM_T pDM_Odm = &pHalData->odmpriv;
- u8 chan = rtw_get_oper_ch(padapter);
- DBG_871X("===========================================\n");
- ODM_InbandNoise_Monitor(pDM_Odm, true, 0x1e, 100);
- DBG_871X("channel(%d), noise_a = %d, noise_b = %d , noise_all:%d\n",
- chan, pDM_Odm->noise_level.noise[ODM_RF_PATH_A],
- pDM_Odm->noise_level.noise[ODM_RF_PATH_B],
- pDM_Odm->noise_level.noise_all);
- DBG_871X("===========================================\n");
-
- }
- break;
-#endif
case 0x23:
{
DBG_871X("turn %s the bNotifyChannelChange Variable\n", (extra_arg == 1)?"on":"off");
@@ -4734,24 +4704,6 @@ static struct iw_statistics *rtw_get_wireless_stats(struct net_device *dev)
#endif
tmp_qual = padapter->recvpriv.signal_qual;
-#ifdef CONFIG_BACKGROUND_NOISE_MONITOR
- if (rtw_linked_check(padapter)) {
- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
- struct noise_info info;
- info.bPauseDIG = true;
- info.IGIValue = 0x1e;
- info.max_time = 100;/* ms */
- info.chan = pmlmeext->cur_channel ;/* rtw_get_oper_ch(padapter); */
- rtw_ps_deny(padapter, PS_DENY_IOCTL);
- LeaveAllPowerSaveModeDirect(padapter);
-
- rtw_hal_set_odm_var(padapter, HAL_ODM_NOISE_MONITOR, &info, false);
- /* ODM_InbandNoise_Monitor(podmpriv, true, 0x20, 100); */
- rtw_ps_deny_cancel(padapter, PS_DENY_IOCTL);
- rtw_hal_get_odm_var(padapter, HAL_ODM_NOISE_MONITOR, &(info.chan), &(padapter->recvpriv.noise));
- DBG_871X("chan:%d, noise_level:%d\n", info.chan, padapter->recvpriv.noise);
- }
-#endif
tmp_noise = padapter->recvpriv.noise;
DBG_871X("level:%d, qual:%d, noise:%d, rssi (%d)\n", tmp_level, tmp_qual, tmp_noise, padapter->recvpriv.rssi);
--
2.20.1
remove conditional code blocks checked by unused
CONFIG_SKIP_SIGNAL_SCALE_MAPPING
cleaning required in TODO file:
find and remove code blocks guarded by never set CONFIG_FOO defines
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 9 --------
drivers/staging/rtl8723bs/include/rtw_recv.h | 5 -----
.../staging/rtl8723bs/os_dep/ioctl_linux.c | 21 -------------------
3 files changed, 35 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
index de63e4a2932e..5f2f17b49173 100644
--- a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
+++ b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
@@ -226,19 +226,10 @@ static void odm_RxPhyStatus92CSeries_Parsing(
/* UI BSS List signal strength(in percentage), make it good looking, from 0~100. */
/* It is assigned to the BSS List in GetValueFromBeaconOrProbeRsp(). */
if (isCCKrate) {
-#ifdef CONFIG_SKIP_SIGNAL_SCALE_MAPPING
- pPhyInfo->SignalStrength = (u8)PWDB_ALL;
-#else
pPhyInfo->signal_strength = (u8)(odm_SignalScaleMapping(pDM_Odm, PWDB_ALL));/* PWDB_ALL; */
-#endif
} else {
if (rf_rx_num != 0) {
-#ifdef CONFIG_SKIP_SIGNAL_SCALE_MAPPING
- total_rssi /= rf_rx_num;
- pPhyInfo->signal_strength = (u8)total_rssi;
-#else
pPhyInfo->signal_strength = (u8)(odm_SignalScaleMapping(pDM_Odm, total_rssi /= rf_rx_num));
-#endif
}
}
diff --git a/drivers/staging/rtl8723bs/include/rtw_recv.h b/drivers/staging/rtl8723bs/include/rtw_recv.h
index 484e9d62ef92..0a56c3a66ee8 100644
--- a/drivers/staging/rtl8723bs/include/rtw_recv.h
+++ b/drivers/staging/rtl8723bs/include/rtw_recv.h
@@ -512,14 +512,9 @@ static inline s32 translate_percentage_to_dbm(u32 SignalStrengthIndex)
{
s32 SignalPower; /* in dBm. */
-#ifdef CONFIG_SKIP_SIGNAL_SCALE_MAPPING
- /* Translate to dBm (x =y-100) */
- SignalPower = SignalStrengthIndex - 100;
-#else
/* Translate to dBm (x = 0.5y-95). */
SignalPower = (s32)((SignalStrengthIndex + 1) >> 1);
SignalPower -= 95;
-#endif
return SignalPower;
}
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index b6ae7dfc51fe..d0e77465ad9a 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -325,17 +325,7 @@ static char *translate_scan(struct adapter *padapter,
}
- #ifdef CONFIG_SKIP_SIGNAL_SCALE_MAPPING
- {
- /* Do signal scale mapping when using percentage as the unit of signal strength, since the scale mapping is skipped in odm */
-
- struct hal_com_data *pHal = GET_HAL_DATA(padapter);
-
- iwe.u.qual.level = (u8)odm_SignalScaleMapping(&pHal->odmpriv, ss);
- }
- #else
iwe.u.qual.level = (u8)ss;/* */
- #endif
iwe.u.qual.qual = (u8)sq; /* signal quality */
@@ -4691,18 +4681,7 @@ static struct iw_statistics *rtw_get_wireless_stats(struct net_device *dev)
piwstats->qual.noise = 0;
/* DBG_871X("No link level:%d, qual:%d, noise:%d\n", tmp_level, tmp_qual, tmp_noise); */
} else {
- #ifdef CONFIG_SKIP_SIGNAL_SCALE_MAPPING
- {
- /* Do signal scale mapping when using percentage as the unit of signal strength, since the scale mapping is skipped in odm */
-
- struct hal_com_data *pHal = GET_HAL_DATA(padapter);
-
- tmp_level = (u8)odm_SignalScaleMapping(&pHal->odmpriv, padapter->recvpriv.signal_strength);
- }
- #else
tmp_level = padapter->recvpriv.signal_strength;
- #endif
-
tmp_qual = padapter->recvpriv.signal_qual;
tmp_noise = padapter->recvpriv.noise;
DBG_871X("level:%d, qual:%d, noise:%d, rssi (%d)\n", tmp_level, tmp_qual, tmp_noise, padapter->recvpriv.rssi);
--
2.20.1
remove conditional code blocks checked by unused
CONFIG_GPIO_API
cleaning required in TODO file:
find and remove code blocks guarded by never set CONFIG_FOO defines
Signed-off-by: Fabio Aiuto <[email protected]>
---
.../staging/rtl8723bs/core/rtw_wlan_util.c | 95 -------------------
drivers/staging/rtl8723bs/include/drv_types.h | 6 --
.../staging/rtl8723bs/os_dep/ioctl_linux.c | 40 --------
3 files changed, 141 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index d04514d36b49..3e211780cde4 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -2014,98 +2014,3 @@ struct adapter *dvobj_get_port0_adapter(struct dvobj_priv *dvobj)
return dvobj->padapters;
}
-
-#ifdef CONFIG_GPIO_API
-int rtw_get_gpio(struct net_device *netdev, int gpio_num)
-{
- u8 value;
- u8 direction;
- struct adapter *adapter = rtw_netdev_priv(netdev);
- struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(adapter);
-
- rtw_ps_deny(adapter, PS_DENY_IOCTL);
-
- DBG_871X("rf_pwrstate = 0x%02x\n", pwrpriv->rf_pwrstate);
- LeaveAllPowerSaveModeDirect(adapter);
-
- /* Read GPIO Direction */
- direction = (rtw_read8(adapter, REG_GPIO_PIN_CTRL + 2) & BIT(gpio_num)) >> gpio_num;
-
- /* According the direction to read register value */
- if (direction)
- value = (rtw_read8(adapter, REG_GPIO_PIN_CTRL + 1) & BIT(gpio_num)) >> gpio_num;
- else
- value = (rtw_read8(adapter, REG_GPIO_PIN_CTRL) & BIT(gpio_num)) >> gpio_num;
-
- rtw_ps_deny_cancel(adapter, PS_DENY_IOCTL);
- DBG_871X("%s direction =%d value =%d\n", __func__, direction, value);
-
- return value;
-}
-EXPORT_SYMBOL(rtw_get_gpio);
-
-int rtw_set_gpio_output_value(struct net_device *netdev, int gpio_num, bool isHigh)
-{
- u8 direction = 0;
- u8 res = -1;
- struct adapter *adapter = rtw_netdev_priv(netdev);
-
- /* Check GPIO is 4~7 */
- if (gpio_num > 7 || gpio_num < 4) {
- DBG_871X("%s The gpio number does not included 4~7.\n", __func__);
- return -1;
- }
-
- rtw_ps_deny(adapter, PS_DENY_IOCTL);
-
- LeaveAllPowerSaveModeDirect(adapter);
-
- /* Read GPIO direction */
- direction = (rtw_read8(adapter, REG_GPIO_PIN_CTRL + 2) & BIT(gpio_num)) >> gpio_num;
-
- /* If GPIO is output direction, setting value. */
- if (direction) {
- if (isHigh)
- rtw_write8(adapter, REG_GPIO_PIN_CTRL + 1, rtw_read8(adapter, REG_GPIO_PIN_CTRL + 1) | BIT(gpio_num));
- else
- rtw_write8(adapter, REG_GPIO_PIN_CTRL + 1, rtw_read8(adapter, REG_GPIO_PIN_CTRL + 1) & ~BIT(gpio_num));
-
- DBG_871X("%s Set gpio %x[%d]=%d\n", __func__, REG_GPIO_PIN_CTRL+1, gpio_num, isHigh);
- res = 0;
- } else {
- DBG_871X("%s The gpio is input, not be set!\n", __func__);
- res = -1;
- }
-
- rtw_ps_deny_cancel(adapter, PS_DENY_IOCTL);
- return res;
-}
-EXPORT_SYMBOL(rtw_set_gpio_output_value);
-
-int rtw_config_gpio(struct net_device *netdev, int gpio_num, bool isOutput)
-{
- struct adapter *adapter = rtw_netdev_priv(netdev);
-
- if (gpio_num > 7 || gpio_num < 4) {
- DBG_871X("%s The gpio number does not included 4~7.\n", __func__);
- return -1;
- }
-
- DBG_871X("%s gpio_num =%d direction =%d\n", __func__, gpio_num, isOutput);
-
- rtw_ps_deny(adapter, PS_DENY_IOCTL);
-
- LeaveAllPowerSaveModeDirect(adapter);
-
- if (isOutput)
- rtw_write8(adapter, REG_GPIO_PIN_CTRL + 2, rtw_read8(adapter, REG_GPIO_PIN_CTRL + 2) | BIT(gpio_num));
- else
- rtw_write8(adapter, REG_GPIO_PIN_CTRL + 2, rtw_read8(adapter, REG_GPIO_PIN_CTRL + 2) & ~BIT(gpio_num));
-
- rtw_ps_deny_cancel(adapter, PS_DENY_IOCTL);
-
- return 0;
-}
-EXPORT_SYMBOL(rtw_config_gpio);
-#endif
-
diff --git a/drivers/staging/rtl8723bs/include/drv_types.h b/drivers/staging/rtl8723bs/include/drv_types.h
index 56ebf18a4c05..a7d30bab744c 100644
--- a/drivers/staging/rtl8723bs/include/drv_types.h
+++ b/drivers/staging/rtl8723bs/include/drv_types.h
@@ -528,12 +528,6 @@ static inline void RTW_ENABLE_FUNC(struct adapter *padapter, int func_bit)
(padapter)->bSurpriseRemoved || \
RTW_IS_FUNC_DISABLED((padapter), DF_TX_BIT))
-#ifdef CONFIG_GPIO_API
-int rtw_get_gpio(struct net_device *netdev, int gpio_num);
-int rtw_set_gpio_output_value(struct net_device *netdev, int gpio_num, bool isHigh);
-int rtw_config_gpio(struct net_device *netdev, int gpio_num, bool isOutput);
-#endif
-
static inline u8 *myid(struct eeprom_priv *peepriv)
{
return peepriv->mac_addr;
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index d0e77465ad9a..f5cd3639f571 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -3063,46 +3063,6 @@ static int rtw_dbg_port(struct net_device *dev,
{
break;
}
-#ifdef CONFIG_GPIO_API
- case 0x25: /* Get GPIO register */
- {
- /*
- * dbg 0x7f250000 [gpio_num], Get gpio value, gpio_num:0~7
- */
-
- int value;
- DBG_871X("Read GPIO Value extra_arg = %d\n", extra_arg);
- value = rtw_get_gpio(dev, extra_arg);
- DBG_871X("Read GPIO Value = %d\n", value);
- break;
- }
- case 0x26: /* Set GPIO direction */
- {
-
- /* dbg 0x7f26000x [y], Set gpio direction,
- * x: gpio_num, 4~7 y: indicate direction, 0~1
- */
-
- int value;
- DBG_871X("Set GPIO Direction! arg = %d , extra_arg =%d\n", arg, extra_arg);
- value = rtw_config_gpio(dev, arg, extra_arg);
- DBG_871X("Set GPIO Direction %s\n", (value == -1) ? "Fail!!!" : "Success");
- break;
- }
- case 0x27: /* Set GPIO output direction value */
- {
- /*
- * dbg 0x7f27000x [y], Set gpio output direction value,
- * x: gpio_num, 4~7 y: indicate direction, 0~1
- */
-
- int value;
- DBG_871X("Set GPIO Value! arg = %d , extra_arg =%d\n", arg, extra_arg);
- value = rtw_set_gpio_output_value(dev, arg, extra_arg);
- DBG_871X("Set GPIO Value %s\n", (value == -1) ? "Fail!!!" : "Success");
- break;
- }
-#endif
case 0xaa:
{
if ((extra_arg & 0x7F) > 0x3F)
--
2.20.1
remove conditional code blocks checked by unused CONFIG_HW_PWRP_DETECTION
cleaning required in TODO file:
find and remove code blocks guarded by never set CONFIG_FOO defines
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/os_dep/os_intfs.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index d8cdce0539af..d643e9a59e6b 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -113,11 +113,7 @@ static int rtw_enusbss;/* 0:disable, 1:enable */
static int rtw_hwpdn_mode = 2;/* 0:disable, 1:enable, 2: by EFUSE config */
-#ifdef CONFIG_HW_PWRP_DETECTION
-static int rtw_hwpwrp_detect = 1;
-#else
static int rtw_hwpwrp_detect; /* HW power ping detect 0:disable , 1:enable */
-#endif
static int rtw_hw_wps_pbc;
--
2.20.1
remove conditional code blocks checked by unused CONFIG_PM
cleaning required in TODO file:
find and remove code blocks guarded by never set CONFIG_FOO defines
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 2ff71d001c07..5748e1c1a25c 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -3198,14 +3198,6 @@ static void rtw_cfg80211_preinit_wiphy(struct adapter *padapter, struct wiphy *w
wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
wiphy->flags |= WIPHY_FLAG_OFFCHAN_TX | WIPHY_FLAG_HAVE_AP_SME;
-#if defined(CONFIG_PM)
- wiphy->max_sched_scan_reqs = 1;
-#endif
-
-#if defined(CONFIG_PM)
- wiphy->wowlan = &wowlan_stub;
-#endif
-
if (padapter->registrypriv.power_mgnt != PS_MODE_ACTIVE)
wiphy->flags |= WIPHY_FLAG_PS_ON_BY_DEFAULT;
else
--
2.20.1
remove conditional code blocks checked by unused
CONFIG_CHECK_BT_HANG
cleaning required in TODO file:
find and remove code blocks guarded by never set CONFIG_FOO defines
Signed-off-by: Fabio Aiuto <[email protected]>
---
.../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 31 -------------------
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 7 -----
.../staging/rtl8723bs/include/rtl8723b_hal.h | 7 -----
3 files changed, 45 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 9f059fb78c7d..5854590e5811 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -4421,34 +4421,3 @@ void rtl8723b_stop_thread(struct adapter *padapter)
}
#endif
}
-
-#if defined(CONFIG_CHECK_BT_HANG)
-extern void check_bt_status_work(void *data);
-void rtl8723bs_init_checkbthang_workqueue(struct adapter *adapter)
-{
- adapter->priv_checkbt_wq = alloc_workqueue("sdio_wq", 0, 0);
- INIT_DELAYED_WORK(&adapter->checkbt_work, (void *)check_bt_status_work);
-}
-
-void rtl8723bs_free_checkbthang_workqueue(struct adapter *adapter)
-{
- if (adapter->priv_checkbt_wq) {
- cancel_delayed_work_sync(&adapter->checkbt_work);
- flush_workqueue(adapter->priv_checkbt_wq);
- destroy_workqueue(adapter->priv_checkbt_wq);
- adapter->priv_checkbt_wq = NULL;
- }
-}
-
-void rtl8723bs_cancle_checkbthang_workqueue(struct adapter *adapter)
-{
- if (adapter->priv_checkbt_wq)
- cancel_delayed_work_sync(&adapter->checkbt_work);
-}
-
-void rtl8723bs_hal_check_bt_hang(struct adapter *adapter)
-{
- if (adapter->priv_checkbt_wq)
- queue_delayed_work(adapter->priv_checkbt_wq, &(adapter->checkbt_work), 0);
-}
-#endif
diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index d0e5b482f382..82b54131c9ec 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -1420,11 +1420,4 @@ void rtl8723bs_set_hal_ops(struct adapter *padapter)
pHalFunc->hal_xmit = &rtl8723bs_hal_xmit;
pHalFunc->mgnt_xmit = &rtl8723bs_mgnt_xmit;
pHalFunc->hal_xmitframe_enqueue = &rtl8723bs_hal_xmitframe_enqueue;
-
-#if defined(CONFIG_CHECK_BT_HANG)
- pHalFunc->hal_init_checkbthang_workqueue = &rtl8723bs_init_checkbthang_workqueue;
- pHalFunc->hal_free_checkbthang_workqueue = &rtl8723bs_free_checkbthang_workqueue;
- pHalFunc->hal_cancle_checkbthang_workqueue = &rtl8723bs_cancle_checkbthang_workqueue;
- pHalFunc->hal_checke_bt_hang = &rtl8723bs_hal_check_bt_hang;
-#endif
}
diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
index 0f787ec44b5b..6449238fb2a5 100644
--- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
+++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
@@ -240,13 +240,6 @@ void _8051Reset8723(struct adapter *padapter);
void rtl8723b_start_thread(struct adapter *padapter);
void rtl8723b_stop_thread(struct adapter *padapter);
-#if defined(CONFIG_CHECK_BT_HANG)
-void rtl8723bs_init_checkbthang_workqueue(struct adapter *adapter);
-void rtl8723bs_free_checkbthang_workqueue(struct adapter *adapter);
-void rtl8723bs_cancle_checkbthang_workqueue(struct adapter *adapter);
-void rtl8723bs_hal_check_bt_hang(struct adapter *adapter);
-#endif
-
int FirmwareDownloadBT(struct adapter *adapter, struct rt_firmware *firmware);
void CCX_FwC2HTxRpt_8723b(struct adapter *padapter, u8 *pdata, u8 len);
--
2.20.1
remove conditional code blocks checked by unused
CONFIG_EXT_CLK
cleaning required in TODO file:
find and remove code blocks guarded by never set CONFIG_FOO defines
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index a64274fa9907..d0e5b482f382 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -53,20 +53,6 @@ u8 _InitPowerOn_8723BS(struct adapter *padapter)
/* all of these MUST be configured before power on */
-#ifdef CONFIG_EXT_CLK
- /* Use external crystal(XTAL) */
- value8 = rtw_read8(padapter, REG_PAD_CTRL1_8723B + 2);
- value8 |= BIT(7);
- rtw_write8(padapter, REG_PAD_CTRL1_8723B + 2, value8);
-
- /* CLK_REQ High active or Low Active */
- /* Request GPIO polarity: */
- /* 0: low active */
- /* 1: high active */
- value8 = rtw_read8(padapter, REG_MULTI_FUNC_CTRL + 1);
- value8 |= BIT(5);
- rtw_write8(padapter, REG_MULTI_FUNC_CTRL + 1, value8);
-#endif /* CONFIG_EXT_CLK */
/* only cmd52 can be used before power on(card enable) */
ret = CardEnable(padapter);
--
2.20.1
remove conditional code blocks checked by unused
CONFIG_SDIO_TX_TASKLET
cleaning required in TODO file:
find and remove code blocks guarded by never set CONFIG_FOO defines
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 4 ----
drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 8 --------
drivers/staging/rtl8723bs/include/rtw_xmit.h | 4 ----
3 files changed, 16 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 5854590e5811..eddf01c71e24 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -4398,19 +4398,16 @@ u8 GetHalDefVar8723B(struct adapter *padapter, enum HAL_DEF_VARIABLE variable, v
void rtl8723b_start_thread(struct adapter *padapter)
{
-#ifndef CONFIG_SDIO_TX_TASKLET
struct xmit_priv *xmitpriv = &padapter->xmitpriv;
xmitpriv->SdioXmitThread = kthread_run(rtl8723bs_xmit_thread, padapter, "RTWHALXT");
if (IS_ERR(xmitpriv->SdioXmitThread)) {
RT_TRACE(_module_hal_xmit_c_, _drv_err_, ("%s: start rtl8723bs_xmit_thread FAIL!!\n", __func__));
}
-#endif
}
void rtl8723b_stop_thread(struct adapter *padapter)
{
-#ifndef CONFIG_SDIO_TX_TASKLET
struct xmit_priv *xmitpriv = &padapter->xmitpriv;
/* stop xmit_buf_thread */
@@ -4419,5 +4416,4 @@ void rtl8723b_stop_thread(struct adapter *padapter)
wait_for_completion(&xmitpriv->SdioXmitTerminate);
xmitpriv->SdioXmitThread = NULL;
}
-#endif
}
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
index a3bd9c2002c9..597cf3a88c51 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
@@ -124,10 +124,6 @@ static s32 rtl8723_dequeue_writeport(struct adapter *padapter)
/* pxmitbuf->priv_data = NULL; */
rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
-#ifdef CONFIG_SDIO_TX_TASKLET
- tasklet_hi_schedule(&pxmitpriv->xmit_tasklet);
-#endif
-
return _FAIL;
}
@@ -601,11 +597,7 @@ s32 rtl8723bs_hal_xmitframe_enqueue(
pxmitpriv->tx_drop++;
} else {
-#ifdef CONFIG_SDIO_TX_TASKLET
- tasklet_hi_schedule(&pxmitpriv->xmit_tasklet);
-#else
complete(&pxmitpriv->SdioXmitStart);
-#endif
}
return err;
diff --git a/drivers/staging/rtl8723bs/include/rtw_xmit.h b/drivers/staging/rtl8723bs/include/rtw_xmit.h
index a6fb8be8c63a..b482821c9af8 100644
--- a/drivers/staging/rtl8723bs/include/rtw_xmit.h
+++ b/drivers/staging/rtl8723bs/include/rtw_xmit.h
@@ -412,13 +412,9 @@ struct xmit_priv {
u8 wmm_para_seq[4];/* sequence for wmm ac parameter strength from large to small. it's value is 0->vo, 1->vi, 2->be, 3->bk. */
-#ifdef CONFIG_SDIO_TX_TASKLET
- struct tasklet_struct xmit_tasklet;
-#else
void *SdioXmitThread;
struct completion SdioXmitStart;
struct completion SdioXmitTerminate;
-#endif /* CONFIG_SDIO_TX_TASKLET */
struct __queue free_xmitbuf_queue;
struct __queue pending_xmitbuf_queue;
--
2.20.1
remove conditional code blocks checked by unused
CONFIG_SW_CHANNEL_PLAN
cleaning required in TODO file:
find and remove code blocks guarded by never set CONFIG_FOO defines
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/hal/hal_com.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c
index bf07251a07d7..368807e05830 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -132,10 +132,8 @@ u8 hal_com_config_channel_plan(
hw_chnlPlan = hw_channel_plan & (~EEPROM_CHANNEL_PLAN_BY_HW_MASK);
if (rtw_is_channel_plan_valid(hw_chnlPlan)) {
-#ifndef CONFIG_SW_CHANNEL_PLAN
if (hw_channel_plan & EEPROM_CHANNEL_PLAN_BY_HW_MASK)
pHalData->bDisableSWChannelPlan = true;
-#endif /* !CONFIG_SW_CHANNEL_PLAN */
chnlPlan = hw_chnlPlan;
}
--
2.20.1
remove conditional code blocks checked by unused
CONFIG_C2H_PACKET_EN
cleaning required in TODO file:
find and remove code blocks guarded by never set CONFIG_FOO defines
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/hal/sdio_ops.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c
index 0ea97e85e6a2..170a28f4b191 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_ops.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c
@@ -974,7 +974,6 @@ void sd_int_dpc(struct adapter *adapter)
if (hal->sdio_hisr & SDIO_HISR_TXBCNERR)
DBG_8192C("%s: SDIO_HISR_TXBCNERR\n", __func__);
-#ifndef CONFIG_C2H_PACKET_EN
if (hal->sdio_hisr & SDIO_HISR_C2HCMD) {
struct c2h_evt_hdr_88xx *c2h_evt;
@@ -997,7 +996,6 @@ void sd_int_dpc(struct adapter *adapter)
_set_workitem(&adapter->evtpriv.c2h_wk);
}
}
-#endif
if (hal->sdio_hisr & SDIO_HISR_RXFOVW)
DBG_8192C("%s: Rx Overflow\n", __func__);
--
2.20.1
remove conditional code blocks checked by unused
CONFIG_ODM_ADAPTIVITY
cleaning required in TODO file:
find and remove code blocks guarded by never set CONFIG_FOO defines
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/hal/rtl8723b_dm.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c b/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
index dce70fff0fae..4eb487cf70f0 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
@@ -91,9 +91,6 @@ static void Update_ODM_ComInfo_8723b(struct adapter *Adapter)
| ODM_MAC_EDCA_TURBO
| ODM_RF_TX_PWR_TRACK
| ODM_RF_CALIBRATION
-#ifdef CONFIG_ODM_ADAPTIVITY
- | ODM_BB_ADAPTIVITY
-#endif
;
/* */
--
2.20.1
On Mon, Mar 15, 2021 at 11:15:02AM +0100, Fabio Aiuto wrote:
> remove conditional code blocks checked by unused CONFIG_PM
>
> cleaning required in TODO file:
>
> find and remove code blocks guarded by never set CONFIG_FOO defines
>
> Signed-off-by: Fabio Aiuto <[email protected]>
> ---
> drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> index 2ff71d001c07..5748e1c1a25c 100644
> --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> @@ -3198,14 +3198,6 @@ static void rtw_cfg80211_preinit_wiphy(struct adapter *padapter, struct wiphy *w
> wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
> wiphy->flags |= WIPHY_FLAG_OFFCHAN_TX | WIPHY_FLAG_HAVE_AP_SME;
>
> -#if defined(CONFIG_PM)
> - wiphy->max_sched_scan_reqs = 1;
> -#endif
> -
> -#if defined(CONFIG_PM)
> - wiphy->wowlan = &wowlan_stub;
> -#endif
How this is "unused"? This is a real config option, did you just change
the logic here?
thanks,
greg k-h
On Mon, Mar 15, 2021 at 11:13:49AM +0100, Fabio Aiuto wrote:
> Remove unused code blocks as required in TODO file
>
> Fabio Aiuto (15):
> staging: rtl8723bs: remove unused code blocks conditioned by never set
> CONFIG_AUTO_AP_MODE
> staging: rtl8723bs: remove unused code blocks conditioned by never set
> CONFIG_HW_PWRP_DETECTION
> staging: rtl8723bs: remove unused code blocks conditioned by never set
> CONFIG_QOS_OPTIMIZATION
> staging: rtl8723bs: remove unused code blocks conditioned by never set
> CONFIG_AP_WOWLAN
> staging: rtl8723bs: remove unused code blocks conditioned by never set
> CONFIG_PM
> staging: rtl8723bs: remove unused code blocks conditioned by never set
> CONFIG_SIGNAL_DISPLAY_DBM
> staging: rtl8723bs: remove unused code blocks conditioned by never set
> CONFIG_BACKGROUND_NOISE_MONITOR
> staging: rtl8723bs: remove unused code blocks conditioned by never set
> CONFIG_SKIP_SIGNAL_SCALE_MAPPING
> staging: rtl8723bs: remove unused code blocks conditioned by never set
> CONFIG_GPIO_API
> staging: rtl8723bs: remove unused code blocks conditioned by never set
> CONFIG_EXT_CLK
> staging: rtl8723bs: remove unused code blocks conditioned by never set
> CONFIG_CHECK_BT_HANG
> staging: rtl8723bs: remove unused code blocks conditioned by never set
> CONFIG_SDIO_TX_TASKLET
> staging: rtl8723bs: remove unused code blocks conditioned by never set
> CONFIG_SW_CHANNEL_PLAN
> staging: rtl8723bs: remove unused code blocks conditioned by never set
> CONFIG_C2H_PACKET_EN
> staging: rtl8723bs: remove unused code blocks conditioned by never set
> CONFIG_ODM_ADAPTIVITY
Not all of these would apply, please rebase and resend the remaining
ones.
thanks,
greg k-h
On Tue, Mar 16, 2021 at 12:39:19PM +0100, Greg KH wrote:
> On Mon, Mar 15, 2021 at 11:15:02AM +0100, Fabio Aiuto wrote:
> > remove conditional code blocks checked by unused CONFIG_PM
> >
> > cleaning required in TODO file:
> >
> > find and remove code blocks guarded by never set CONFIG_FOO defines
> >
> > Signed-off-by: Fabio Aiuto <[email protected]>
> > ---
> > drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 8 --------
> > 1 file changed, 8 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> > index 2ff71d001c07..5748e1c1a25c 100644
> > --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> > +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> > @@ -3198,14 +3198,6 @@ static void rtw_cfg80211_preinit_wiphy(struct adapter *padapter, struct wiphy *w
> > wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
> > wiphy->flags |= WIPHY_FLAG_OFFCHAN_TX | WIPHY_FLAG_HAVE_AP_SME;
> >
> > -#if defined(CONFIG_PM)
> > - wiphy->max_sched_scan_reqs = 1;
> > -#endif
> > -
> > -#if defined(CONFIG_PM)
> > - wiphy->wowlan = &wowlan_stub;
> > -#endif
>
> How this is "unused"? This is a real config option, did you just change
> the logic here?
>
> thanks,
>
> greg k-h
Hi Greg,
ignore this patch. I missed that definition of PM config option.
I dropped it off my own local repo.
Thank you,
fabio