Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Jiri Benc <jbenc@suse.cz>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] mac80211: make 802.1X setting consistent with low-level driver
Date: Tue, 27 Mar 2007 17:59:54 +0200	[thread overview]
Message-ID: <1175011194.9282.2.camel@johannes.berg> (raw)

If the low-level driver fails to reconfigure 802.1X we currently still
set the variable. Don't do that since it brings things out of sync.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>

---
 net/mac80211/ieee80211_ioctl.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--- wireless-dev.orig/net/mac80211/ieee80211_ioctl.c	2007-03-27 16:33:44.363155480 +0200
+++ wireless-dev/net/mac80211/ieee80211_ioctl.c	2007-03-27 16:33:44.943155480 +0200
@@ -2478,11 +2478,14 @@ static int ieee80211_ioctl_prism2_param(
 		break;
 
 	case PRISM2_PARAM_IEEE_802_1X:
-		sdata->ieee802_1x = value;
-		if (local->ops->set_ieee8021x &&
-		    local->ops->set_ieee8021x(local_to_hw(local), value))
+		if (local->ops->set_ieee8021x)
+			ret = local->ops->set_ieee8021x(local_to_hw(local),
+							value);
+		if (ret)
 			printk(KERN_DEBUG "%s: failed to set IEEE 802.1X (%d) "
 			       "for low-level driver\n", dev->name, value);
+		else
+			sdata->ieee802_1x = value;
 		break;
 
 	case PRISM2_PARAM_ANTSEL_TX:



                 reply	other threads:[~2007-03-28  9:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1175011194.9282.2.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=jbenc@suse.cz \
    --cc=linux-wireless@vger.kernel.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