Skip to contentSkip to conversation

mac80211: make 802.1X setting consistent with low-level driver

PATCH New Johannes Berg 1 participant 1 message Mar 28, 2007 mac80211

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 mac80211: make 802.1X setting consistent with low-level driver

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.

---
 net/mac80211/ieee80211_ioctl.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
net/mac80211/ieee80211_ioctl.c +6 -3
@@ -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: