aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorKarl Beldan <karl.beldan@rivierawaves.com>2013-03-25 11:26:57 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-03-25 14:19:35 -0400
commit675a0b049abf6edf30f8dd84c5610b6edc2296c8 (patch)
tree164178c576642dc1ec8ae70d9e26a5ec33472d26 /net/mac80211
parent219c38674c262378ec411dd8318ebfd199fbce8d (diff)
mac80211: Use a cfg80211_chan_def in ieee80211_hw_conf_chan
Drivers that don't use chanctxes cannot perform VHT association because they still use a "backward compatibility" pair of {ieee80211_channel, nl80211_channel_type} in ieee80211_conf and ieee80211_local. Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com> [fix kernel-doc] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/cfg.c7
-rw-r--r--net/mac80211/chan.c11
-rw-r--r--net/mac80211/ieee80211_i.h3
-rw-r--r--net/mac80211/main.c59
-rw-r--r--net/mac80211/mlme.c24
-rw-r--r--net/mac80211/scan.c6
-rw-r--r--net/mac80211/trace.h37
-rw-r--r--net/mac80211/tx.c4
-rw-r--r--net/mac80211/util.c3
9 files changed, 83 insertions, 71 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 50aaf25d4735..6e43feb49a76 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -805,8 +805,7 @@ static int ieee80211_set_monitor_channel(struct wiphy *wiphy,
805 IEEE80211_CHANCTX_EXCLUSIVE); 805 IEEE80211_CHANCTX_EXCLUSIVE);
806 } 806 }
807 } else if (local->open_count == local->monitors) { 807 } else if (local->open_count == local->monitors) {
808 local->_oper_channel = chandef->chan; 808 local->_oper_chandef = *chandef;
809 local->_oper_channel_type = cfg80211_get_chandef_type(chandef);
810 ieee80211_hw_config(local, 0); 809 ieee80211_hw_config(local, 0);
811 } 810 }
812 811
@@ -3373,9 +3372,7 @@ static int ieee80211_cfg_get_channel(struct wiphy *wiphy,
3373 if (local->use_chanctx) 3372 if (local->use_chanctx)
3374 *chandef = local->monitor_chandef; 3373 *chandef = local->monitor_chandef;
3375 else 3374 else
3376 cfg80211_chandef_create(chandef, 3375 *chandef = local->_oper_chandef;
3377 local->_oper_channel,
3378 local->_oper_channel_type);
3379 ret = 0; 3376 ret = 0;
3380 } 3377 }
3381 rcu_read_unlock(); 3378 rcu_read_unlock();
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index 78c0d90dd641..8024874ba95d 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -22,7 +22,7 @@ static void ieee80211_change_chanctx(struct ieee80211_local *local,
22 drv_change_chanctx(local, ctx, IEEE80211_CHANCTX_CHANGE_WIDTH); 22 drv_change_chanctx(local, ctx, IEEE80211_CHANCTX_CHANGE_WIDTH);
23 23
24 if (!local->use_chanctx) { 24 if (!local->use_chanctx) {
25 local->_oper_channel_type = cfg80211_get_chandef_type(chandef); 25 local->_oper_chandef = *chandef;
26 ieee80211_hw_config(local, 0); 26 ieee80211_hw_config(local, 0);
27 } 27 }
28} 28}
@@ -77,9 +77,7 @@ ieee80211_new_chanctx(struct ieee80211_local *local,
77 ctx->mode = mode; 77 ctx->mode = mode;
78 78
79 if (!local->use_chanctx) { 79 if (!local->use_chanctx) {
80 local->_oper_channel_type = 80 local->_oper_chandef = *chandef;
81 cfg80211_get_chandef_type(chandef);
82 local->_oper_channel = chandef->chan;
83 ieee80211_hw_config(local, 0); 81 ieee80211_hw_config(local, 0);
84 } else { 82 } else {
85 err = drv_add_chanctx(local, ctx); 83 err = drv_add_chanctx(local, ctx);
@@ -106,7 +104,10 @@ static void ieee80211_free_chanctx(struct ieee80211_local *local,
106 WARN_ON_ONCE(ctx->refcount != 0); 104 WARN_ON_ONCE(ctx->refcount != 0);
107 105
108 if (!local->use_chanctx) { 106 if (!local->use_chanctx) {
109 local->_oper_channel_type = NL80211_CHAN_NO_HT; 107 struct cfg80211_chan_def *chandef = &local->_oper_chandef;
108 chandef->width = NL80211_CHAN_WIDTH_20_NOHT;
109 chandef->center_freq1 = chandef->chan->center_freq;
110 chandef->center_freq2 = 0;
110 ieee80211_hw_config(local, 0); 111 ieee80211_hw_config(local, 0);
111 } else { 112 } else {
112 drv_remove_chanctx(local, ctx); 113 drv_remove_chanctx(local, ctx);
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index c7f8b8b29e58..f9782f0f4348 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1021,8 +1021,7 @@ struct ieee80211_local {
1021 struct ieee80211_sub_if_data __rcu *scan_sdata; 1021 struct ieee80211_sub_if_data __rcu *scan_sdata;
1022 struct ieee80211_channel *csa_channel; 1022 struct ieee80211_channel *csa_channel;
1023 /* For backward compatibility only -- do not use */ 1023 /* For backward compatibility only -- do not use */
1024 struct ieee80211_channel *_oper_channel; 1024 struct cfg80211_chan_def _oper_chandef;
1025 enum nl80211_channel_type _oper_channel_type;
1026 1025
1027 /* Temporary remain-on-channel for off-channel operations */ 1026 /* Temporary remain-on-channel for off-channel operations */
1028 struct ieee80211_channel *tmp_channel; 1027 struct ieee80211_channel *tmp_channel;
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index b0d286821864..a16b037c9d34 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -95,42 +95,47 @@ static void ieee80211_reconfig_filter(struct work_struct *work)
95static u32 ieee80211_hw_conf_chan(struct ieee80211_local *local) 95static u32 ieee80211_hw_conf_chan(struct ieee80211_local *local)
96{ 96{
97 struct ieee80211_sub_if_data *sdata; 97 struct ieee80211_sub_if_data *sdata;
98 struct ieee80211_channel *chan; 98 struct cfg80211_chan_def chandef = {};
99 u32 changed = 0; 99 u32 changed = 0;
100 int power; 100 int power;
101 enum nl80211_channel_type channel_type;
102 u32 offchannel_flag; 101 u32 offchannel_flag;
103 102
104 offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL; 103 offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL;
104
105 if (local->scan_channel) { 105 if (local->scan_channel) {
106 chan = local->scan_channel; 106 chandef.chan = local->scan_channel;
107 /* If scanning on oper channel, use whatever channel-type 107 /* If scanning on oper channel, use whatever channel-type
108 * is currently in use. 108 * is currently in use.
109 */ 109 */
110 if (chan == local->_oper_channel) 110 if (chandef.chan == local->_oper_chandef.chan) {
111 channel_type = local->_oper_channel_type; 111 chandef = local->_oper_chandef;
112 else 112 } else {
113 channel_type = NL80211_CHAN_NO_HT; 113 chandef.width = NL80211_CHAN_WIDTH_20_NOHT;
114 chandef.center_freq1 = chandef.chan->center_freq;
115 }
114 } else if (local->tmp_channel) { 116 } else if (local->tmp_channel) {
115 chan = local->tmp_channel; 117 chandef.chan = local->tmp_channel;
116 channel_type = NL80211_CHAN_NO_HT; 118 chandef.width = NL80211_CHAN_WIDTH_20_NOHT;
117 } else { 119 chandef.center_freq1 = chandef.chan->center_freq;
118 chan = local->_oper_channel; 120 } else
119 channel_type = local->_oper_channel_type; 121 chandef = local->_oper_chandef;
120 } 122
121 123 WARN(!cfg80211_chandef_valid(&chandef),
122 if (chan != local->_oper_channel || 124 "control:%d MHz width:%d center: %d/%d MHz",
123 channel_type != local->_oper_channel_type) 125 chandef.chan->center_freq, chandef.width,
126 chandef.center_freq1, chandef.center_freq2);
127
128 if (!cfg80211_chandef_identical(&chandef, &local->_oper_chandef))
124 local->hw.conf.flags |= IEEE80211_CONF_OFFCHANNEL; 129 local->hw.conf.flags |= IEEE80211_CONF_OFFCHANNEL;
125 else 130 else
126 local->hw.conf.flags &= ~IEEE80211_CONF_OFFCHANNEL; 131 local->hw.conf.flags &= ~IEEE80211_CONF_OFFCHANNEL;
127 132
128 offchannel_flag ^= local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL; 133 offchannel_flag ^= local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL;
129 134
130 if (offchannel_flag || chan != local->hw.conf.channel || 135 if (offchannel_flag ||
131 channel_type != local->hw.conf.channel_type) { 136 !cfg80211_chandef_identical(&local->hw.conf.chandef,
132 local->hw.conf.channel = chan; 137 &local->_oper_chandef)) {
133 local->hw.conf.channel_type = channel_type; 138 local->hw.conf.chandef = chandef;
134 changed |= IEEE80211_CONF_CHANGE_CHANNEL; 139 changed |= IEEE80211_CONF_CHANGE_CHANNEL;
135 } 140 }
136 141
@@ -146,7 +151,7 @@ static u32 ieee80211_hw_conf_chan(struct ieee80211_local *local)
146 changed |= IEEE80211_CONF_CHANGE_SMPS; 151 changed |= IEEE80211_CONF_CHANGE_SMPS;
147 } 152 }
148 153
149 power = chan->max_power; 154 power = chandef.chan->max_power;
150 155
151 rcu_read_lock(); 156 rcu_read_lock();
152 list_for_each_entry_rcu(sdata, &local->interfaces, list) { 157 list_for_each_entry_rcu(sdata, &local->interfaces, list) {
@@ -740,11 +745,15 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
740 sband = local->hw.wiphy->bands[band]; 745 sband = local->hw.wiphy->bands[band];
741 if (!sband) 746 if (!sband)
742 continue; 747 continue;
743 if (!local->use_chanctx && !local->_oper_channel) { 748 if (!local->use_chanctx && !local->_oper_chandef.chan) {
744 /* init channel we're on */ 749 /* init channel we're on */
745 local->hw.conf.channel = 750 struct cfg80211_chan_def chandef = {
746 local->_oper_channel = &sband->channels[0]; 751 .chan = &sband->channels[0],
747 local->hw.conf.channel_type = NL80211_CHAN_NO_HT; 752 .width = NL80211_CHAN_NO_HT,
753 .center_freq1 = sband->channels[0].center_freq,
754 .center_freq2 = 0
755 };
756 local->hw.conf.chandef = local->_oper_chandef = chandef;
748 } 757 }
749 cfg80211_chandef_create(&local->monitor_chandef, 758 cfg80211_chandef_create(&local->monitor_chandef,
750 &sband->channels[0], 759 &sband->channels[0],
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 9958cb7df8f1..237e2ef42ba9 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -988,6 +988,7 @@ static void ieee80211_chswitch_work(struct work_struct *work)
988{ 988{
989 struct ieee80211_sub_if_data *sdata = 989 struct ieee80211_sub_if_data *sdata =
990 container_of(work, struct ieee80211_sub_if_data, u.mgd.chswitch_work); 990 container_of(work, struct ieee80211_sub_if_data, u.mgd.chswitch_work);
991 struct ieee80211_local *local = sdata->local;
991 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; 992 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
992 993
993 if (!ieee80211_sdata_running(sdata)) 994 if (!ieee80211_sdata_running(sdata))
@@ -997,21 +998,30 @@ static void ieee80211_chswitch_work(struct work_struct *work)
997 if (!ifmgd->associated) 998 if (!ifmgd->associated)
998 goto out; 999 goto out;
999 1000
1000 sdata->local->_oper_channel = sdata->local->csa_channel; 1001 /*
1001 if (!sdata->local->ops->channel_switch) { 1002 * FIXME: Here we are downgrading to NL80211_CHAN_WIDTH_20_NOHT
1003 * and don't adjust our ht/vht settings
1004 * This is wrong - we should behave according to the CSA params
1005 */
1006 local->_oper_chandef.chan = local->csa_channel;
1007 local->_oper_chandef.width = NL80211_CHAN_WIDTH_20_NOHT;
1008 local->_oper_chandef.center_freq1 =
1009 local->_oper_chandef.chan->center_freq;
1010 local->_oper_chandef.center_freq2 = 0;
1011
1012 if (!local->ops->channel_switch) {
1002 /* call "hw_config" only if doing sw channel switch */ 1013 /* call "hw_config" only if doing sw channel switch */
1003 ieee80211_hw_config(sdata->local, 1014 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
1004 IEEE80211_CONF_CHANGE_CHANNEL);
1005 } else { 1015 } else {
1006 /* update the device channel directly */ 1016 /* update the device channel directly */
1007 sdata->local->hw.conf.channel = sdata->local->_oper_channel; 1017 local->hw.conf.chandef = local->_oper_chandef;
1008 } 1018 }
1009 1019
1010 /* XXX: shouldn't really modify cfg80211-owned data! */ 1020 /* XXX: shouldn't really modify cfg80211-owned data! */
1011 ifmgd->associated->channel = sdata->local->_oper_channel; 1021 ifmgd->associated->channel = local->_oper_chandef.chan;
1012 1022
1013 /* XXX: wait for a beacon first? */ 1023 /* XXX: wait for a beacon first? */
1014 ieee80211_wake_queues_by_reason(&sdata->local->hw, 1024 ieee80211_wake_queues_by_reason(&local->hw,
1015 IEEE80211_MAX_QUEUE_MAP, 1025 IEEE80211_MAX_QUEUE_MAP,
1016 IEEE80211_QUEUE_STOP_REASON_CSA); 1026 IEEE80211_QUEUE_STOP_REASON_CSA);
1017 out: 1027 out:
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index cb34cbbaa20c..581764f92e13 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -384,7 +384,7 @@ static void ieee80211_scan_state_send_probe(struct ieee80211_local *local,
384{ 384{
385 int i; 385 int i;
386 struct ieee80211_sub_if_data *sdata; 386 struct ieee80211_sub_if_data *sdata;
387 enum ieee80211_band band = local->hw.conf.channel->band; 387 enum ieee80211_band band = local->hw.conf.chandef.chan->band;
388 u32 tx_flags; 388 u32 tx_flags;
389 389
390 tx_flags = IEEE80211_TX_INTFL_OFFCHAN_TX_OK; 390 tx_flags = IEEE80211_TX_INTFL_OFFCHAN_TX_OK;
@@ -401,7 +401,7 @@ static void ieee80211_scan_state_send_probe(struct ieee80211_local *local,
401 local->scan_req->ssids[i].ssid_len, 401 local->scan_req->ssids[i].ssid_len,
402 local->scan_req->ie, local->scan_req->ie_len, 402 local->scan_req->ie, local->scan_req->ie_len,
403 local->scan_req->rates[band], false, 403 local->scan_req->rates[band], false,
404 tx_flags, local->hw.conf.channel, true); 404 tx_flags, local->hw.conf.chandef.chan, true);
405 405
406 /* 406 /*
407 * After sending probe requests, wait for probe responses 407 * After sending probe requests, wait for probe responses
@@ -467,7 +467,7 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
467 if (local->ops->hw_scan) { 467 if (local->ops->hw_scan) {
468 __set_bit(SCAN_HW_SCANNING, &local->scanning); 468 __set_bit(SCAN_HW_SCANNING, &local->scanning);
469 } else if ((req->n_channels == 1) && 469 } else if ((req->n_channels == 1) &&
470 (req->channels[0] == local->_oper_channel)) { 470 (req->channels[0] == local->_oper_chandef.chan)) {
471 /* 471 /*
472 * If we are scanning only on the operating channel 472 * If we are scanning only on the operating channel
473 * then we do not need to stop normal activities 473 * then we do not need to stop normal activities
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
index d79e374e129a..8286dcef228b 100644
--- a/net/mac80211/trace.h
+++ b/net/mac80211/trace.h
@@ -28,27 +28,27 @@
28#define VIF_PR_FMT " vif:%s(%d%s)" 28#define VIF_PR_FMT " vif:%s(%d%s)"
29#define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : "" 29#define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
30 30
31#define CHANDEF_ENTRY __field(u32, control_freq) \ 31#define CHANDEF_ENTRY __field(u32, control_freq) \
32 __field(u32, chan_width) \ 32 __field(u32, chan_width) \
33 __field(u32, center_freq1) \ 33 __field(u32, center_freq1) \
34 __field(u32, center_freq2) 34 __field(u32, center_freq2)
35#define CHANDEF_ASSIGN(c) \ 35#define CHANDEF_ASSIGN(c) \
36 __entry->control_freq = (c)->chan->center_freq; \ 36 __entry->control_freq = (c)->chan ? (c)->chan->center_freq : 0; \
37 __entry->chan_width = (c)->width; \ 37 __entry->chan_width = (c)->width; \
38 __entry->center_freq1 = (c)->center_freq1; \ 38 __entry->center_freq1 = (c)->center_freq1; \
39 __entry->center_freq2 = (c)->center_freq2; 39 __entry->center_freq2 = (c)->center_freq2;
40#define CHANDEF_PR_FMT " control:%d MHz width:%d center: %d/%d MHz" 40#define CHANDEF_PR_FMT " control:%d MHz width:%d center: %d/%d MHz"
41#define CHANDEF_PR_ARG __entry->control_freq, __entry->chan_width, \ 41#define CHANDEF_PR_ARG __entry->control_freq, __entry->chan_width, \
42 __entry->center_freq1, __entry->center_freq2 42 __entry->center_freq1, __entry->center_freq2
43 43
44#define CHANCTX_ENTRY CHANDEF_ENTRY \ 44#define CHANCTX_ENTRY CHANDEF_ENTRY \
45 __field(u8, rx_chains_static) \ 45 __field(u8, rx_chains_static) \
46 __field(u8, rx_chains_dynamic) 46 __field(u8, rx_chains_dynamic)
47#define CHANCTX_ASSIGN CHANDEF_ASSIGN(&ctx->conf.def) \ 47#define CHANCTX_ASSIGN CHANDEF_ASSIGN(&ctx->conf.def) \
48 __entry->rx_chains_static = ctx->conf.rx_chains_static; \ 48 __entry->rx_chains_static = ctx->conf.rx_chains_static; \
49 __entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic 49 __entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic
50#define CHANCTX_PR_FMT CHANDEF_PR_FMT " chains:%d/%d" 50#define CHANCTX_PR_FMT CHANDEF_PR_FMT " chains:%d/%d"
51#define CHANCTX_PR_ARG CHANDEF_PR_ARG, \ 51#define CHANCTX_PR_ARG CHANDEF_PR_ARG, \
52 __entry->rx_chains_static, __entry->rx_chains_dynamic 52 __entry->rx_chains_static, __entry->rx_chains_dynamic
53 53
54 54
@@ -286,8 +286,7 @@ TRACE_EVENT(drv_config,
286 __field(u16, listen_interval) 286 __field(u16, listen_interval)
287 __field(u8, long_frame_max_tx_count) 287 __field(u8, long_frame_max_tx_count)
288 __field(u8, short_frame_max_tx_count) 288 __field(u8, short_frame_max_tx_count)
289 __field(int, center_freq) 289 CHANDEF_ENTRY
290 __field(int, channel_type)
291 __field(int, smps) 290 __field(int, smps)
292 ), 291 ),
293 292
@@ -303,15 +302,13 @@ TRACE_EVENT(drv_config,
303 local->hw.conf.long_frame_max_tx_count; 302 local->hw.conf.long_frame_max_tx_count;
304 __entry->short_frame_max_tx_count = 303 __entry->short_frame_max_tx_count =
305 local->hw.conf.short_frame_max_tx_count; 304 local->hw.conf.short_frame_max_tx_count;
306 __entry->center_freq = local->hw.conf.channel ? 305 CHANDEF_ASSIGN(&local->hw.conf.chandef)
307 local->hw.conf.channel->center_freq : 0;
308 __entry->channel_type = local->hw.conf.channel_type;
309 __entry->smps = local->hw.conf.smps_mode; 306 __entry->smps = local->hw.conf.smps_mode;
310 ), 307 ),
311 308
312 TP_printk( 309 TP_printk(
313 LOCAL_PR_FMT " ch:%#x freq:%d", 310 LOCAL_PR_FMT " ch:%#x" CHANDEF_PR_FMT,
314 LOCAL_PR_ARG, __entry->changed, __entry->center_freq 311 LOCAL_PR_ARG, __entry->changed, CHANDEF_PR_ARG
315 ) 312 )
316); 313);
317 314
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 4a83d8dea840..aad0bf5d8812 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1709,7 +1709,7 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,
1709 if (chanctx_conf) 1709 if (chanctx_conf)
1710 chan = chanctx_conf->def.chan; 1710 chan = chanctx_conf->def.chan;
1711 else if (!local->use_chanctx) 1711 else if (!local->use_chanctx)
1712 chan = local->_oper_channel; 1712 chan = local->_oper_chandef.chan;
1713 else 1713 else
1714 goto fail_rcu; 1714 goto fail_rcu;
1715 1715
@@ -1843,7 +1843,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
1843 * This is the exception! WDS style interfaces are prohibited 1843 * This is the exception! WDS style interfaces are prohibited
1844 * when channel contexts are in used so this must be valid 1844 * when channel contexts are in used so this must be valid
1845 */ 1845 */
1846 band = local->hw.conf.channel->band; 1846 band = local->hw.conf.chandef.chan->band;
1847 break; 1847 break;
1848#ifdef CONFIG_MAC80211_MESH 1848#ifdef CONFIG_MAC80211_MESH
1849 case NL80211_IFTYPE_MESH_POINT: 1849 case NL80211_IFTYPE_MESH_POINT:
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 90cc2b82869b..1734cd21c7ce 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -2171,8 +2171,7 @@ void ieee80211_dfs_radar_detected_work(struct work_struct *work)
2171 /* currently not handled */ 2171 /* currently not handled */
2172 WARN_ON(1); 2172 WARN_ON(1);
2173 else { 2173 else {
2174 cfg80211_chandef_create(&chandef, local->hw.conf.channel, 2174 chandef = local->hw.conf.chandef;
2175 local->hw.conf.channel_type);
2176 cfg80211_radar_event(local->hw.wiphy, &chandef, GFP_KERNEL); 2175 cfg80211_radar_event(local->hw.wiphy, &chandef, GFP_KERNEL);
2177 } 2176 }
2178} 2177}