Commit 5cace672 authored by Nishka Dasgupta's avatar Nishka Dasgupta Committed by Greg Kroah-Hartman

staging: rtl8188eu: Replace function rtw_alloc_network()

Change external call site of _rtw_alloc_network to 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 to maintain compatibility
with call sites. Keep its type as non-static (even though the old
rtw_alloc_network was static) as this functionality is used in other
files as well.
Issue found with Coccinelle.
Signed-off-by: default avatarNishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190712071746.2474-6-nishkadg.linux@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 04c8c198
...@@ -1200,7 +1200,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd) ...@@ -1200,7 +1200,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) { if (!pwlan) {
pwlan = rtw_get_oldest_wlan_network(&pmlmepriv->scanned_queue); pwlan = rtw_get_oldest_wlan_network(&pmlmepriv->scanned_queue);
......
...@@ -104,7 +104,7 @@ void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv) ...@@ -104,7 +104,7 @@ void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
} }
} }
struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv) struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv)
/* _queue *free_queue) */ /* _queue *free_queue) */
{ {
struct wlan_network *pnetwork; struct wlan_network *pnetwork;
...@@ -119,7 +119,7 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv) ...@@ -119,7 +119,7 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)
list_del_init(&pnetwork->list); list_del_init(&pnetwork->list);
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
("_rtw_alloc_network: ptr=%p\n", &pnetwork->list)); ("rtw_alloc_network: ptr=%p\n", &pnetwork->list));
pnetwork->network_type = 0; pnetwork->network_type = 0;
pnetwork->fixed = false; pnetwork->fixed = false;
pnetwork->last_scanned = jiffies; pnetwork->last_scanned = jiffies;
...@@ -272,11 +272,6 @@ u8 *rtw_get_beacon_interval_from_ie(u8 *ie) ...@@ -272,11 +272,6 @@ u8 *rtw_get_beacon_interval_from_ie(u8 *ie)
return ie + 8; return ie + 8;
} }
static struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv)
{
return _rtw_alloc_network(pmlmepriv);
}
int rtw_is_same_ibss(struct adapter *adapter, struct wlan_network *pnetwork) int rtw_is_same_ibss(struct adapter *adapter, struct wlan_network *pnetwork)
{ {
int ret = true; int ret = true;
......
...@@ -333,7 +333,7 @@ void rtw_dynamic_check_timer_handlder(struct timer_list *t); ...@@ -333,7 +333,7 @@ void rtw_dynamic_check_timer_handlder(struct timer_list *t);
void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv); void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv);
struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv); struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv);
int rtw_if_up(struct adapter *padapter); int rtw_if_up(struct adapter *padapter);
......
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