Subject: kern/23146: sys/net80211/ intergration break WEP/power management function
To: None <gnats-bugs@gnats.netbsd.org>
From: None <naoki@fukaumi.org>
List: netbsd-bugs
Date: 10/13/2003 22:32:06
>Number:         23146
>Category:       kern
>Synopsis:       sys/net80211/ intergration break WEP/power management function
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 13 13:35:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     FUKAUMI Naoki
>Release:        NetBSD 1.6ZC
>Organization:
	FUKAUMI Naoki
>Environment:
>Description:
	ifconfig xxx0 nwkey abcde cause ioctl error after sys/net80211/
	integration.
>How-To-Repeat:
	See above.
>Fix:
Index: ieee80211_ioctl.c
===================================================================
RCS file: /cvsroot/src/sys/net80211/ieee80211_ioctl.c,v
retrieving revision 1.4
diff -u -u -r1.4 ieee80211_ioctl.c
--- ieee80211_ioctl.c	2003/09/28 02:40:14	1.4
+++ ieee80211_ioctl.c	2003/10/13 13:31:47
@@ -1063,7 +1063,7 @@
 		break;
 	case SIOCS80211NWKEY:
 		nwkey = (struct ieee80211_nwkey *)data;
-		if ((ic->ic_flags & IEEE80211_C_WEP) == 0 &&
+		if ((ic->ic_caps & IEEE80211_C_WEP) == 0 &&
 		    nwkey->i_wepon != IEEE80211_NWKEY_OPEN) {
 			error = EINVAL;
 			break;
@@ -1135,7 +1135,7 @@
 		power = (struct ieee80211_power *)data;
 		ic->ic_lintval = power->i_maxsleep;
 		if (power->i_enabled != 0) {
-			if ((ic->ic_flags & IEEE80211_C_PMGT) == 0)
+			if ((ic->ic_caps & IEEE80211_C_PMGT) == 0)
 				error = EINVAL;
 			else if ((ic->ic_flags & IEEE80211_F_PMGTON) == 0) {
 				ic->ic_flags |= IEEE80211_F_PMGTON;
>Release-Note:
>Audit-Trail:
>Unformatted: