Commit 5a50c621 authored by Hans de Goede's avatar Hans de Goede Committed by Greg Kroah-Hartman

drivers: staging: rtl8723bs: Remove pmlmepriv->num_of_scanned

pmlmepriv->num_of_scanned is only ever set and never read, remove it.
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230221145326.7808-4-hdegoede@redhat.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fea50d5f
...@@ -32,8 +32,6 @@ int rtw_init_mlme_priv(struct adapter *padapter) ...@@ -32,8 +32,6 @@ int rtw_init_mlme_priv(struct adapter *padapter)
INIT_LIST_HEAD(&pmlmepriv->scanned_queue.queue); INIT_LIST_HEAD(&pmlmepriv->scanned_queue.queue);
spin_lock_init(&pmlmepriv->scanned_queue.lock); spin_lock_init(&pmlmepriv->scanned_queue.lock);
set_scanned_network_val(pmlmepriv, 0);
memset(&pmlmepriv->assoc_ssid, 0, sizeof(struct ndis_802_11_ssid)); memset(&pmlmepriv->assoc_ssid, 0, sizeof(struct ndis_802_11_ssid));
pbuf = vzalloc(array_size(MAX_BSS_CNT, sizeof(struct wlan_network))); pbuf = vzalloc(array_size(MAX_BSS_CNT, sizeof(struct wlan_network)));
...@@ -161,8 +159,6 @@ struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv) ...@@ -161,8 +159,6 @@ struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv)
pnetwork->aid = 0; pnetwork->aid = 0;
pnetwork->join_res = 0; pnetwork->join_res = 0;
pmlmepriv->num_of_scanned++;
exit: exit:
spin_unlock_bh(&free_queue->lock); spin_unlock_bh(&free_queue->lock);
...@@ -198,8 +194,6 @@ void _rtw_free_network(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwor ...@@ -198,8 +194,6 @@ void _rtw_free_network(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwor
list_add_tail(&(pnetwork->list), &(free_queue->queue)); list_add_tail(&(pnetwork->list), &(free_queue->queue));
pmlmepriv->num_of_scanned--;
spin_unlock_bh(&free_queue->lock); spin_unlock_bh(&free_queue->lock);
} }
...@@ -220,8 +214,6 @@ void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network * ...@@ -220,8 +214,6 @@ void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *
list_add_tail(&(pnetwork->list), get_list_head(free_queue)); list_add_tail(&(pnetwork->list), get_list_head(free_queue));
pmlmepriv->num_of_scanned--;
/* spin_unlock_irqrestore(&free_queue->lock, irqL); */ /* spin_unlock_irqrestore(&free_queue->lock, irqL); */
} }
...@@ -863,7 +855,6 @@ static void free_scanqueue(struct mlme_priv *pmlmepriv) ...@@ -863,7 +855,6 @@ static void free_scanqueue(struct mlme_priv *pmlmepriv)
list_del_init(plist); list_del_init(plist);
list_add_tail(plist, &free_queue->queue); list_add_tail(plist, &free_queue->queue);
plist = ptemp; plist = ptemp;
pmlmepriv->num_of_scanned--;
} }
spin_unlock_bh(&free_queue->lock); spin_unlock_bh(&free_queue->lock);
......
...@@ -303,7 +303,6 @@ struct mlme_priv { ...@@ -303,7 +303,6 @@ struct mlme_priv {
struct __queue free_bss_pool; struct __queue free_bss_pool;
struct __queue scanned_queue; struct __queue scanned_queue;
u8 *free_bss_buf; u8 *free_bss_buf;
u32 num_of_scanned;
struct ndis_802_11_ssid assoc_ssid; struct ndis_802_11_ssid assoc_ssid;
u8 assoc_bssid[6]; u8 assoc_bssid[6];
...@@ -490,13 +489,6 @@ static inline void _clr_fwstate_(struct mlme_priv *pmlmepriv, signed int state) ...@@ -490,13 +489,6 @@ static inline void _clr_fwstate_(struct mlme_priv *pmlmepriv, signed int state)
pmlmepriv->bScanInProcess = false; pmlmepriv->bScanInProcess = false;
} }
static inline void set_scanned_network_val(struct mlme_priv *pmlmepriv, signed int val)
{
spin_lock_bh(&pmlmepriv->lock);
pmlmepriv->num_of_scanned = val;
spin_unlock_bh(&pmlmepriv->lock);
}
extern u16 rtw_get_capability(struct wlan_bssid_ex *bss); extern u16 rtw_get_capability(struct wlan_bssid_ex *bss);
extern void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *target); extern void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *target);
extern void rtw_disconnect_hdl_under_linked(struct adapter *adapter, struct sta_info *psta, u8 free_assoc); extern void rtw_disconnect_hdl_under_linked(struct adapter *adapter, struct sta_info *psta, u8 free_assoc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment