Linux wireless drivers development
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: linux-wireless@vger.kernel.org, johannes@sipsolutions.net
Cc: michal.kazior@tieto.com
Subject: [PATCH 2/4] mac80211: send channel switch started notifications
Date: Fri,  2 May 2014 16:40:29 +0300	[thread overview]
Message-ID: <1399038031-23206-2-git-send-email-luca@coelho.fi> (raw)
In-Reply-To: <1399038031-23206-1-git-send-email-luca@coelho.fi>

From: Luciano Coelho <luciano.coelho@intel.com>

Send a channel switch notification to userspace when a channel switch
is requested or when we react to a remote CSA.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
---
 net/mac80211/cfg.c  | 2 ++
 net/mac80211/mlme.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 7b8d3cf..53a2cfe 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -3281,6 +3281,8 @@ int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
 	sdata->csa_chandef = params->chandef;
 	sdata->vif.csa_active = true;
 
+	cfg80211_ch_switch_started_notify(sdata->dev, &sdata->csa_chandef);
+
 	if (changed) {
 		ieee80211_bss_info_change_notify(sdata, changed);
 		drv_channel_switch_beacon(sdata, &params->chandef);
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 488826f..139005d 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1107,6 +1107,8 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
 				IEEE80211_MAX_QUEUE_MAP,
 				IEEE80211_QUEUE_STOP_REASON_CSA);
 
+	cfg80211_ch_switch_started_notify(sdata->dev, &csa_ie.chandef);
+
 	if (local->ops->channel_switch) {
 		/* use driver's channel switch callback */
 		struct ieee80211_channel_switch ch_switch = {
-- 
1.9.2


  reply	other threads:[~2014-05-02 13:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-02 13:40 [PATCH 1/4] cfg80211/nl80211: add channel switch started and failed notifications Luca Coelho
2014-05-02 13:40 ` Luca Coelho [this message]
2014-05-02 13:40 ` [PATCH 3/4] mac80211: send channel switch " Luca Coelho
2014-05-02 13:40 ` [PATCH 4/4] cfg80211/nl80211: allow any interface to send channel switch notifications Luca Coelho
2014-05-06 10:47 ` [PATCH 1/4] cfg80211/nl80211: add channel switch started and failed notifications Johannes Berg
2014-05-06 12:49   ` Michal Kazior
2014-05-06 13:08     ` Johannes Berg
2014-05-07  6:08   ` Peer, Ilan
2014-05-07  6:39     ` Johannes Berg
2014-05-07 10:27       ` Peer, Ilan
2014-05-07 11:19         ` Johannes Berg
2014-05-07 11:45           ` Michal Kazior
2014-05-07 11:55           ` Peer, Ilan
2014-05-13 10:31             ` Luca Coelho
2014-05-06 10:48 ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1399038031-23206-2-git-send-email-luca@coelho.fi \
    --to=luca@coelho.fi \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=michal.kazior@tieto.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox