mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 17:41:44 +00:00
staging: rtl8723au: add GFP argument to rtw_alloc_network()
This allows us to use GFP_KERNEL when calling from a work handler. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5290cd688e
commit
ec838b0bc9
@ -1523,7 +1523,7 @@ void rtw_createbss_cmd23a_callback(struct rtw_adapter *padapter,
|
|||||||
rtw_indicate_connect23a(padapter);
|
rtw_indicate_connect23a(padapter);
|
||||||
spin_unlock_bh(&pmlmepriv->lock);
|
spin_unlock_bh(&pmlmepriv->lock);
|
||||||
} else {
|
} else {
|
||||||
pwlan = rtw_alloc_network(pmlmepriv);
|
pwlan = rtw_alloc_network(pmlmepriv, GFP_KERNEL);
|
||||||
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||||
if (!pwlan) {
|
if (!pwlan) {
|
||||||
pwlan = rtw_get_oldest_wlan_network23a(&pmlmepriv->scanned_queue);
|
pwlan = rtw_get_oldest_wlan_network23a(&pmlmepriv->scanned_queue);
|
||||||
|
@ -127,11 +127,11 @@ void rtw_free_mlme_priv23a(struct mlme_priv *pmlmepriv)
|
|||||||
rtw23a_free_mlme_priv_ie_data(pmlmepriv);
|
rtw23a_free_mlme_priv_ie_data(pmlmepriv);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv)
|
struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv, int gfp)
|
||||||
{
|
{
|
||||||
struct wlan_network *pnetwork;
|
struct wlan_network *pnetwork;
|
||||||
|
|
||||||
pnetwork = kzalloc(sizeof(struct wlan_network), GFP_ATOMIC);
|
pnetwork = kzalloc(sizeof(struct wlan_network), gfp);
|
||||||
if (pnetwork) {
|
if (pnetwork) {
|
||||||
INIT_LIST_HEAD(&pnetwork->list);
|
INIT_LIST_HEAD(&pnetwork->list);
|
||||||
pnetwork->network_type = 0;
|
pnetwork->network_type = 0;
|
||||||
@ -514,7 +514,7 @@ void rtw_update_scanned_network23a(struct rtw_adapter *adapter,
|
|||||||
/* If we didn't find a match, then get a new network slot to initialize
|
/* If we didn't find a match, then get a new network slot to initialize
|
||||||
* with this beacon's information */
|
* with this beacon's information */
|
||||||
if (!found) {
|
if (!found) {
|
||||||
pnetwork = rtw_alloc_network(pmlmepriv);
|
pnetwork = rtw_alloc_network(pmlmepriv, GFP_ATOMIC);
|
||||||
if (!pnetwork) {
|
if (!pnetwork) {
|
||||||
if (!oldest) {
|
if (!oldest) {
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
|
||||||
|
@ -454,7 +454,7 @@ void rtw23a_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv);
|
|||||||
|
|
||||||
void _rtw_free_mlme_priv23a(struct mlme_priv *pmlmepriv);
|
void _rtw_free_mlme_priv23a(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 gfp);
|
||||||
|
|
||||||
int rtw_if_up23a(struct rtw_adapter *padapter);
|
int rtw_if_up23a(struct rtw_adapter *padapter);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user