aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-01-28 19:05:45 -0500
committerDavid S. Miller <davem@davemloft.net>2016-01-28 19:05:45 -0500
commitbd7c5e31552c06f1186606de8914a135e55f6bac (patch)
treea3d29b319537297a3023af1949b15cca2cc38824 /net
parentc731f0e3493cc9031a0aceea6a50c70beed23e6d (diff)
parent6736fde9672ff6717ac576e9bba2fd5f3dfec822 (diff)
Merge tag 'mac80211-for-davem-2016-01-26' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Johannes Berg says: ==================== Here's a first set of fixes for the 4.5-rc cycle: * make regulatory messages much less verbose by default * various remain-on-channel fixes * scheduled scanning fixes with hardware restart * a PS-Poll handling fix; was broken just recently * bugfix to avoid buffering non-bufferable MMPDUs * world regulatory domain data fix * a fix for scanning causing other work to get stuck * hwsim: revert an older problematic patch that caused some userspace tools to have issues - not that big a deal as it's a debug only driver though ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/ibss.c1
-rw-r--r--net/mac80211/main.c6
-rw-r--r--net/mac80211/mesh.c11
-rw-r--r--net/mac80211/mesh.h4
-rw-r--r--net/mac80211/mlme.c2
-rw-r--r--net/mac80211/offchannel.c16
-rw-r--r--net/mac80211/scan.c20
-rw-r--r--net/mac80211/sta_info.c2
-rw-r--r--net/mac80211/status.c5
-rw-r--r--net/mac80211/util.c16
-rw-r--r--net/rfkill/core.c16
-rw-r--r--net/wireless/reg.c45
12 files changed, 82 insertions, 62 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index f7fc0e00497f..978d3bc31df7 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -1733,7 +1733,6 @@ void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local)
1733 if (sdata->vif.type != NL80211_IFTYPE_ADHOC) 1733 if (sdata->vif.type != NL80211_IFTYPE_ADHOC)
1734 continue; 1734 continue;
1735 sdata->u.ibss.last_scan_completed = jiffies; 1735 sdata->u.ibss.last_scan_completed = jiffies;
1736 ieee80211_queue_work(&local->hw, &sdata->work);
1737 } 1736 }
1738 mutex_unlock(&local->iflist_mtx); 1737 mutex_unlock(&local->iflist_mtx);
1739} 1738}
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 6bcf0faa4a89..8190bf27ebff 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -248,6 +248,7 @@ static void ieee80211_restart_work(struct work_struct *work)
248 248
249 /* wait for scan work complete */ 249 /* wait for scan work complete */
250 flush_workqueue(local->workqueue); 250 flush_workqueue(local->workqueue);
251 flush_work(&local->sched_scan_stopped_work);
251 252
252 WARN(test_bit(SCAN_HW_SCANNING, &local->scanning), 253 WARN(test_bit(SCAN_HW_SCANNING, &local->scanning),
253 "%s called with hardware scan in progress\n", __func__); 254 "%s called with hardware scan in progress\n", __func__);
@@ -256,6 +257,11 @@ static void ieee80211_restart_work(struct work_struct *work)
256 list_for_each_entry(sdata, &local->interfaces, list) 257 list_for_each_entry(sdata, &local->interfaces, list)
257 flush_delayed_work(&sdata->dec_tailroom_needed_wk); 258 flush_delayed_work(&sdata->dec_tailroom_needed_wk);
258 ieee80211_scan_cancel(local); 259 ieee80211_scan_cancel(local);
260
261 /* make sure any new ROC will consider local->in_reconfig */
262 flush_delayed_work(&local->roc_work);
263 flush_work(&local->hw_roc_done);
264
259 ieee80211_reconfig(local); 265 ieee80211_reconfig(local);
260 rtnl_unlock(); 266 rtnl_unlock();
261} 267}
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index fa28500f28fd..6f85b6ab8e51 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -1370,17 +1370,6 @@ out:
1370 sdata_unlock(sdata); 1370 sdata_unlock(sdata);
1371} 1371}
1372 1372
1373void ieee80211_mesh_notify_scan_completed(struct ieee80211_local *local)
1374{
1375 struct ieee80211_sub_if_data *sdata;
1376
1377 rcu_read_lock();
1378 list_for_each_entry_rcu(sdata, &local->interfaces, list)
1379 if (ieee80211_vif_is_mesh(&sdata->vif) &&
1380 ieee80211_sdata_running(sdata))
1381 ieee80211_queue_work(&local->hw, &sdata->work);
1382 rcu_read_unlock();
1383}
1384 1373
1385void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata) 1374void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata)
1386{ 1375{
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
index a1596344c3ba..4a8019f79fb2 100644
--- a/net/mac80211/mesh.h
+++ b/net/mac80211/mesh.h
@@ -362,14 +362,10 @@ static inline bool mesh_path_sel_is_hwmp(struct ieee80211_sub_if_data *sdata)
362 return sdata->u.mesh.mesh_pp_id == IEEE80211_PATH_PROTOCOL_HWMP; 362 return sdata->u.mesh.mesh_pp_id == IEEE80211_PATH_PROTOCOL_HWMP;
363} 363}
364 364
365void ieee80211_mesh_notify_scan_completed(struct ieee80211_local *local);
366
367void mesh_path_flush_by_iface(struct ieee80211_sub_if_data *sdata); 365void mesh_path_flush_by_iface(struct ieee80211_sub_if_data *sdata);
368void mesh_sync_adjust_tbtt(struct ieee80211_sub_if_data *sdata); 366void mesh_sync_adjust_tbtt(struct ieee80211_sub_if_data *sdata);
369void ieee80211s_stop(void); 367void ieee80211s_stop(void);
370#else 368#else
371static inline void
372ieee80211_mesh_notify_scan_completed(struct ieee80211_local *local) {}
373static inline bool mesh_path_sel_is_hwmp(struct ieee80211_sub_if_data *sdata) 369static inline bool mesh_path_sel_is_hwmp(struct ieee80211_sub_if_data *sdata)
374{ return false; } 370{ return false; }
375static inline void mesh_path_flush_by_iface(struct ieee80211_sub_if_data *sdata) 371static inline void mesh_path_flush_by_iface(struct ieee80211_sub_if_data *sdata)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 1c342e2592c4..bfbb1acafdd1 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -4005,8 +4005,6 @@ static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata)
4005 if (!ieee80211_hw_check(&sdata->local->hw, CONNECTION_MONITOR)) 4005 if (!ieee80211_hw_check(&sdata->local->hw, CONNECTION_MONITOR))
4006 ieee80211_queue_work(&sdata->local->hw, 4006 ieee80211_queue_work(&sdata->local->hw,
4007 &sdata->u.mgd.monitor_work); 4007 &sdata->u.mgd.monitor_work);
4008 /* and do all the other regular work too */
4009 ieee80211_queue_work(&sdata->local->hw, &sdata->work);
4010 } 4008 }
4011} 4009}
4012 4010
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index 8b2f4eaac2ba..55a9c5b94ce1 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -252,14 +252,11 @@ static bool ieee80211_recalc_sw_work(struct ieee80211_local *local,
252static void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc, 252static void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc,
253 unsigned long start_time) 253 unsigned long start_time)
254{ 254{
255 struct ieee80211_local *local = roc->sdata->local;
256
257 if (WARN_ON(roc->notified)) 255 if (WARN_ON(roc->notified))
258 return; 256 return;
259 257
260 roc->start_time = start_time; 258 roc->start_time = start_time;
261 roc->started = true; 259 roc->started = true;
262 roc->hw_begun = true;
263 260
264 if (roc->mgmt_tx_cookie) { 261 if (roc->mgmt_tx_cookie) {
265 if (!WARN_ON(!roc->frame)) { 262 if (!WARN_ON(!roc->frame)) {
@@ -274,9 +271,6 @@ static void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc,
274 } 271 }
275 272
276 roc->notified = true; 273 roc->notified = true;
277
278 if (!local->ops->remain_on_channel)
279 ieee80211_recalc_sw_work(local, start_time);
280} 274}
281 275
282static void ieee80211_hw_roc_start(struct work_struct *work) 276static void ieee80211_hw_roc_start(struct work_struct *work)
@@ -291,6 +285,7 @@ static void ieee80211_hw_roc_start(struct work_struct *work)
291 if (!roc->started) 285 if (!roc->started)
292 break; 286 break;
293 287
288 roc->hw_begun = true;
294 ieee80211_handle_roc_started(roc, local->hw_roc_start_time); 289 ieee80211_handle_roc_started(roc, local->hw_roc_start_time);
295 } 290 }
296 291
@@ -413,6 +408,10 @@ void ieee80211_start_next_roc(struct ieee80211_local *local)
413 return; 408 return;
414 } 409 }
415 410
411 /* defer roc if driver is not started (i.e. during reconfig) */
412 if (local->in_reconfig)
413 return;
414
416 roc = list_first_entry(&local->roc_list, struct ieee80211_roc_work, 415 roc = list_first_entry(&local->roc_list, struct ieee80211_roc_work,
417 list); 416 list);
418 417
@@ -534,8 +533,10 @@ ieee80211_coalesce_hw_started_roc(struct ieee80211_local *local,
534 * begin, otherwise they'll both be marked properly by the work 533 * begin, otherwise they'll both be marked properly by the work
535 * struct that runs once the driver notifies us of the beginning 534 * struct that runs once the driver notifies us of the beginning
536 */ 535 */
537 if (cur_roc->hw_begun) 536 if (cur_roc->hw_begun) {
537 new_roc->hw_begun = true;
538 ieee80211_handle_roc_started(new_roc, now); 538 ieee80211_handle_roc_started(new_roc, now);
539 }
539 540
540 return true; 541 return true;
541} 542}
@@ -658,6 +659,7 @@ static int ieee80211_start_roc_work(struct ieee80211_local *local,
658 queued = true; 659 queued = true;
659 roc->on_channel = tmp->on_channel; 660 roc->on_channel = tmp->on_channel;
660 ieee80211_handle_roc_started(roc, now); 661 ieee80211_handle_roc_started(roc, now);
662 ieee80211_recalc_sw_work(local, now);
661 break; 663 break;
662 } 664 }
663 665
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index a413e52f7691..ae980ce8daff 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -314,6 +314,7 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted)
314 bool was_scanning = local->scanning; 314 bool was_scanning = local->scanning;
315 struct cfg80211_scan_request *scan_req; 315 struct cfg80211_scan_request *scan_req;
316 struct ieee80211_sub_if_data *scan_sdata; 316 struct ieee80211_sub_if_data *scan_sdata;
317 struct ieee80211_sub_if_data *sdata;
317 318
318 lockdep_assert_held(&local->mtx); 319 lockdep_assert_held(&local->mtx);
319 320
@@ -373,7 +374,16 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted)
373 374
374 ieee80211_mlme_notify_scan_completed(local); 375 ieee80211_mlme_notify_scan_completed(local);
375 ieee80211_ibss_notify_scan_completed(local); 376 ieee80211_ibss_notify_scan_completed(local);
376 ieee80211_mesh_notify_scan_completed(local); 377
378 /* Requeue all the work that might have been ignored while
379 * the scan was in progress; if there was none this will
380 * just be a no-op for the particular interface.
381 */
382 list_for_each_entry_rcu(sdata, &local->interfaces, list) {
383 if (ieee80211_sdata_running(sdata))
384 ieee80211_queue_work(&sdata->local->hw, &sdata->work);
385 }
386
377 if (was_scanning) 387 if (was_scanning)
378 ieee80211_start_next_roc(local); 388 ieee80211_start_next_roc(local);
379} 389}
@@ -1213,6 +1223,14 @@ void ieee80211_sched_scan_stopped(struct ieee80211_hw *hw)
1213 1223
1214 trace_api_sched_scan_stopped(local); 1224 trace_api_sched_scan_stopped(local);
1215 1225
1226 /*
1227 * this shouldn't really happen, so for simplicity
1228 * simply ignore it, and let mac80211 reconfigure
1229 * the sched scan later on.
1230 */
1231 if (local->in_reconfig)
1232 return;
1233
1216 schedule_work(&local->sched_scan_stopped_work); 1234 schedule_work(&local->sched_scan_stopped_work);
1217} 1235}
1218EXPORT_SYMBOL(ieee80211_sched_scan_stopped); 1236EXPORT_SYMBOL(ieee80211_sched_scan_stopped);
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 4402ad5b27d1..a4a4f89d3ba0 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -1453,7 +1453,7 @@ ieee80211_sta_ps_deliver_response(struct sta_info *sta,
1453 1453
1454 more_data = ieee80211_sta_ps_more_data(sta, ignored_acs, reason, driver_release_tids); 1454 more_data = ieee80211_sta_ps_more_data(sta, ignored_acs, reason, driver_release_tids);
1455 1455
1456 if (reason == IEEE80211_FRAME_RELEASE_PSPOLL) 1456 if (driver_release_tids && reason == IEEE80211_FRAME_RELEASE_PSPOLL)
1457 driver_release_tids = 1457 driver_release_tids =
1458 BIT(find_highest_prio_tid(driver_release_tids)); 1458 BIT(find_highest_prio_tid(driver_release_tids));
1459 1459
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 5bad05e9af90..6101deb805a8 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -51,6 +51,11 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local,
51 struct ieee80211_hdr *hdr = (void *)skb->data; 51 struct ieee80211_hdr *hdr = (void *)skb->data;
52 int ac; 52 int ac;
53 53
54 if (info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER) {
55 ieee80211_free_txskb(&local->hw, skb);
56 return;
57 }
58
54 /* 59 /*
55 * This skb 'survived' a round-trip through the driver, and 60 * This skb 'survived' a round-trip through the driver, and
56 * hopefully the driver didn't mangle it too badly. However, 61 * hopefully the driver didn't mangle it too badly. However,
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 3943d4bf289c..58f58bd5202f 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -2043,16 +2043,26 @@ int ieee80211_reconfig(struct ieee80211_local *local)
2043 */ 2043 */
2044 if (sched_scan_req->n_scan_plans > 1 || 2044 if (sched_scan_req->n_scan_plans > 1 ||
2045 __ieee80211_request_sched_scan_start(sched_scan_sdata, 2045 __ieee80211_request_sched_scan_start(sched_scan_sdata,
2046 sched_scan_req)) 2046 sched_scan_req)) {
2047 RCU_INIT_POINTER(local->sched_scan_sdata, NULL);
2048 RCU_INIT_POINTER(local->sched_scan_req, NULL);
2047 sched_scan_stopped = true; 2049 sched_scan_stopped = true;
2050 }
2048 mutex_unlock(&local->mtx); 2051 mutex_unlock(&local->mtx);
2049 2052
2050 if (sched_scan_stopped) 2053 if (sched_scan_stopped)
2051 cfg80211_sched_scan_stopped_rtnl(local->hw.wiphy); 2054 cfg80211_sched_scan_stopped_rtnl(local->hw.wiphy);
2052 2055
2053 wake_up: 2056 wake_up:
2054 local->in_reconfig = false; 2057 if (local->in_reconfig) {
2055 barrier(); 2058 local->in_reconfig = false;
2059 barrier();
2060
2061 /* Restart deferred ROCs */
2062 mutex_lock(&local->mtx);
2063 ieee80211_start_next_roc(local);
2064 mutex_unlock(&local->mtx);
2065 }
2056 2066
2057 if (local->monitors == local->open_count && local->monitors > 0) 2067 if (local->monitors == local->open_count && local->monitors > 0)
2058 ieee80211_add_virtual_monitor(local); 2068 ieee80211_add_virtual_monitor(local);
diff --git a/net/rfkill/core.c b/net/rfkill/core.c
index f53bf3b6558b..cf5b69ab1829 100644
--- a/net/rfkill/core.c
+++ b/net/rfkill/core.c
@@ -1095,17 +1095,6 @@ static unsigned int rfkill_fop_poll(struct file *file, poll_table *wait)
1095 return res; 1095 return res;
1096} 1096}
1097 1097
1098static bool rfkill_readable(struct rfkill_data *data)
1099{
1100 bool r;
1101
1102 mutex_lock(&data->mtx);
1103 r = !list_empty(&data->events);
1104 mutex_unlock(&data->mtx);
1105
1106 return r;
1107}
1108
1109static ssize_t rfkill_fop_read(struct file *file, char __user *buf, 1098static ssize_t rfkill_fop_read(struct file *file, char __user *buf,
1110 size_t count, loff_t *pos) 1099 size_t count, loff_t *pos)
1111{ 1100{
@@ -1122,8 +1111,11 @@ static ssize_t rfkill_fop_read(struct file *file, char __user *buf,
1122 goto out; 1111 goto out;
1123 } 1112 }
1124 mutex_unlock(&data->mtx); 1113 mutex_unlock(&data->mtx);
1114 /* since we re-check and it just compares pointers,
1115 * using !list_empty() without locking isn't a problem
1116 */
1125 ret = wait_event_interruptible(data->read_wait, 1117 ret = wait_event_interruptible(data->read_wait,
1126 rfkill_readable(data)); 1118 !list_empty(&data->events));
1127 mutex_lock(&data->mtx); 1119 mutex_lock(&data->mtx);
1128 1120
1129 if (ret) 1121 if (ret)
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 3b0ce1c484a3..547ceecc0523 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -231,20 +231,22 @@ static const struct ieee80211_regdomain world_regdom = {
231 /* IEEE 802.11b/g, channels 1..11 */ 231 /* IEEE 802.11b/g, channels 1..11 */
232 REG_RULE(2412-10, 2462+10, 40, 6, 20, 0), 232 REG_RULE(2412-10, 2462+10, 40, 6, 20, 0),
233 /* IEEE 802.11b/g, channels 12..13. */ 233 /* IEEE 802.11b/g, channels 12..13. */
234 REG_RULE(2467-10, 2472+10, 40, 6, 20, 234 REG_RULE(2467-10, 2472+10, 20, 6, 20,
235 NL80211_RRF_NO_IR), 235 NL80211_RRF_NO_IR | NL80211_RRF_AUTO_BW),
236 /* IEEE 802.11 channel 14 - Only JP enables 236 /* IEEE 802.11 channel 14 - Only JP enables
237 * this and for 802.11b only */ 237 * this and for 802.11b only */
238 REG_RULE(2484-10, 2484+10, 20, 6, 20, 238 REG_RULE(2484-10, 2484+10, 20, 6, 20,
239 NL80211_RRF_NO_IR | 239 NL80211_RRF_NO_IR |
240 NL80211_RRF_NO_OFDM), 240 NL80211_RRF_NO_OFDM),
241 /* IEEE 802.11a, channel 36..48 */ 241 /* IEEE 802.11a, channel 36..48 */
242 REG_RULE(5180-10, 5240+10, 160, 6, 20, 242 REG_RULE(5180-10, 5240+10, 80, 6, 20,
243 NL80211_RRF_NO_IR), 243 NL80211_RRF_NO_IR |
244 NL80211_RRF_AUTO_BW),
244 245
245 /* IEEE 802.11a, channel 52..64 - DFS required */ 246 /* IEEE 802.11a, channel 52..64 - DFS required */
246 REG_RULE(5260-10, 5320+10, 160, 6, 20, 247 REG_RULE(5260-10, 5320+10, 80, 6, 20,
247 NL80211_RRF_NO_IR | 248 NL80211_RRF_NO_IR |
249 NL80211_RRF_AUTO_BW |
248 NL80211_RRF_DFS), 250 NL80211_RRF_DFS),
249 251
250 /* IEEE 802.11a, channel 100..144 - DFS required */ 252 /* IEEE 802.11a, channel 100..144 - DFS required */
@@ -2745,7 +2747,7 @@ static void print_rd_rules(const struct ieee80211_regdomain *rd)
2745 const struct ieee80211_power_rule *power_rule = NULL; 2747 const struct ieee80211_power_rule *power_rule = NULL;
2746 char bw[32], cac_time[32]; 2748 char bw[32], cac_time[32];
2747 2749
2748 pr_info(" (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)\n"); 2750 pr_debug(" (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)\n");
2749 2751
2750 for (i = 0; i < rd->n_reg_rules; i++) { 2752 for (i = 0; i < rd->n_reg_rules; i++) {
2751 reg_rule = &rd->reg_rules[i]; 2753 reg_rule = &rd->reg_rules[i];
@@ -2772,7 +2774,7 @@ static void print_rd_rules(const struct ieee80211_regdomain *rd)
2772 * in certain regions 2774 * in certain regions
2773 */ 2775 */
2774 if (power_rule->max_antenna_gain) 2776 if (power_rule->max_antenna_gain)
2775 pr_info(" (%d KHz - %d KHz @ %s), (%d mBi, %d mBm), (%s)\n", 2777 pr_debug(" (%d KHz - %d KHz @ %s), (%d mBi, %d mBm), (%s)\n",
2776 freq_range->start_freq_khz, 2778 freq_range->start_freq_khz,
2777 freq_range->end_freq_khz, 2779 freq_range->end_freq_khz,
2778 bw, 2780 bw,
@@ -2780,7 +2782,7 @@ static void print_rd_rules(const struct ieee80211_regdomain *rd)
2780 power_rule->max_eirp, 2782 power_rule->max_eirp,
2781 cac_time); 2783 cac_time);
2782 else 2784 else
2783 pr_info(" (%d KHz - %d KHz @ %s), (N/A, %d mBm), (%s)\n", 2785 pr_debug(" (%d KHz - %d KHz @ %s), (N/A, %d mBm), (%s)\n",
2784 freq_range->start_freq_khz, 2786 freq_range->start_freq_khz,
2785 freq_range->end_freq_khz, 2787 freq_range->end_freq_khz,
2786 bw, 2788 bw,
@@ -2813,35 +2815,35 @@ static void print_regdomain(const struct ieee80211_regdomain *rd)
2813 struct cfg80211_registered_device *rdev; 2815 struct cfg80211_registered_device *rdev;
2814 rdev = cfg80211_rdev_by_wiphy_idx(lr->wiphy_idx); 2816 rdev = cfg80211_rdev_by_wiphy_idx(lr->wiphy_idx);
2815 if (rdev) { 2817 if (rdev) {
2816 pr_info("Current regulatory domain updated by AP to: %c%c\n", 2818 pr_debug("Current regulatory domain updated by AP to: %c%c\n",
2817 rdev->country_ie_alpha2[0], 2819 rdev->country_ie_alpha2[0],
2818 rdev->country_ie_alpha2[1]); 2820 rdev->country_ie_alpha2[1]);
2819 } else 2821 } else
2820 pr_info("Current regulatory domain intersected:\n"); 2822 pr_debug("Current regulatory domain intersected:\n");
2821 } else 2823 } else
2822 pr_info("Current regulatory domain intersected:\n"); 2824 pr_debug("Current regulatory domain intersected:\n");
2823 } else if (is_world_regdom(rd->alpha2)) { 2825 } else if (is_world_regdom(rd->alpha2)) {
2824 pr_info("World regulatory domain updated:\n"); 2826 pr_debug("World regulatory domain updated:\n");
2825 } else { 2827 } else {
2826 if (is_unknown_alpha2(rd->alpha2)) 2828 if (is_unknown_alpha2(rd->alpha2))
2827 pr_info("Regulatory domain changed to driver built-in settings (unknown country)\n"); 2829 pr_debug("Regulatory domain changed to driver built-in settings (unknown country)\n");
2828 else { 2830 else {
2829 if (reg_request_cell_base(lr)) 2831 if (reg_request_cell_base(lr))
2830 pr_info("Regulatory domain changed to country: %c%c by Cell Station\n", 2832 pr_debug("Regulatory domain changed to country: %c%c by Cell Station\n",
2831 rd->alpha2[0], rd->alpha2[1]); 2833 rd->alpha2[0], rd->alpha2[1]);
2832 else 2834 else
2833 pr_info("Regulatory domain changed to country: %c%c\n", 2835 pr_debug("Regulatory domain changed to country: %c%c\n",
2834 rd->alpha2[0], rd->alpha2[1]); 2836 rd->alpha2[0], rd->alpha2[1]);
2835 } 2837 }
2836 } 2838 }
2837 2839
2838 pr_info(" DFS Master region: %s", reg_dfs_region_str(rd->dfs_region)); 2840 pr_debug(" DFS Master region: %s", reg_dfs_region_str(rd->dfs_region));
2839 print_rd_rules(rd); 2841 print_rd_rules(rd);
2840} 2842}
2841 2843
2842static void print_regdomain_info(const struct ieee80211_regdomain *rd) 2844static void print_regdomain_info(const struct ieee80211_regdomain *rd)
2843{ 2845{
2844 pr_info("Regulatory domain: %c%c\n", rd->alpha2[0], rd->alpha2[1]); 2846 pr_debug("Regulatory domain: %c%c\n", rd->alpha2[0], rd->alpha2[1]);
2845 print_rd_rules(rd); 2847 print_rd_rules(rd);
2846} 2848}
2847 2849
@@ -2862,7 +2864,8 @@ static int reg_set_rd_user(const struct ieee80211_regdomain *rd,
2862 return -EALREADY; 2864 return -EALREADY;
2863 2865
2864 if (!is_valid_rd(rd)) { 2866 if (!is_valid_rd(rd)) {
2865 pr_err("Invalid regulatory domain detected:\n"); 2867 pr_err("Invalid regulatory domain detected: %c%c\n",
2868 rd->alpha2[0], rd->alpha2[1]);
2866 print_regdomain_info(rd); 2869 print_regdomain_info(rd);
2867 return -EINVAL; 2870 return -EINVAL;
2868 } 2871 }
@@ -2898,7 +2901,8 @@ static int reg_set_rd_driver(const struct ieee80211_regdomain *rd,
2898 return -EALREADY; 2901 return -EALREADY;
2899 2902
2900 if (!is_valid_rd(rd)) { 2903 if (!is_valid_rd(rd)) {
2901 pr_err("Invalid regulatory domain detected:\n"); 2904 pr_err("Invalid regulatory domain detected: %c%c\n",
2905 rd->alpha2[0], rd->alpha2[1]);
2902 print_regdomain_info(rd); 2906 print_regdomain_info(rd);
2903 return -EINVAL; 2907 return -EINVAL;
2904 } 2908 }
@@ -2956,7 +2960,8 @@ static int reg_set_rd_country_ie(const struct ieee80211_regdomain *rd,
2956 */ 2960 */
2957 2961
2958 if (!is_valid_rd(rd)) { 2962 if (!is_valid_rd(rd)) {
2959 pr_err("Invalid regulatory domain detected:\n"); 2963 pr_err("Invalid regulatory domain detected: %c%c\n",
2964 rd->alpha2[0], rd->alpha2[1]);
2960 print_regdomain_info(rd); 2965 print_regdomain_info(rd);
2961 return -EINVAL; 2966 return -EINVAL;
2962 } 2967 }