aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorSimon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>2013-02-08 12:16:20 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-02-15 03:41:04 -0500
commit164eb02d070af987890e1db1c12b8ae0394b19f7 (patch)
treec7c1f7a8d051f095cbf02a580ad70d7b4537b714 /net/mac80211/main.c
parent04f39047af2a6df64b763ea5a271db24879d0391 (diff)
mac80211: add radar detection command/event
Add command to trigger radar detection in the driver/FW. Once radar detection is started it should continuously monitor for radars as long as the channel active. If radar is detected usermode notified with 'radar detected' event. Scanning and remain on channel functionality must be disabled while doing radar detection/scanning, and vice versa. Based on original patch by Victor Goldenshtein <victorg@ti.com> Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 38b3468bc515..9cdbc774cfd7 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -621,6 +621,9 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
621 621
622 INIT_WORK(&local->restart_work, ieee80211_restart_work); 622 INIT_WORK(&local->restart_work, ieee80211_restart_work);
623 623
624 INIT_WORK(&local->radar_detected_work,
625 ieee80211_dfs_radar_detected_work);
626
624 INIT_WORK(&local->reconfig_filter, ieee80211_reconfig_filter); 627 INIT_WORK(&local->reconfig_filter, ieee80211_reconfig_filter);
625 local->smps_mode = IEEE80211_SMPS_OFF; 628 local->smps_mode = IEEE80211_SMPS_OFF;
626 629
@@ -713,6 +716,16 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
713 */ 716 */
714 if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_WDS)) 717 if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_WDS))
715 return -EINVAL; 718 return -EINVAL;
719
720 /* DFS currently not supported with channel context drivers */
721 for (i = 0; i < local->hw.wiphy->n_iface_combinations; i++) {
722 const struct ieee80211_iface_combination *comb;
723
724 comb = &local->hw.wiphy->iface_combinations[i];
725
726 if (comb->radar_detect_widths)
727 return -EINVAL;
728 }
716 } 729 }
717 730
718 /* Only HW csum features are currently compatible with mac80211 */ 731 /* Only HW csum features are currently compatible with mac80211 */