Commit 8e97f7d8 authored by Nishka Dasgupta's avatar Nishka Dasgupta Committed by Greg Kroah-Hartman

staging: rtl8723bs: Remove function rtw_alloc_network()

Remove function rtw_alloc_network() as all it does is call
_rtw_alloc_network().
Rename _rtw_alloc_network() to rtw_alloc_network().
Change references to _rtw_alloc_network() to refer to
rtw_alloc_network().
Issue first noticed while using Coccinelle and ret.cocci.
Signed-off-by: default avatarNishka Dasgupta <nishka.dasgupta@yahoo.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 367cdd13
...@@ -2100,7 +2100,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd) ...@@ -2100,7 +2100,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
rtw_indicate_connect(padapter); rtw_indicate_connect(padapter);
} else { } else {
pwlan = _rtw_alloc_network(pmlmepriv); pwlan = rtw_alloc_network(pmlmepriv);
spin_lock_bh(&(pmlmepriv->scanned_queue.lock)); spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
if (pwlan == NULL) { if (pwlan == NULL) {
pwlan = rtw_get_oldest_wlan_network(&pmlmepriv->scanned_queue); pwlan = rtw_get_oldest_wlan_network(&pmlmepriv->scanned_queue);
......
...@@ -143,7 +143,7 @@ struct wlan_network *_rtw_dequeue_network(struct __queue *queue) ...@@ -143,7 +143,7 @@ struct wlan_network *_rtw_dequeue_network(struct __queue *queue)
} }
*/ */
struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)/* _queue *free_queue) */ struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv)
{ {
struct wlan_network *pnetwork; struct wlan_network *pnetwork;
struct __queue *free_queue = &pmlmepriv->free_bss_pool; struct __queue *free_queue = &pmlmepriv->free_bss_pool;
...@@ -161,7 +161,8 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)/* _queue *f ...@@ -161,7 +161,8 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)/* _queue *f
list_del_init(&pnetwork->list); list_del_init(&pnetwork->list);
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("_rtw_alloc_network: ptr =%p\n", plist)); RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
("rtw_alloc_network: ptr =%p\n", plist));
pnetwork->network_type = 0; pnetwork->network_type = 0;
pnetwork->fixed = false; pnetwork->fixed = false;
pnetwork->last_scanned = jiffies; pnetwork->last_scanned = jiffies;
...@@ -366,15 +367,6 @@ static struct wlan_network *rtw_dequeue_network(struct __queue *queue) ...@@ -366,15 +367,6 @@ static struct wlan_network *rtw_dequeue_network(struct __queue *queue)
} }
*/ */
struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv);
struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv)/* _queue *free_queue) */
{
struct wlan_network *pnetwork;
pnetwork = _rtw_alloc_network(pmlmepriv);
return pnetwork;
}
void rtw_free_network_nolock(struct adapter *padapter, struct wlan_network *pnetwork); void rtw_free_network_nolock(struct adapter *padapter, struct wlan_network *pnetwork);
void rtw_free_network_nolock(struct adapter *padapter, struct wlan_network *pnetwork) void rtw_free_network_nolock(struct adapter *padapter, struct wlan_network *pnetwork)
{ {
......
...@@ -598,7 +598,7 @@ extern void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv); ...@@ -598,7 +598,7 @@ extern void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv);
/* extern struct wlan_network* _rtw_dequeue_network(struct __queue *queue); */ /* extern struct wlan_network* _rtw_dequeue_network(struct __queue *queue); */
extern struct wlan_network* _rtw_alloc_network(struct mlme_priv *pmlmepriv); extern struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv);
extern void _rtw_free_network(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork, u8 isfreeall); extern void _rtw_free_network(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork, u8 isfreeall);
......
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