mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
prima: prevent crash on selecting only 2.4GHz bands
Signed-off-by: Iliyan Malchev <malchev@google.com>
This commit is contained in:
parent
a151b3268a
commit
8365076f1e
1 changed files with 7 additions and 0 deletions
|
@ -2395,6 +2395,10 @@ int wlan_hdd_crda_reg_notifier(struct wiphy *wiphy,
|
||||||
}
|
}
|
||||||
/* Haven't seen any condition that will set by driver after init.
|
/* Haven't seen any condition that will set by driver after init.
|
||||||
If we do, then we should also call sme_ChangeCountryCode */
|
If we do, then we should also call sme_ChangeCountryCode */
|
||||||
|
|
||||||
|
if (!wiphy->bands[IEEE80211_BAND_5GHZ])
|
||||||
|
goto check_initiator;
|
||||||
|
|
||||||
for (j=0; j<wiphy->bands[IEEE80211_BAND_5GHZ ]->n_channels; j++)
|
for (j=0; j<wiphy->bands[IEEE80211_BAND_5GHZ ]->n_channels; j++)
|
||||||
{
|
{
|
||||||
// p2p UNII-1 band channels are passive when domain is FCC.
|
// p2p UNII-1 band channels are passive when domain is FCC.
|
||||||
|
@ -2415,6 +2419,9 @@ int wlan_hdd_crda_reg_notifier(struct wiphy *wiphy,
|
||||||
wiphy->bands[IEEE80211_BAND_5GHZ ]->channels[j].flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
|
wiphy->bands[IEEE80211_BAND_5GHZ ]->channels[j].flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_initiator:
|
||||||
|
|
||||||
if (request->initiator == NL80211_REGDOM_SET_BY_CORE)
|
if (request->initiator == NL80211_REGDOM_SET_BY_CORE)
|
||||||
{
|
{
|
||||||
request->processed = 1;
|
request->processed = 1;
|
||||||
|
|
Loading…
Reference in a new issue