summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl1251/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/wl1251/main.c')
-rw-r--r--drivers/net/wireless/wl1251/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c
index 012e1a4016fe..40372bac9482 100644
--- a/drivers/net/wireless/wl1251/main.c
+++ b/drivers/net/wireless/wl1251/main.c
@@ -1039,6 +1039,9 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw,
if (changed & BSS_CHANGED_BEACON) {
beacon = ieee80211_beacon_get(hw, vif);
+ if (!beacon)
+ goto out_sleep;
+
ret = wl1251_cmd_template_set(wl, CMD_BEACON, beacon->data,
beacon->len);