brcmsmac: allocate ucode with GFP_KERNEL
authorTakashi Iwai <tiwai@suse.de>
Fri, 16 Mar 2018 15:41:49 +0000 (16:41 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 27 Mar 2018 09:09:05 +0000 (12:09 +0300)
commitb1c2d0f2507bf56d9f4dbd46dc4b99240fbd187c
treeaedcc76006868738bc387d271b4ce19d65a00cf8
parent48eaee3f272a5bfe6986d07c51f6975d3c2f74d1
brcmsmac: allocate ucode with GFP_KERNEL

The brcms_ucode_init_buf() duplicates the ucode chunks via kmemdup()
with GFP_ATOMIC as a precondition of wl->lock acquired.  This caused
allocation failures sometimes as reported in the bugzilla below.

When looking at the the real usage, one can find that it's called
solely from brcms_request_fw(), and it's obviously outside the lock.
Hence we can use GFP_KERNEL there safely for avoiding such allocation
errors.

Bugzilla: http://bugzilla.suse.com/show_bug.cgi?id=1085174
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c