Linux wireless drivers development
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, michal.kazior@tieto.com,
	andrei.otcheretianski@intel.com
Subject: [PATCH 8/8] iwlwifi: mvm: Use beacon_get_template instead of beacon_get
Date: Fri,  9 May 2014 14:11:51 +0300	[thread overview]
Message-ID: <1399633911-12788-9-git-send-email-luca@coelho.fi> (raw)
In-Reply-To: <1399633911-12788-1-git-send-email-luca@coelho.fi>

From: Andrei Otcheretianski <andrei.otcheretianski@intel.com>

Call ieee80211_beacon_get_template instead of ieee80211_beacon_get and sync the
CSA counters with mac80211 after each beacon transmission.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
index 25901ad..9b73a85 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
@@ -997,7 +997,7 @@ int iwl_mvm_mac_ctxt_beacon_changed(struct iwl_mvm *mvm,
 	WARN_ON(vif->type != NL80211_IFTYPE_AP &&
 		vif->type != NL80211_IFTYPE_ADHOC);
 
-	beacon = ieee80211_beacon_get(mvm->hw, vif);
+	beacon = ieee80211_beacon_get_template(mvm->hw, vif, NULL);
 	if (!beacon)
 		return -ENOMEM;
 
@@ -1250,6 +1250,7 @@ int iwl_mvm_rx_beacon_notif(struct iwl_mvm *mvm,
 
 	if (unlikely(mvm->csa_vif && mvm->csa_vif->csa_active)) {
 		if (!ieee80211_csa_is_complete(mvm->csa_vif)) {
+			ieee80211_csa_update_counter(mvm->csa_vif);
 			iwl_mvm_mac_ctxt_beacon_changed(mvm, mvm->csa_vif);
 		} else {
 			ieee80211_csa_finish(mvm->csa_vif);
-- 
2.0.0.rc0


  parent reply	other threads:[~2014-05-09 11:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-09 11:11 [PATCH 0/8] mac80211/cfg80211/iwlwifi: a few channel-switch patches Luca Coelho
2014-05-09 11:11 ` [PATCH 1/8] cfg80211: Add API to update CSA counters in mgmt frames Luca Coelho
2014-05-09 11:11 ` [PATCH 2/8] mac80211: Update " Luca Coelho
2014-05-09 11:11 ` [PATCH 3/8] cfg80211: Support multiple CSA counters Luca Coelho
2014-05-09 11:11 ` [PATCH 4/8] mac80211: " Luca Coelho
2014-05-09 11:11 ` [PATCH 5/8] iwlwifi: mvm: Add AP/GO channel switch support Luca Coelho
2014-05-09 11:11 ` [PATCH 6/8] mac80211: Provide ieee80211_beacon_get_template API Luca Coelho
2014-05-09 11:11 ` [PATCH 7/8] mac80211: Handle the CSA counters correctly Luca Coelho
2014-05-09 11:11 ` Luca Coelho [this message]
2014-05-15 13:11 ` [PATCH 0/8] mac80211/cfg80211/iwlwifi: a few channel-switch patches Johannes Berg
2014-05-15 13:18   ` Luca Coelho

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=1399633911-12788-9-git-send-email-luca@coelho.fi \
    --to=luca@coelho.fi \
    --cc=andrei.otcheretianski@intel.com \
    --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