[tip:core/locking] iwlwifi: cleanup iwl_set_rxon_channel()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  3edb5fd6ac898182a186d403695986f6ff51ac65
Gitweb:     http://git.kernel.org/tip/3edb5fd6ac898182a186d403695986f6ff51ac65
Author:     Shanyu Zhao <shanyu.zhao@xxxxxxxxx>
AuthorDate: Tue, 27 Jul 2010 20:45:15 -0700
Committer:  John W. Linville <linville@xxxxxxxxxxxxx>
CommitDate: Tue, 24 Aug 2010 16:32:01 -0400

iwlwifi: cleanup iwl_set_rxon_channel()

Update outdated comments of iwl_set_rxon_channel() to reflect the
current signature. Also remove the unnecessary validation of the
channel. Those channel info are constructed in iwlwifi driver
and mac80211 will never modify the content of the struct. Also
everytime before this function is called the channel info has
been validated already (as a paranoid check).

Signed-off-by: Shanyu Zhao <shanyu.zhao@xxxxxxxxx>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@xxxxxxxxx>
---
 drivers/net/wireless/iwlwifi/iwl-core.c |   15 ++++-----------
 1 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 39aea75..602636c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -904,26 +904,19 @@ u8 iwl_get_single_channel_number(struct iwl_priv *priv,
 EXPORT_SYMBOL(iwl_get_single_channel_number);
 
 /**
- * iwl_set_rxon_channel - Set the phymode and channel values in staging RXON
- * @phymode: MODE_IEEE80211A sets to 5.2GHz; all else set to 2.4GHz
- * @channel: Any channel valid for the requested phymode
+ * iwl_set_rxon_channel - Set the band and channel values in staging RXON
+ * @ch: requested channel as a pointer to struct ieee80211_channel
 
- * In addition to setting the staging RXON, priv->phymode is also set.
+ * In addition to setting the staging RXON, priv->band is also set.
  *
  * NOTE:  Does not commit to the hardware; it sets appropriate bit fields
- * in the staging RXON flag structure based on the phymode
+ * in the staging RXON flag structure based on the ch->band
  */
 int iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch)
 {
 	enum ieee80211_band band = ch->band;
 	u16 channel = ch->hw_value;
 
-	if (!iwl_get_channel_info(priv, band, channel)) {
-		IWL_DEBUG_INFO(priv, "Could not set channel to %d [%d]\n",
-			       channel, band);
-		return -EINVAL;
-	}
-
 	if ((le16_to_cpu(priv->staging_rxon.channel) == channel) &&
 	    (priv->band == band))
 		return 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux