mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Kilroy <kilroyd@googlemail.com>
To: linux-kernel@vger.kernel.org, greg@kroah.com
Cc: pe1dnn@amsat.org, David Kilroy <kilroyd@googlemail.com>
Subject: [PATCH 7/7] staging: wlags49_h2: Fixup SIOCSIWGENIE
Date: Sun,  9 Oct 2011 12:11:37 +0100	[thread overview]
Message-ID: <1318158697-15979-8-git-send-email-kilroyd@googlemail.com> (raw)
In-Reply-To: <1318158697-15979-1-git-send-email-kilroyd@googlemail.com>

Setting the key management scheme is done in SIOCSIWAUTH, so
no need to do anything in SIOCSIWGENIE.

Fix up function name.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
---
 drivers/staging/wlags49_h2/wl_wext.c |   40 +++++++--------------------------
 1 files changed, 9 insertions(+), 31 deletions(-)

diff --git a/drivers/staging/wlags49_h2/wl_wext.c b/drivers/staging/wlags49_h2/wl_wext.c
index 9884320..8ac5e10 100644
--- a/drivers/staging/wlags49_h2/wl_wext.c
+++ b/drivers/staging/wlags49_h2/wl_wext.c
@@ -3196,42 +3196,20 @@ out:
 
 
 
-static int wireless_get_genie(struct net_device *dev,
-					   struct iw_request_info *info,
-					   struct iw_point *data, char *extra)
+static int wireless_set_genie(struct net_device *dev,
+			      struct iw_request_info *info,
+			      struct iw_point *data, char *extra)
 
 {
-	struct wl_private *lp = wl_priv(dev);
-	unsigned long flags;
 	int   ret = 0;
-	ltv_t ltv;
-
-	DBG_FUNC( "wireless_get_genie" );
-	DBG_ENTER( DbgInfo );
-
-	if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-		ret = -EBUSY;
-		goto out;
-	}
-
-	wl_lock( lp, &flags );
 
-    	wl_act_int_off( lp );
-
-	memset(&ltv, 0, sizeof(ltv));
-	ltv.len = 2;
-	ltv.typ = CFG_SET_WPA_AUTH_KEY_MGMT_SUITE;
-	lp->AuthKeyMgmtSuite = ltv.u.u16[0] = 4;
-	ltv.u.u16[0]  = CNV_INT_TO_LITTLE(ltv.u.u16[0]);
-
-	ret = hcf_put_info(&(lp->hcfCtx), (LTVP)&ltv);
-
-    	wl_act_int_on( lp );
+	DBG_ENTER(DbgInfo);
 
-	wl_unlock(lp, &flags);
+	/* We can't write this to the card, but apparently this
+	 * operation needs to succeed */
+	ret = 0;
 
-out:
-	DBG_LEAVE( DbgInfo );
+	DBG_LEAVE(DbgInfo);
 	return ret;
 }
 /*============================================================================*/
@@ -3970,7 +3948,7 @@ static const iw_handler wl_handler[] =
 	IW_HANDLER(SIOCGIWENCODE, (iw_handler) wireless_get_encode),
 	IW_HANDLER(SIOCSIWPOWER, (iw_handler) wireless_set_power),
 	IW_HANDLER(SIOCGIWPOWER, (iw_handler) wireless_get_power),
-	IW_HANDLER(SIOCSIWGENIE, (iw_handler) wireless_get_genie),
+	IW_HANDLER(SIOCSIWGENIE, (iw_handler) wireless_set_genie),
 	IW_HANDLER(SIOCSIWAUTH, (iw_handler) wireless_set_auth),
 	IW_HANDLER(SIOCSIWENCODEEXT, (iw_handler) wireless_set_encodeext),
 };
-- 
1.7.4.1


  parent reply	other threads:[~2011-10-09 11:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-09 11:11 [PATCH 0/7] Enable WPA with wlags49_h2 David Kilroy
2011-10-09 11:11 ` [PATCH 1/7] staging: wlags49_h2: Handle sysfs_create_group return correctly David Kilroy
2011-10-09 11:11 ` [PATCH 2/7] staging: wlags49_h2: Enable WPA in the HCF David Kilroy
2011-10-09 11:11 ` [PATCH 4/7] staging: wlags49_h2: Report WPA IE in scan results with IWEVGENIE David Kilroy
2011-10-09 11:11 ` [PATCH 5/7] staging: wlags49_h2: Make key setting more reliable David Kilroy
2011-10-09 11:11 ` [PATCH 6/7] staging: wlags49_h2: Fixup IW_AUTH handling David Kilroy
2011-10-09 11:11 ` David Kilroy [this message]
     [not found] ` <1318158697-15979-4-git-send-email-kilroyd@googlemail.com>
2011-10-09 11:26   ` [PATCH 3/7] staging: wlags49_h2: Remove useless IWE_STREAM_ADD_YYY defines Dave Kilroy
2011-10-09 16:54     ` Greg KH

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=1318158697-15979-8-git-send-email-kilroyd@googlemail.com \
    --to=kilroyd@googlemail.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pe1dnn@amsat.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

all inboxes | Powered by JetHome®