diff options
author | Avinash Patil <patila@marvell.com> | 2015-01-28 15:54:23 +0530 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-01-29 10:22:06 +0200 |
commit | 3b57c1a713a9dd3b8da74b6df9f16ce1f8f9144b (patch) | |
tree | ed463dab22332327ab464b5b4370435a5df832f2 /drivers/net/wireless/mwifiex/11h.c | |
parent | 0a694d68651b16b307d5ad64acac90d604146bcc (diff) |
mwifiex: handle radar detect event from FW
This patch adds support for radar_detected event from FW.
Driver in turn would stop netdev queues to stop TX traffic and
issue RADAR_DETECT event to cfg80211.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Qingshui Gao <gaoqs@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mwifiex/11h.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/11h.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/11h.c b/drivers/net/wireless/mwifiex/11h.c index e44cac72712e..08c12aece9ae 100644 --- a/drivers/net/wireless/mwifiex/11h.c +++ b/drivers/net/wireless/mwifiex/11h.c @@ -216,3 +216,27 @@ int mwifiex_11h_handle_chanrpt_ready(struct mwifiex_private *priv, return 0; } + +/* Handler for radar detected event from FW.*/ +int mwifiex_11h_handle_radar_detected(struct mwifiex_private *priv, + struct sk_buff *skb) +{ + struct mwifiex_radar_det_event *rdr_event; + + rdr_event = (void *)(skb->data + sizeof(u32)); + + if (le32_to_cpu(rdr_event->passed)) { + dev_notice(priv->adapter->dev, + "radar detected; indicating kernel\n"); + cfg80211_radar_event(priv->adapter->wiphy, &priv->dfs_chandef, + GFP_KERNEL); + dev_dbg(priv->adapter->dev, "regdomain: %d\n", + rdr_event->reg_domain); + dev_dbg(priv->adapter->dev, "radar detection type: %d\n", + rdr_event->det_type); + } else { + dev_dbg(priv->adapter->dev, "false radar detection event!\n"); + } + + return 0; +} |