diff options
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/reg.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 3a734949769d..974b127aea66 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -1134,7 +1134,8 @@ static bool reg_is_world_roaming(struct wiphy *wiphy) | |||
1134 | if (is_world_regdom(cfg80211_regdomain->alpha2) || | 1134 | if (is_world_regdom(cfg80211_regdomain->alpha2) || |
1135 | (wiphy->regd && is_world_regdom(wiphy->regd->alpha2))) | 1135 | (wiphy->regd && is_world_regdom(wiphy->regd->alpha2))) |
1136 | return true; | 1136 | return true; |
1137 | if (last_request->initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE && | 1137 | if (last_request && |
1138 | last_request->initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE && | ||
1138 | wiphy->custom_regulatory) | 1139 | wiphy->custom_regulatory) |
1139 | return true; | 1140 | return true; |
1140 | return false; | 1141 | return false; |
@@ -1143,6 +1144,12 @@ static bool reg_is_world_roaming(struct wiphy *wiphy) | |||
1143 | /* Reap the advantages of previously found beacons */ | 1144 | /* Reap the advantages of previously found beacons */ |
1144 | static void reg_process_beacons(struct wiphy *wiphy) | 1145 | static void reg_process_beacons(struct wiphy *wiphy) |
1145 | { | 1146 | { |
1147 | /* | ||
1148 | * Means we are just firing up cfg80211, so no beacons would | ||
1149 | * have been processed yet. | ||
1150 | */ | ||
1151 | if (!last_request) | ||
1152 | return; | ||
1146 | if (!reg_is_world_roaming(wiphy)) | 1153 | if (!reg_is_world_roaming(wiphy)) |
1147 | return; | 1154 | return; |
1148 | wiphy_update_beacon_reg(wiphy); | 1155 | wiphy_update_beacon_reg(wiphy); |