From b1c5d8f7c308633dbfcf19c5928acb1489b84ac9 Mon Sep 17 00:00:00 2001 From: Kevin Lo Date: Wed, 22 Oct 2014 03:32:27 +0000 Subject: [PATCH] Fix the kernel panic in hostap mode. rvp->beacon_mbuf was NULL in run_update_beacon(). PR: 189405 Submitted by: Gabor Simon MFC after: 3 days --- sys/dev/usb/wlan/if_run.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/usb/wlan/if_run.c b/sys/dev/usb/wlan/if_run.c index 1451225353b1..d27f33ae6376 100644 --- a/sys/dev/usb/wlan/if_run.c +++ b/sys/dev/usb/wlan/if_run.c @@ -4913,6 +4913,12 @@ run_update_beacon(struct ieee80211vap *vap, int item) } setbit(rvp->bo.bo_flags, item); + if (rvp->beacon_mbuf == NULL) { + rvp->beacon_mbuf = ieee80211_beacon_alloc(vap->iv_bss, + &rvp->bo); + if (rvp->beacon_mbuf == NULL) + return; + } ieee80211_beacon_update(vap->iv_bss, &rvp->bo, rvp->beacon_mbuf, mcast); i = RUN_CMDQ_GET(&sc->cmdq_store);