Historical ath9k-devel archives
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCH 3/6] ath10k: remove band_center_freq()
Date: Mon, 20 May 2013 16:36:51 +0300	[thread overview]
Message-ID: <20130520133651.6961.91491.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20130520133551.6961.55701.stgit@localhost6.localdomain6>

We can take the frequency directly from struct
cfg80211_chan_def.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/mac.c |   25 ++-----------------------
 1 file changed, 2 insertions(+), 23 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 72f4475..3d4e574 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -270,25 +270,6 @@ chan_to_phymode(const struct cfg80211_chan_def *chandef)
 	return phymode;
 }
 
-static int band_center_freq(struct ieee80211_channel *chan,
-			    enum nl80211_channel_type channel_type)
-{
-	u32 center_freq = chan->center_freq;
-
-	switch (channel_type) {
-	case NL80211_CHAN_HT40PLUS:
-		center_freq = chan->center_freq + 10;
-		break;
-	case NL80211_CHAN_HT40MINUS:
-		center_freq = chan->center_freq - 10;
-		break;
-	default:
-		break;
-	}
-
-	return center_freq;
-}
-
 static u8 ath10k_parse_mpdudensity(u8 mpdudensity)
 {
 /*
@@ -412,9 +393,7 @@ static int ath10k_vdev_start(struct ath10k_vif *arvif)
 
 	arg.channel.freq = channel->center_freq;
 
-	arg.channel.band_center_freq1 =
-		band_center_freq(channel,
-				 cfg80211_get_chandef_type(&conf->chandef));
+	arg.channel.band_center_freq1 = conf->chandef.center_freq1;
 
 	arg.channel.mode = chan_to_phymode(&conf->chandef);
 
@@ -484,7 +463,7 @@ static int ath10k_monitor_start(struct ath10k *ar, int vdev_id)
 
 	arg.vdev_id = vdev_id;
 	arg.channel.freq = channel->center_freq;
-	arg.channel.band_center_freq1 = band_center_freq(channel, type);
+	arg.channel.band_center_freq1 = ar->hw->conf.chandef.center_freq1;
 
 	/* TODO setup this dynamically, what in case we
 	   don't have any vifs? */

  parent reply	other threads:[~2013-05-20 13:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-20 13:36 [ath9k-devel] [PATCH 0/6] ath10k: vht support Kalle Valo
2013-05-20 13:36 ` [ath9k-devel] [PATCH 1/6] ath10k: set vht_nss correctly Kalle Valo
2013-05-20 13:36 ` [ath9k-devel] [PATCH 2/6] ath10k: change chan_to_phymode() use chandef Kalle Valo
2013-05-20 13:36 ` Kalle Valo [this message]
2013-05-20 13:36 ` [ath9k-devel] [PATCH 4/6] ath10k: include all management frames to ATH10K_DBG_BEACON Kalle Valo
2013-05-20 13:37 ` [ath9k-devel] [PATCH 5/6] ath10k: add ATH10K_DBG_DATA Kalle Valo
2013-05-20 13:37 ` [ath9k-devel] [PATCH 6/6] ath10k: preliminary VHT support Kalle Valo
2013-05-21 11:45   ` Michal Kazior
2013-05-21 19:19     ` Kalle Valo
2013-05-21 19:30 ` [ath9k-devel] [PATCH 0/6] ath10k: vht support Kalle Valo

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=20130520133651.6961.91491.stgit@localhost6.localdomain6 \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath9k-devel@lists.ath9k.org \
    /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