Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Bing Zhao <bzhao@marvell.com>
Subject: [PATCH] mwifiex: remove set_channel cfg80211 hook
Date: Fri, 11 May 2012 19:24:34 +0200	[thread overview]
Message-ID: <1336757074.12801.18.camel@jlt3.sipsolutions.net> (raw)

From: Johannes Berg <johannes.berg@intel.com>

Since mwifiex only supports managed and IBSS
modes, it doesn't need a set_channel call. The
callback might be called, but it won't matter
as nothing can use the channel.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 drivers/net/wireless/mwifiex/cfg80211.c |   27 ---------------------------
 1 file changed, 27 deletions(-)

--- a/drivers/net/wireless/mwifiex/cfg80211.c	2012-05-11 18:02:41.000000000 +0200
+++ b/drivers/net/wireless/mwifiex/cfg80211.c	2012-05-11 18:36:38.000000000 +0200
@@ -365,32 +365,6 @@ mwifiex_set_rf_channel(struct mwifiex_pr
 }
 
 /*
- * CFG802.11 operation handler to set channel.
- *
- * This function can only be used when station is not connected.
- */
-static int
-mwifiex_cfg80211_set_channel(struct wiphy *wiphy, struct net_device *dev,
-			     struct ieee80211_channel *chan,
-			     enum nl80211_channel_type channel_type)
-{
-	struct mwifiex_private *priv;
-
-	if (dev)
-		priv = mwifiex_netdev_get_priv(dev);
-	else
-		priv = mwifiex_cfg80211_get_priv(wiphy);
-
-	if (priv->media_connected) {
-		wiphy_err(wiphy, "This setting is valid only when station "
-				"is not connected\n");
-		return -EINVAL;
-	}
-
-	return mwifiex_set_rf_channel(priv, chan, channel_type);
-}
-
-/*
  * This function sets the fragmentation threshold.
  *
  * The fragmentation threshold value must lie between MWIFIEX_FRAG_MIN_VALUE
@@ -1417,7 +1391,6 @@ static struct cfg80211_ops mwifiex_cfg80
 	.get_station = mwifiex_cfg80211_get_station,
 	.dump_station = mwifiex_cfg80211_dump_station,
 	.set_wiphy_params = mwifiex_cfg80211_set_wiphy_params,
-	.set_channel = mwifiex_cfg80211_set_channel,
 	.join_ibss = mwifiex_cfg80211_join_ibss,
 	.leave_ibss = mwifiex_cfg80211_leave_ibss,
 	.add_key = mwifiex_cfg80211_add_key,



             reply	other threads:[~2012-05-11 17:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-11 17:24 Johannes Berg [this message]
2012-05-11 18:21 ` [PATCH] mwifiex: remove set_channel cfg80211 hook Bing Zhao
2012-05-11 18:26   ` Johannes Berg
2012-05-11 18:27     ` Johannes Berg
2012-05-11 18:57       ` Bing Zhao
2012-05-11 19:04 ` Bing Zhao

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=1336757074.12801.18.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=bzhao@marvell.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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