qtnfmac: do not report channel changes until wiphy is registered

Wireless device may send "channel changed" event before driver
registered this device with wireless core, which will result in
warnings.
Once device is registered, higher layer will query channel info
manually using .get_channel callback.

Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Igor Mitsyanko 2017-09-21 14:34:37 -07:00 коммит произвёл Kalle Valo
Родитель 6bfe61d697
Коммит 115af85123
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -368,6 +368,9 @@ qtnf_event_handle_freq_change(struct qtnf_wmac *mac,
return -EINVAL;
}
if (!wiphy->registered)
return 0;
qlink_chandef_q2cfg(wiphy, &data->chan, &chandef);
if (!cfg80211_chandef_valid(&chandef)) {