linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bing Zhao <bzhao@marvell.com>
To: linux-wireless@vger.kernel.org
Cc: "John W. Linville" <linville@tuxdriver.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	Amitkumar Karwar <akarwar@marvell.com>,
	Kiran Divekar <dkiran@marvell.com>,
	Yogesh Powar <yogeshp@marvell.com>,
	Marc Yang <yangyang@marvell.com>,
	Frank Huang <frankh@marvell.com>, Bing Zhao <bzhao@marvell.com>
Subject: [PATCH 1/2] mwifiex: remove unnecessary mwifiex_get_assoc_status()
Date: Thu, 10 Mar 2011 18:57:08 -0800	[thread overview]
Message-ID: <1299812229-27370-1-git-send-email-bzhao@marvell.com> (raw)

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


             reply	other threads:[~2011-03-11  2:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-11  2:57 Bing Zhao [this message]
2011-03-11  2:57 ` [PATCH 2/2] mwifiex: remove unnecessary type casting 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=1299812229-27370-1-git-send-email-bzhao@marvell.com \
    --to=bzhao@marvell.com \
    --cc=akarwar@marvell.com \
    --cc=dkiran@marvell.com \
    --cc=frankh@marvell.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=yangyang@marvell.com \
    --cc=yogeshp@marvell.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;
as well as URLs for NNTP newsgroup(s).