staging: rtl8723bs: Cleanup of commented out code
cover staging: rtl8723bs: Cleanup of commented out code
This patchset removes commented-out code from a bunch of source files in the rtl8723bs driver.
Jennifer Guo (3):
staging: rtl8723bs: remove commented out code in rtw_recv.c
staging: rtl8723bs: remove commented out code in os_dep/ files
staging: rtl8723bs: remove commented out code in hal/ files
drivers/staging/rtl8723bs/core/rtw_recv.c | 69 ------------------- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 39 ----------- drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 2 - drivers/staging/rtl8723bs/hal/rtl8723b_dm.c | 10 --- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 44 +----------- .../staging/rtl8723bs/hal/rtl8723b_phycfg.c | 2 - .../staging/rtl8723bs/hal/rtl8723b_rf6052.c | 8 +-- .../staging/rtl8723bs/hal/rtl8723b_rxdesc.c | 6 -- .../staging/rtl8723bs/hal/rtl8723bs_recv.c | 6 -- .../staging/rtl8723bs/hal/rtl8723bs_xmit.c | 5 -- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 1 - .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 19 ----- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 29 +------- .../staging/rtl8723bs/os_dep/sdio_ops_linux.c | 1 - drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 1 - 15 files changed, 9 insertions(+), 233 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/3 staging: rtl8723bs: remove commented out code in rtw_recv.c
Remove all commented-out code in this file.
Remove adjacent comment where applicable.
--- drivers/staging/rtl8723bs/core/rtw_recv.c | 69 ----------------------- 1 file changed, 69 deletions(-)
drivers/staging/rtl8723bs/core/rtw_recv.c +0 -69
@@ -54,8 +54,6 @@ signed int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *pada } precvpriv->precv_frame_buf =PTR_ALIGN (precvpriv->pallocated_frame_buf,RXFRAME_ALIGN_SZ ); -/* precvpriv->precv_frame_buf = precvpriv->pallocated_frame_buf + RXFRAME_ALIGN_SZ - */ -/* ((SIZE_PTR) (precvpriv->pallocated_frame_buf) &(RXFRAME_ALIGN_SZ-1)); */ precvframe = (union recv_frame *)precvpriv->precv_frame_buf;
@@ -181,7 +179,6 @@ signed int _rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *struct adapter *padapter = precvframe->u.hdr.adapter;struct recv_priv *precvpriv = &padapter->recvpriv; -/* INIT_LIST_HEAD(&(precvframe->u.hdr.list)); */ list_del_init (&(precvframe->u.hdr.list));list_add_tail (&(precvframe->u.hdr.list),get_list_head (queue));
@@ -197,10 +194,8 @@ signed int rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *q {signed int ret; -/* _spinlock(&pfree_recv_queue->lock); */ spin_lock_bh (&queue->lock); ret =_rtw_enqueue_recvframe (precvframe, queue); -/* spin_unlock(&pfree_recv_queue->lock); */ spin_unlock_bh (&queue->lock);return ret;
@@ -347,7 +342,6 @@ static signed int recvframe_chkmic(struct adapter *adapter, union recv_frame *pu8 bmic_err = false, brpt_micerror = true;u8 *pframe, *payload, *pframemic;u8 *mickey; -/* u8 *iv, rxdata_key_idx = 0; */ struct sta_info *stainfo;struct rx_pkt_attrib *prxattrib = &precvframe->u.hdr.attrib;struct security_priv *psecuritypriv = &adapter->securitypriv;
@@ -361,13 +355,8 @@ static signed int recvframe_chkmic(struct adapter *adapter, union recv_frame *p/* calculate mic code */ if (stainfo) {if (is_multicast_ether_addr (prxattrib->ra)) { -/* mickey =&psecuritypriv->dot118021XGrprxmickey.skey[0]; */ -/* iv = precvframe->u.hdr.rx_data+prxattrib->hdrlen; */ -/* rxdata_key_idx =(((iv[3])>>6)&0x3) ; */ mickey = &psecuritypriv->dot118021XGrprxmickey[prxattrib->key_index].skey[0 ]; -/* psecuritypriv->dot118021XGrpKeyid, pmlmeinfo->key_index, rxdata_key_idx); */ -if (!psecuritypriv->binstallGrpkey) { res = _FAIL; goto exit;
@@ -531,16 +520,7 @@ static union recv_frame *portctrl(struct adapter *adapter, union recv_frame *pre }else {/* allowed */ /* check decryption status, and decrypt the frame if needed */ - prtnframe = precv_frame; -/* check is the EAPOL frame or not (Rekey) */ -/* if (ether_type == eapol_type) { */ -/* check Rekey */ - -/* prtnframe =precv_frame; */ -/* */ -/* else { */ -/* */ } }else { prtnframe = precv_frame;
@@ -584,16 +564,10 @@ static void process_pwrbit_data(struct adapter *padapter, union recv_frame *precif (psta) {if (pwrbit) {if (!(psta->state &WIFI_SLEEP_STATE )) { -/* psta->state |= WIFI_SLEEP_STATE; */ -/* pstapriv->sta_dz_bitmap |= BIT(psta->aid); */ -stop_sta_xmit (padapter, psta); } }else {if (psta->state &WIFI_SLEEP_STATE ) { -/* psta->state ^= WIFI_SLEEP_STATE; */ -/* pstapriv->sta_dz_bitmap &= ~BIT(psta->aid); */ -wakeup_sta_to_xmit (padapter, psta); } }
@@ -924,7 +898,6 @@ static signed int validate_recv_ctrl_frame(struct adapter *padapter, union recv_struct sta_priv *pstapriv = &padapter->stapriv;u8 *pframe = precv_frame->u.hdr.rx_data;struct sta_info *psta =NULL ; -/* uint len = precv_frame->u.hdr.len; */ if (GetFrameType (pframe) !=WIFI_CTRL_TYPE )return _FAIL;
@@ -982,7 +955,6 @@ static signed int validate_recv_ctrl_frame(struct adapter *padapter, union recv_struct xmit_frame *pxmitframe =NULL ;struct xmit_priv *pxmitpriv = &padapter->xmitpriv; -/* spin_lock_bh(&psta->sleep_q.lock); */ spin_lock_bh (&pxmitpriv->lock); xmitframe_phead =get_list_head (&psta->sleep_q);
@@ -1010,15 +982,12 @@ static signed int validate_recv_ctrl_frame(struct adapter *padapter, union recv_ pstapriv->tim_bitmap &= ~BIT (psta->aid);/* update BCN for TIM IE */ -/* update_BCNTIM(padapter); */ update_beacon (padapter,WLAN_EID_TIM , true); } -/* spin_unlock_bh(&psta->sleep_q.lock); */ spin_unlock_bh (&pxmitpriv->lock); }else { -/* spin_unlock_bh(&psta->sleep_q.lock); */ spin_unlock_bh (&pxmitpriv->lock);if (pstapriv->tim_bitmap &BIT (psta->aid)) {
@@ -1032,7 +1001,6 @@ static signed int validate_recv_ctrl_frame(struct adapter *padapter, union recv_ pstapriv->tim_bitmap &= ~BIT (psta->aid);/* update BCN for TIM IE */ -/* update_BCNTIM(padapter); */ update_beacon (padapter,WLAN_EID_TIM , true); } }
@@ -1171,10 +1139,8 @@ static union recv_frame *recvframe_chk_defrag(struct adapter *padapter, union re/* Then enqueue the 0~(n-1) fragment into the defrag_q */ -/* spin_lock(&pdefrag_q->lock); */ phead =get_list_head (pdefrag_q);list_add_tail (&pfhdr->list, phead); -/* spin_unlock(&pdefrag_q->lock); */ prtnframe =NULL ;
@@ -1189,10 +1155,8 @@ static union recv_frame *recvframe_chk_defrag(struct adapter *padapter, union re/* the last fragment frame */ /* enqueue the last fragment */ if (pdefrag_q) { -/* spin_lock(&pdefrag_q->lock); */ phead =get_list_head (pdefrag_q);list_add_tail (&pfhdr->list, phead); -/* spin_unlock(&pdefrag_q->lock); */ /* call recvframe_defrag to defrag */ precv_frame =recvframe_defrag (padapter, pdefrag_q);
@@ -1320,8 +1284,6 @@ static signed int validate_recv_data_frame(struct adapter *adapter, union recv_f goto exit; } -/* psta->rssi = prxcmd->rssi; */ -/* psta->signal_quality = prxcmd->sq; */ precv_frame->u.hdr.psta = psta; pattrib->amsdu =0 ;
@@ -1527,7 +1489,6 @@ static signed int wlanhdr_to_ethhdr(union recv_frame *precvframe) psnap = (struct ieee80211_snap_hdr *)(ptr + pattrib->hdrlen + pattrib->iv_len); psnap_type = ptr + pattrib->hdrlen + pattrib->iv_len +SNAP_SIZE ;/* convert hdr + possible LLC headers into Ethernet header */ -/* eth_type = (psnap_type[0] << 8) | psnap_type[1]; */ if ((!memcmp(psnap, rfc1042_header, SNAP_SIZE) && (memcmp(psnap_type, SNAP_ETH_TYPE_IPX, 2)) && (memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_AARP, 2))) ||
@@ -1638,7 +1599,6 @@ static void rtw_recv_indicate_pkt(struct adapter *padapter, struct sk_buff *pkt,if (psta) {struct net_device *pnetdev = (struct net_device *)padapter->pnetdev; -/* skb->ip_summed = CHECKSUM_NONE; */ pkt->dev = pnetdev;skb_set_queue_mapping (pkt,rtw_recv_select_queue (pkt));
@@ -1773,9 +1733,6 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, ununion recv_frame *pnextrframe;struct rx_pkt_attrib *pnextattrib; -/* spin_lock_irqsave(&ppending_recvframe_queue->lock, irql); */ -/* spin_lock(&ppending_recvframe_queue->lock); */ - phead =get_list_head (ppending_recvframe_queue); plist =get_next (phead);
@@ -1787,22 +1744,15 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, un plist =get_next (plist); else if (SN_EQUAL(pnextattrib->seq_num, pattrib->seq_num)) /* Duplicate entry is found!! Do not insert current entry. */ - /* spin_unlock_irqrestore(&ppending_recvframe_queue->lock, irql); */ return false; else break; } -/* spin_lock_irqsave(&ppending_recvframe_queue->lock, irql); */ -/* spin_lock(&ppending_recvframe_queue->lock); */ -list_del_init (&(prframe->u.hdr.list));list_add_tail (&(prframe->u.hdr.list), plist); -/* spin_unlock(&ppending_recvframe_queue->lock); */ -/* spin_unlock_irqrestore(&ppending_recvframe_queue->lock, irql); */ -return true; }
@@ -1848,22 +1798,16 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reorstruct list_head *phead, *plist;union recv_frame *prframe;struct rx_pkt_attrib *pattrib; -/* u8 index = 0; */ int bPktInBuf = false;struct recv_priv *precvpriv = &padapter->recvpriv;struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue; -/* spin_lock_irqsave(&ppending_recvframe_queue->lock, irql); */ -/* spin_lock(&ppending_recvframe_queue->lock); */ - phead =get_list_head (ppending_recvframe_queue); plist =get_next (phead);/* Handling some condition for forced indicate case. */ if (bforced) {if (list_empty (phead)) { -/* spin_unlock_irqrestore(&ppending_recvframe_queue->lock, irql); */ -/* spin_unlock(&ppending_recvframe_queue->lock); */ return true; }
@@ -1886,9 +1830,6 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reorif (SN_EQUAL (preorder_ctrl->indicate_seq, pattrib->seq_num)) preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq +1 ) %4096u ; -/* Set this as a lock to make sure that only one thread is indicating packet. */ -/* pTS->RxIndicateState = RXTS_INDICATE_PROCESSING; */ -/* Indicate packets */ /* indicate this recv_frame */
@@ -1914,9 +1855,6 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor } } -/* spin_unlock(&ppending_recvframe_queue->lock); */ -/* spin_unlock_irqrestore(&ppending_recvframe_queue->lock, irql); */ -return bPktInBuf; }
@@ -1971,8 +1909,6 @@ static int recv_indicatepkt_reorder(struct adapter *padapter, union recv_frame */* s3. Insert all packet into Reorder Queue to maintain its ordering. */ if (!enqueue_reorder_recvframe (preorder_ctrl, prframe)) { -/* spin_unlock_irqrestore(&ppending_recvframe_queue->lock, irql); */ -/* return _FAIL; */ goto _err_exit; }
@@ -1986,7 +1922,6 @@ static int recv_indicatepkt_reorder(struct adapter *padapter, union recv_frame */* 2. All packets with SeqNum larger than or equal to WinStart => Buffer it. */ /* */ -/* recv_indicatepkts_in_order(padapter, preorder_ctrl, true); */ if (recv_indicatepkts_in_order (padapter, preorder_ctrl, false)) {_set_timer (&preorder_ctrl->reordering_ctrl_timer,REORDER_WAIT_TIME );spin_unlock_bh (&ppending_recvframe_queue->lock);
@@ -2024,14 +1959,10 @@ void rtw_reordering_ctrl_timeout_handler(struct timer_list *t)static int process_recv_indicatepkts (struct adapter *padapter,union recv_frame *prframe) {int retval = _SUCCESS; -/* struct recv_priv *precvpriv = &padapter->recvpriv; */ -/* struct rx_pkt_attrib *pattrib = &prframe->u.hdr.attrib; */ struct mlme_priv *pmlmepriv = &padapter->mlmepriv;struct ht_priv *phtpriv = &pmlmepriv->htpriv;if (phtpriv->ht_option) {/* B/G/N Mode */ -/* prframe->u.hdr.preorder_ctrl = &precvpriv->recvreorder_ctrl[pattrib->priority]; */ -if (recv_indicatepkt_reorder (padapter, prframe) != _SUCCESS) {/* including perform A-MPDU Rx Ordering Buffer Control */ if (!padapter->driver_stopped &&
Signature · 1 line
2.34.1
PATCH 2/3 staging: rtl8723bs: remove commented out code in os_dep/ files
In reply to Jennifer GuoRemove commented out code in all source files in os_dep/ Remove adjacent comment where applicable.
--- .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 19 ------------ drivers/staging/rtl8723bs/os_dep/os_intfs.c | 29 ++----------------- .../staging/rtl8723bs/os_dep/sdio_ops_linux.c | 1 - drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 1 - 4 files changed, 2 insertions(+), 48 deletions(-)
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +0 -19
@@ -204,7 +204,6 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wl {struct ieee80211_channel *notify_channel;struct cfg80211_bss *bss =NULL ; -/* struct ieee80211_supported_band *band; */ u16 channel;u32 freq;u64 notify_timestamp;
@@ -232,7 +231,6 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wl }/* To reduce PBC Overlap rate */ -/* spin_lock_bh(&pwdev_priv->scan_req_lock); */ if (adapter_wdev_data (padapter)->scan_request) {u8 *psr =NULL , sr =0 ;struct ndis_802_11_ssid *pssid = &pnetwork->network.ssid;
@@ -258,7 +256,6 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wl } } } -/* spin_unlock_bh(&pwdev_priv->scan_req_lock); */ channel = pnetwork->network.configuration.ds_config; freq =rtw_ieee80211_channel_to_frequency (channel);
@@ -285,7 +282,6 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wl *(fctrl) =0 ;SetSeqNum (pwlanhdr,0 /*pmlmeext->mgnt_seq*/ ); -/* pmlmeext->mgnt_seq++; */ if (pnetwork->network.reserved[0 ] ==1 ) {/* WIFI_BEACON */ eth_broadcast_addr (pwlanhdr->addr1);
@@ -517,7 +513,6 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa }else { psta =rtw_get_stainfo (pstapriv, param->sta_addr);if (!psta) -/* ret = -EINVAL; */ goto exit; }
@@ -782,7 +777,6 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_parammemcpy (psta->dot11tkiprxmickey.skey, ¶m->u.crypt.key[24 ],8 ); padapter->securitypriv.busetkipkey = false; -/* _set_timer(&padapter->securitypriv.tkip_timer, 50); */ }rtw_setstakey_cmd (padapter, psta, true, true);
@@ -846,8 +840,6 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct wireless_dev *wdev,switch (params->cipher) {case IW_AUTH_CIPHER_NONE : -/* todo: remove key */ -/* remove = 1; */ alg_name ="none" ;break ;case WLAN_CIPHER_SUITE_WEP40 :
@@ -1125,7 +1117,6 @@ void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter)/* report network only if the current channel set contains the channel to which this network belongs */ if (rtw_ch_set_search_ch (padapter->mlmeextpriv.channel_set, pnetwork->network.configuration.ds_config) >=0 && true ==rtw_validate_ssid (&pnetwork->network.ssid)) { -/* ev =translate_scan(padapter, a, pnetwork, ev, stop); */ rtw_cfg80211_inform_bss (padapter, pnetwork); } }
@@ -1330,7 +1321,6 @@ static int rtw_cfg80211_set_auth_type(struct security_priv *psecuritypriv,break ;default : psecuritypriv->dot11_auth_algrthm = dot11_auth_algrthm_open; -/* return -ENOTSUPP; */ }return 0 ;
@@ -1376,9 +1366,6 @@ static int rtw_cfg80211_set_cipher(struct security_priv *psecuritypriv, u32 ciphif (ucast) { psecuritypriv->ndisencryptstatus = ndisencryptstatus; - -/* if (psecuritypriv->dot11_privacy_algrthm >= _AES_) */ -/* psecuritypriv->ndisauthtype = Ndis802_11AuthModeWPA2PSK; */ }return 0 ;
@@ -1387,7 +1374,6 @@ static int rtw_cfg80211_set_cipher(struct security_priv *psecuritypriv, u32 ciphstatic int rtw_cfg80211_set_key_mgt (struct security_priv *psecuritypriv,u32 key_mgt) {if (key_mgt ==WLAN_AKM_SUITE_8021X ) -/* auth_type = UMAC_AUTH_TYPE_8021X; */ psecuritypriv->dot11_auth_algrthm = dot11_auth_algrthm_8021x;else if (key_mgt ==WLAN_AKM_SUITE_PSK ) { psecuritypriv->dot11_auth_algrthm = dot11_auth_algrthm_8021x;
@@ -1752,8 +1738,6 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev, authmode = psecuritypriv->ndisauthtype;rtw_set_802_11_authentication_mode (padapter, authmode); -/* rtw_set_802_11_encryption_mode(padapter, padapter->securitypriv.ndisencryptstatus); */ -if (!rtw_set_802_11_connect (padapter, (u8 *)sme->bssid, &ndis_ssid)) { ret =-1 ; goto exit;
@@ -2055,8 +2039,6 @@ static netdev_tx_t rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, strucstruct xmit_frame *pmgntframe;struct pkt_attrib *pattrib;unsigned char *pframe; -/* u8 category, action, OUI_Subtype, dialogToken = 0; */ -/* unsigned char *frame_body; */ struct ieee80211_hdr *pwlanhdr;struct xmit_priv *pxmitpriv = &padapter->xmitpriv;struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
@@ -2476,7 +2458,6 @@ static int _cfg80211_rtw_mgmt_tx(struct adapter *padapter, u8 tx_ch, const u8 *b/* starting alloc mgmt frame to dump it */ pmgntframe =alloc_mgtxmitframe (pxmitpriv);if (!pmgntframe) { -/* ret = -ENOMEM; */ ret = _FAIL; goto exit; }
drivers/staging/rtl8723bs/os_dep/os_intfs.c +2 -27
@@ -20,7 +20,6 @@ static int rtw_lbkmode;/* RTL8712_AIR_TRX; */static int rtw_network_mode =NL80211_IFTYPE_ADHOC ;/* infra, ad-hoc, auto */ -/* struct ndis_802_11_ssid ssid; */ static int rtw_channel =1 ;/* ad-hoc support requirement */ static int rtw_wireless_mode =WIRELESS_11BG_24N ;static int rtw_vrtl_carrier_sense =AUTO_VCS ;
@@ -31,7 +30,6 @@ static int rtw_preamble = PREAMBLE_LONG;/* long, short, auto */static int rtw_scan_mode =1 ;/* active, passive */ static int rtw_adhoc_tx_pwr =1 ;static int rtw_soft_ap; -/* int smart_ps = 1; */ static int rtw_power_mgnt =1 ;static int rtw_ips_mode =IPS_NORMAL ;module_param (rtw_ips_mode, int,0644 );
@@ -48,7 +46,6 @@ static int rtw_radio_enable = 1;static int rtw_long_retry_lmt =7 ;static int rtw_short_retry_lmt =7 ;static int rtw_busy_thresh =40 ; -/* int qos_enable = 0; */ static int rtw_ack_policy =NORMAL_ACK ;static int rtw_software_encrypt;
@@ -182,7 +179,6 @@ static void loadparam(struct adapter *padapter) registry_par->chip_version = (u8 )rtw_chip_version; registry_par->rfintfs = (u8 )rtw_rfintfs; registry_par->lbkmode = (u8 )rtw_lbkmode; -/* registry_par->hci = (u8)hci; */ registry_par->network_mode = (u8 )rtw_network_mode;memcpy (registry_par->ssid.ssid,"ANY" ,3 );
@@ -207,7 +203,6 @@ static void loadparam(struct adapter *padapter) registry_par->long_retry_lmt = (u8 )rtw_long_retry_lmt; registry_par->short_retry_lmt = (u8 )rtw_short_retry_lmt; registry_par->busy_thresh = (u16 )rtw_busy_thresh; -/* registry_par->qos_enable = (u8)rtw_qos_enable; */ registry_par->ack_policy = (u8 )rtw_ack_policy; registry_par->software_encrypt = (u8 )rtw_software_encrypt; registry_par->software_decrypt = (u8 )rtw_software_decrypt;
@@ -274,10 +269,7 @@ static int rtw_net_set_mac_address(struct net_device *pnetdev, void *p)struct sockaddr *addr = p;if (!padapter->bup) { -/* addr->sa_data[4], addr->sa_data[5]); */ memcpy (padapter->eeprompriv.mac_addr, addr->sa_data,ETH_ALEN ); -/* eth_hw_addr_set(pnetdev, addr->sa_data); */ -/* padapter->bset_hwaddr = true; */ }return 0 ;
@@ -289,8 +281,8 @@ static struct net_device_stats *rtw_net_get_stats(struct net_device *pnetdev)struct xmit_priv *pxmitpriv = &padapter->xmitpriv;struct recv_priv *precvpriv = &padapter->recvpriv; - padapter->stats.tx_packets = pxmitpriv->tx_pkts;/* pxmitpriv->tx_pkts++; */ - padapter->stats.rx_packets = precvpriv->rx_pkts;/* precvpriv->rx_pkts++; */ + padapter->stats.tx_packets = pxmitpriv->tx_pkts; + padapter->stats.rx_packets = precvpriv->rx_pkts; padapter->stats.tx_dropped = pxmitpriv->tx_drop; padapter->stats.rx_dropped = precvpriv->rx_drop; padapter->stats.tx_bytes = pxmitpriv->tx_bytes;
@@ -409,7 +401,6 @@ int rtw_init_netdev_name(struct net_device *pnetdev, const char *ifname)return 1 ; }netif_carrier_off (pnetdev); -/* rtw_netif_stop_queue(pnetdev); */ return 0 ; }
@@ -431,11 +422,8 @@ struct net_device *rtw_init_netdev(struct adapter *old_padapter) padapter =rtw_netdev_priv (pnetdev); padapter->pnetdev = pnetdev; -/* pnetdev->init = NULL; */ - pnetdev->netdev_ops = &rtw_netdev_ops; -/* pnetdev->tx_timeout = NULL; */ pnetdev->watchdog_timeo =HZ *3 ;/* 3 second timeout */ /* step 2. */
@@ -512,7 +500,6 @@ static void rtw_init_default_value(struct adapter *padapter) pxmitpriv->vcs_setting = pregistrypriv->vrtl_carrier_sense; pxmitpriv->vcs = pregistrypriv->vcs_type; pxmitpriv->vcs_type = pregistrypriv->vcs_type; -/* pxmitpriv->rts_thresh = pregistrypriv->rts_thresh; */ pxmitpriv->frag_len = pregistrypriv->frag_thresh;/* recv_priv */
@@ -520,9 +507,6 @@ static void rtw_init_default_value(struct adapter *padapter)/* mlme_priv */ pmlmepriv->scan_mode =SCAN_ACTIVE ; -/* qos_priv */ -/* pmlmepriv->qospriv.qos_option = pregistrypriv->wmm_enable; */ -/* ht_priv */ pmlmepriv->htpriv.ampdu_enable = false;/* set to disabled */
@@ -659,9 +643,6 @@ u8 rtw_init_drv_sw(struct adapter *padapter) goto free_xmit_priv;spin_lock_init (&padapter->security_key_mutex); -/* We don't need to memset padapter->XXX to zero, because adapter is allocated by vzalloc(). */ -/* memset((unsigned char *)&padapter->securitypriv, 0, sizeof (struct security_priv)); */ -if (_rtw_init_sta_priv (&padapter->stapriv) == _FAIL) goto free_recv_priv;
@@ -730,8 +711,6 @@ u8 rtw_free_drv_sw(struct adapter *padapter)rtw_free_pwrctrl_priv (padapter); -/* kfree((void *)padapter); */ -rtw_hal_data_deinit (padapter);/* free the old_pnetdev */
@@ -862,13 +841,11 @@ int netdev_open(struct net_device *pnetdev)static int ips_netdrv_open (struct adapter *padapter) {int status = _SUCCESS; -/* struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); */ padapter->net_closed = false; padapter->driver_stopped = false; padapter->bCardDisableWOHSM = false; -/* padapter->bup = true; */ status =rtw_hal_init (padapter);if (status == _FAIL)
@@ -930,7 +907,6 @@ static int netdev_close(struct net_device *pnetdev)struct pwrctrl_priv *pwrctl =adapter_to_pwrctl (padapter);if (pwrctl->bInternalAutoSuspend) { -/* rtw_pwr_wakeup(padapter); */ if (pwrctl->rf_pwrstate == rf_off) pwrctl->ps_flag = true; }
@@ -1068,7 +1044,6 @@ static void rtw_suspend_normal(struct adapter *padapter)rtw_dev_unload (padapter); -/* sdio_deinit(adapter_to_dvobj(padapter)); */ if (padapter->intf_deinit) padapter->intf_deinit (adapter_to_dvobj (padapter)); }
drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c +0 -1
@@ -433,7 +433,6 @@ s32 _sd_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata)return err; func = psdio->func; -/* size = sdio_align_size(func, cnt); */ if (unlikely ((cnt ==1 ) || (cnt ==2 ))) {int i;
drivers/staging/rtl8723bs/os_dep/xmit_linux.c +0 -1
@@ -165,7 +165,6 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb) } }else { pxmitpriv->tx_drop++; -/* dev_kfree_skb_any(skb); */ return false;/* Caller shall tx this multicast frame via normal way. */ } }
Signature · 1 line
2.34.1
PATCH 3/3 staging: rtl8723bs: remove commented out code in hal/ files
In reply to Jennifer GuoRemove commented out code in a bunch of hal/ source files Remove adjacent comment where applicable.
--- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 39 ---------------- drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 2 - drivers/staging/rtl8723bs/hal/rtl8723b_dm.c | 10 ----- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 44 ++----------------- .../staging/rtl8723bs/hal/rtl8723b_phycfg.c | 2 - .../staging/rtl8723bs/hal/rtl8723b_rf6052.c | 8 ++-- .../staging/rtl8723bs/hal/rtl8723b_rxdesc.c | 6 --- .../staging/rtl8723bs/hal/rtl8723bs_recv.c | 6 --- .../staging/rtl8723bs/hal/rtl8723bs_xmit.c | 5 --- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 1 - 10 files changed, 7 insertions(+), 116 deletions(-)
drivers/staging/rtl8723bs/hal/hal_btcoex.c +0 -39
@@ -783,8 +783,6 @@ void hal_btcoex_Initialize(void *padapter) pBtCoexist = &GLBtCoexist; -/* pBtCoexist->statistics.cntBind++; */ - pBtCoexist->chipInterface =BTC_INTF_SDIO ;EXhalbtcoutsrc_BindBtCoexWithAdapter (padapter);
@@ -874,15 +872,10 @@ void EXhalbtcoutsrc_IpsNotify(struct btc_coexist *pBtCoexist, u8 type)else ipsType =BTC_IPS_ENTER ; -/* All notify is called in cmd thread, don't need to leave low power again */ -/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ -if (pBtCoexist->boardInfo.btdmAntNum ==2 )EXhalbtc8723b2ant_IpsNotify (pBtCoexist, ipsType);else if (pBtCoexist->boardInfo.btdmAntNum ==1 )EXhalbtc8723b1ant_IpsNotify (pBtCoexist, ipsType); - -/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ }void EXhalbtcoutsrc_LpsNotify (struct btc_coexist *pBtCoexist,u8 type)
@@ -925,15 +918,10 @@ void EXhalbtcoutsrc_ScanNotify(struct btc_coexist *pBtCoexist, u8 type) GLBtcWiFiInScanState = false; } -/* All notify is called in cmd thread, don't need to leave low power again */ -/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ -if (pBtCoexist->boardInfo.btdmAntNum ==2 )EXhalbtc8723b2ant_ScanNotify (pBtCoexist, scanType);else if (pBtCoexist->boardInfo.btdmAntNum ==1 )EXhalbtc8723b1ant_ScanNotify (pBtCoexist, scanType); - -/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ }void EXhalbtcoutsrc_ConnectNotify (struct btc_coexist *pBtCoexist,u8 action)
@@ -951,15 +939,10 @@ void EXhalbtcoutsrc_ConnectNotify(struct btc_coexist *pBtCoexist, u8 action)else assoType =BTC_ASSOCIATE_FINISH ; -/* All notify is called in cmd thread, don't need to leave low power again */ -/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ -if (pBtCoexist->boardInfo.btdmAntNum ==2 )EXhalbtc8723b2ant_ConnectNotify (pBtCoexist, assoType);else if (pBtCoexist->boardInfo.btdmAntNum ==1 )EXhalbtc8723b1ant_ConnectNotify (pBtCoexist, assoType); - -/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ } void EXhalbtcoutsrc_MediaStatusNotify(struct btc_coexist *pBtCoexist, enum
@@ -979,15 +962,10 @@ void EXhalbtcoutsrc_MediaStatusNotify(struct btc_coexist *pBtCoexist, enumelse mStatus =BTC_MEDIA_DISCONNECT ; -/* All notify is called in cmd thread, don't need to leave low power again */ -/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ -if (pBtCoexist->boardInfo.btdmAntNum ==2 )EXhalbtc8723b2ant_MediaStatusNotify (pBtCoexist, mStatus);else if (pBtCoexist->boardInfo.btdmAntNum ==1 )EXhalbtc8723b1ant_MediaStatusNotify (pBtCoexist, mStatus); - -/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ }void EXhalbtcoutsrc_SpecialPacketNotify (struct btc_coexist *pBtCoexist,u8 pktType)
@@ -1010,15 +988,10 @@ void EXhalbtcoutsrc_SpecialPacketNotify(struct btc_coexist *pBtCoexist, u8 pktTyreturn ; } -/* All notify is called in cmd thread, don't need to leave low power again */ -/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ -if (pBtCoexist->boardInfo.btdmAntNum ==2 )EXhalbtc8723b2ant_SpecialPacketNotify (pBtCoexist, packetType);else if (pBtCoexist->boardInfo.btdmAntNum ==1 )EXhalbtc8723b1ant_SpecialPacketNotify (pBtCoexist, packetType); - -/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ }void EXhalbtcoutsrc_BtInfoNotify (struct btc_coexist *pBtCoexist,u8 *tmpBuf,u8 length)
@@ -1028,15 +1001,10 @@ void EXhalbtcoutsrc_BtInfoNotify(struct btc_coexist *pBtCoexist, u8 *tmpBuf, u8 pBtCoexist->statistics.cntBtInfoNotify++; -/* All notify is called in cmd thread, don't need to leave low power again */ -/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ -if (pBtCoexist->boardInfo.btdmAntNum ==2 )EXhalbtc8723b2ant_BtInfoNotify (pBtCoexist, tmpBuf, length);else if (pBtCoexist->boardInfo.btdmAntNum ==1 )EXhalbtc8723b1ant_BtInfoNotify (pBtCoexist, tmpBuf, length); - -/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ }void EXhalbtcoutsrc_HaltNotify (struct btc_coexist *pBtCoexist)
@@ -1075,15 +1043,10 @@ void EXhalbtcoutsrc_Periodical(struct btc_coexist *pBtCoexist) pBtCoexist->statistics.cntPeriodical++;/* Periodical should be called in cmd thread, */ -/* don't need to leave low power again */ -/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ -if (pBtCoexist->boardInfo.btdmAntNum ==2 )EXhalbtc8723b2ant_Periodical (pBtCoexist);else if (pBtCoexist->boardInfo.btdmAntNum ==1 )EXhalbtc8723b1ant_Periodical (pBtCoexist); - -/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ }void EXhalbtcoutsrc_SetAntNum (u8 type,u8 antNum)
@@ -1093,10 +1056,8 @@ void EXhalbtcoutsrc_SetAntNum(u8 type, u8 antNum) GLBtCoexist.boardInfo.btdmAntNum = antNum; }else if (type ==BT_COEX_ANT_TYPE_ANTDIV ) { GLBtCoexist.boardInfo.btdmAntNum = antNum; -/* GLBtCoexist.boardInfo.btdmAntPos = BTC_ANTENNA_AT_MAIN_PORT; */ }else if (type ==BT_COEX_ANT_TYPE_DETECTED ) { GLBtCoexist.boardInfo.btdmAntNum = antNum; -/* GLBtCoexist.boardInfo.btdmAntPos = BTC_ANTENNA_AT_MAIN_PORT; */ } }
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c +0 -2
@@ -635,7 +635,6 @@ void rtl8723b_download_rsvd_page(struct adapter *padapter, u8 mstatus) DLBcnCount++; do { yield(); - /* mdelay(10); */ /* check rsvd page download OK. */ rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8 *)(&bcn_valid)); poll++;
@@ -895,7 +894,6 @@ void rtl8723b_download_BTCoex_AP_mode_rsvd_page(struct adapter *padapter) DLBcnCount++; do { yield(); -/* mdelay(10); */ /* check rsvd page download OK. */ rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, &bcn_valid); poll++;
drivers/staging/rtl8723bs/hal/rtl8723b_dm.c +0 -10
@@ -76,12 +76,6 @@ static void Update_ODM_ComInfo_8723b(struct adapter *Adapter) | ODM_RF_CALIBRATION ; -/* */ -/* Pointer reference */ -/* */ -/* ODM_CMNINFO_MAC_PHY_MODE pHalData->MacPhyMode92D */ -/* ODM_CmnInfoHook(pDM_Odm, ODM_CMNINFO_MAC_PHY_MODE,&(pDM_Odm->u8_temp)); */ -ODM_CmnInfoUpdate (pDM_Odm,ODM_CMNINFO_ABILITY , pdmpriv->InitODMFlag);ODM_CmnInfoHook (pDM_Odm,ODM_CMNINFO_TX_UNI , &(dvobj->traffic_stat.tx_bytes));
@@ -155,8 +149,6 @@ void rtl8723b_HalDmWatchDog(struct adapter *Adapter)ODM_CmnInfoUpdate (&pHalData->odmpriv,ODM_CMNINFO_LINK , bLinked);ODM_CmnInfoUpdate (&pHalData->odmpriv,ODM_CMNINFO_STATION_STATE , bsta_state); -/* ODM_CmnInfoUpdate(&pHalData->odmpriv , ODM_CMNINFO_RSSI_MIN, pdmpriv->MinUndecoratedPWDBForDM); */ - bBtDisabled =hal_btcoex_IsBtDisabled (Adapter); ODM_CmnInfoUpdate(&pHalData->odmpriv, ODM_CMNINFO_BT_ENABLED,
@@ -216,7 +208,6 @@ void rtl8723b_HalDmWatchDog_in_LPS(struct adapter *Adapter)if (!(pDM_Odm->SupportAbility &ODM_BB_RSSI_MONITOR )) goto skip_lps_dm; -/* ODM_DMWatchdog(&pHalData->odmpriv); */ /* Do DIG by RSSI In LPS-32K */ /* 1 Find MIN-RSSI */
@@ -233,7 +224,6 @@ void rtl8723b_HalDmWatchDog_in_LPS(struct adapter *Adapter) pDM_Odm->RSSI_Min = pdmpriv->MinUndecoratedPWDBForDM; -/* if (pDM_DigTable->CurIGValue != pDM_Odm->RSSI_Min) */ if ( (pDM_DigTable->CurIGValue > pDM_Odm->RSSI_Min +5 ) || (pDM_DigTable->CurIGValue < pDM_Odm->RSSI_Min - 5)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +3 -41
176 lines not on this page · raw message
drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c +0 -2
@@ -67,7 +67,6 @@ void PHY_SetBBReg_8723B(u32 Data ) { -/* u16 BBWaitCounter = 0; */ u32 OriginalValue, BitShift;if (BitMask != bMaskDWord) {/* if not "double word" write */
@@ -685,7 +684,6 @@ static void PHY_HandleSwChnlAndSetBW8723B(u8 CenterFrequencyIndex1 ) { -/* static bool bInitialzed = false; */ struct hal_com_data *pHalData =GET_HAL_DATA (Adapter);u8 tmpChannel = pHalData->CurrentChannel;enum channel_width tmpBW = pHalData->CurrentChannelBW;
drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c +4 -4
@@ -95,18 +95,18 @@ static int phy_RF6052_Config_ParaFile(struct adapter *Adapter)/*----Set RF_ENV enable----*/ PHY_SetBBReg (Adapter, pPhyReg->rfintfe, bRFSI_RFENV <<16 ,0x1 ); -udelay (1 );/* PlatformStallExecution(1); */ +udelay (1 );/*----Set RF_ENV output high----*/ PHY_SetBBReg (Adapter, pPhyReg->rfintfo, bRFSI_RFENV,0x1 ); -udelay (1 );/* PlatformStallExecution(1); */ +udelay (1 );/* Set bit number of Address and Data for RF register */ PHY_SetBBReg (Adapter, pPhyReg->rfHSSIPara2, b3WireAddressLength,0x0 );/* Set 1 to 4 bits for 8255 */ -udelay (1 );/* PlatformStallExecution(1); */ +udelay (1 );PHY_SetBBReg (Adapter, pPhyReg->rfHSSIPara2, b3WireDataLength,0x0 );/* Set 0 to 12 bits for 8255 */ -udelay (1 );/* PlatformStallExecution(1); */ +udelay (1 );/*----Initialize RF fom connfiguration file----*/ ODM_ConfigRFWithHeaderFile (&pHalData->odmpriv,CONFIG_RF_RADIO ,RF_PATH_A );
drivers/staging/rtl8723bs/hal/rtl8723b_rxdesc.c +0 -6
@@ -12,7 +12,6 @@ static void process_rssi(struct adapter *padapter, union recv_frame *prframe)struct rx_pkt_attrib *pattrib = &prframe->u.hdr.attrib;struct signal_stat *signal_stat = &padapter->recvpriv.signal_strength_data; -/* if (pRfd->Status.bPacketToSelf || pRfd->Status.bPacketBeacon) */ {if (signal_stat->update_req) { signal_stat->total_num =0 ;
@@ -56,12 +55,7 @@ void rtl8723b_process_phy_info(struct adapter *padapter, void *prframe)/* Check RSSI */ /* */ process_rssi (padapter, precvframe); -/* */ -/* Check PWDB. */ -/* */ -/* process_PWDB(padapter, precvframe); */ -/* UpdateRxSignalStatistics8192C(Adapter, pRfd); */ /* */ /* Check EVM */ /* */
drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c +0 -6
@@ -96,7 +96,6 @@ static void update_recvframe_phyinfo(union recv_frame *precvframe, .is_beacon = false, }; -/* unsigned long irqL; */ struct sta_priv *pstapriv;struct sta_info *psta;
@@ -125,13 +124,10 @@ static void update_recvframe_phyinfo(union recv_frame *precvframe, pkt_info.data_rate = pattrib->data_rate; -/* rtl8723b_query_rx_phy_status(precvframe, pphy_status); */ -/* spin_lock_bh(&p_hal_data->odm_stainfo_lock); */ odm_phy_status_query (&p_hal_data->odmpriv, p_phy_info, (u8 *)pphy_status, &(pkt_info));if (psta) psta->rssi = pattrib->phy_info.RecvSignalPower; -/* spin_unlock_bh(&p_hal_data->odm_stainfo_lock); */ precvframe->u.hdr.psta =NULL ; if ( pkt_info.bssid_match &&
@@ -307,7 +303,6 @@ static void rtl8723bs_recv_tasklet(struct tasklet_struct *t) precvframe->u.hdr.rx_end =skb_end_pointer (pkt_copy);recvframe_put (precvframe, skb_len); -/* recvframe_pull(precvframe, drvinfo_sz + RXDESC_SIZE); */ if (p_hal_data->ReceiveConfig &RCR_APPFCS )recvframe_pull_tail (precvframe,IEEE80211_FCS_LEN );
@@ -317,7 +312,6 @@ static void rtl8723bs_recv_tasklet(struct tasklet_struct *t)/* update drv info */ if (p_hal_data->ReceiveConfig &RCR_APP_BA_SSN ) { -/* rtl8723s_update_bassn(padapter, pdrvinfo); */ ptr +=4 ; }
drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c +0 -5
@@ -24,7 +24,6 @@ static u8 rtw_sdio_wait_enough_TxOQT_space(struct adapter *padapter, u8 agg_num)if ((++n %60 ) ==0 ) {msleep (1 ); -/* yield(); */ } }
@@ -103,8 +102,6 @@ static s32 rtl8723_dequeue_writeport(struct adapter *padapter)rtw_hal_sdio_update_tx_freepage (pri_padapter, PageIdx, pxmitbuf->pg_num); free_xmitbuf: -/* rtw_free_xmitframe(pxmitpriv, pframe); */ -/* pxmitbuf->priv_data = NULL; */ rtw_free_xmitbuf (pxmitpriv, pxmitbuf);return _FAIL;
@@ -248,8 +245,6 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitprivrtw_free_xmitframe (pxmitpriv, pframe); pxmitbuf->priv_data =NULL ;enqueue_pending_xmitbuf (pxmitpriv, pxmitbuf); -/* can not yield under lock */ -/* yield(); */ }else rtw_free_xmitbuf (pxmitpriv, pxmitbuf); }
drivers/staging/rtl8723bs/hal/sdio_halinit.c +0 -1
@@ -171,7 +171,6 @@ static void _InitTxBufferBoundary(struct adapter *padapter) {struct registry_priv *pregistrypriv = &padapter->registrypriv; -/* u16 txdmactrl; */ u8 txpktbuf_bndy;if (!pregistrypriv->wifi_spec) {
Signature · 1 line
2.34.1