linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mwifiex: remove unnecessary mwifiex_get_assoc_status()
@ 2011-03-11  2:57 Bing Zhao
  2011-03-11  2:57 ` [PATCH 2/2] mwifiex: remove unnecessary type casting Bing Zhao
  0 siblings, 1 reply; 2+ messages in thread
From: Bing Zhao @ 2011-03-11  2:57 UTC (permalink / raw)
  To: linux-wireless
  Cc: John W. Linville, Johannes Berg, Amitkumar Karwar, Kiran Divekar,
	Yogesh Powar, Marc Yang, Frank Huang, Bing Zhao

This function just returns priv->media_connected

Signed-off-by: Bing Zhao <bzhao@marvell.com>
---
 drivers/net/wireless/mwifiex/cfg80211.c |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index d34c622..f19a7cf 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -147,15 +147,6 @@ mwifiex_get_mwifiex_cipher(u32 cipher, int *wpa_enabled)
 }
 
 /*
- * This function returns the association status.
- */
-static int
-mwifiex_get_assoc_status(struct mwifiex_private *priv)
-{
-	return priv->media_connected;
-}
-
-/*
  * This function retrieves the private structure from kernel wiphy structure.
  */
 static void *mwifiex_cfg80211_get_priv(struct wiphy *wiphy)
@@ -460,7 +451,7 @@ mwifiex_cfg80211_set_channel(struct wiphy *wiphy, struct net_device *dev,
 	struct mwifiex_private *priv =
 		(struct mwifiex_private *) mwifiex_cfg80211_get_priv(wiphy);
 
-	if (mwifiex_get_assoc_status(priv)) {
+	if (priv->media_connected) {
 		wiphy_err(wiphy, "This setting is valid only when station "
 				"is not connected\n");
 		return -EINVAL;
-- 
1.7.0.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-11  2:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-11  2:57 [PATCH 1/2] mwifiex: remove unnecessary mwifiex_get_assoc_status() Bing Zhao
2011-03-11  2:57 ` [PATCH 2/2] mwifiex: remove unnecessary type casting Bing Zhao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).