nl80211: Fix segfault when params->freq is NULL for AP mode start

If params->freq is NULL here, it leads to a segfault. Do not initialize
bss->bandwidth if params->freq is NULL.

Signed-off-by: Chaitanya T K <Chaitanya.Mgit@gmail.com>
This commit is contained in:
Chaitanya T K 2016-07-14 22:20:40 +05:30 committed by Jouni Malinen
parent 3388e7b96f
commit f5728d0a82

View file

@ -3706,7 +3706,7 @@ static int wpa_driver_nl80211_set_ap(void *priv,
"nl80211: Frequency set succeeded for ht2040 coex");
bss->bandwidth = params->freq->bandwidth;
}
} else if (!beacon_set) {
} else if (!beacon_set && params->freq) {
/*
* cfg80211 updates the driver on frequence change in AP
* mode only at the point when beaconing is started, so