Project : madwifi
Revision : 2471
Author : mentor (Matthew W. S. Bell)
Date : 2007-06-17 02:31:00 +0200 (Sun, 17 Jun 2007)
Log Message :
Remove sysctl to disable TKIP MIC, as I can't think of a situation where it
would be useful.
Disable the setting of F_WME if we do not have C_WME_TKIPMIC.
In both situations we would need to walk all the keys and reset their
properties for software MIC as appropriate. We don't currently do this. We
could if it's useful for somebody.
Affected Files:
* trunk/ath/if_ath.c updated
* trunk/net80211/ieee80211_crypto.c updated
* trunk/net80211/ieee80211_wireless.c updated
Modified: trunk/ath/if_ath.c
===================================================================
--- trunk/ath/if_ath.c 2007-06-16 06:50:23 UTC (rev 2470)
+++ trunk/ath/if_ath.c 2007-06-17 00:31:00 UTC (rev 2471)
@@ -9224,10 +9224,9 @@
ATH_DIVERSITY = 11,
ATH_TXINTRPERIOD = 12,
ATH_FFTXQMIN = 18,
- ATH_TKIPMIC = 19,
- ATH_XR_POLL_PERIOD = 20,
- ATH_XR_POLL_COUNT = 21,
- ATH_ACKRATE = 22,
+ ATH_XR_POLL_PERIOD = 21,
+ ATH_XR_POLL_COUNT = 22,
+ ATH_ACKRATE = 23,
};
static int
@@ -9325,18 +9324,6 @@
/* XXX validate? */
sc->sc_fftxqmin = val;
break;
- case ATH_TKIPMIC: {
- struct ieee80211com *ic = &sc->sc_ic;
-
- if (!(ic->ic_caps & IEEE80211_C_TKIPMIC) ||
- ((ic->ic_caps & IEEE80211_C_WME) &&
- !(ic->ic_caps & IEEE80211_C_WME_TKIPMIC)
&&
- (ic->ic_flags & IEEE80211_F_WME)))
- ret = -EINVAL;
-
- ath_hal_settkipmic(ah, val);
- break;
- }
#ifdef ATH_SUPERG_XR
case ATH_XR_POLL_PERIOD:
if (val > XR_MAX_POLL_INTERVAL)
@@ -9404,9 +9391,6 @@
case ATH_FFTXQMIN:
val = sc->sc_fftxqmin;
break;
- case ATH_TKIPMIC:
- val = ath_hal_gettkipmic(ah);
- break;
#ifdef ATH_SUPERG_XR
case ATH_XR_POLL_PERIOD:
val=sc->sc_xrpollint;
@@ -9501,11 +9485,6 @@
.mode = 0644,
.proc_handler = ath_sysctl_halparam
},
- { .ctl_name = ATH_TKIPMIC,
- .procname = "tkipmic",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam
- },
#ifdef ATH_SUPERG_XR
{ .ctl_name = ATH_XR_POLL_PERIOD,
.procname = "xrpollperiod",
Modified: trunk/net80211/ieee80211_crypto.c
===================================================================
--- trunk/net80211/ieee80211_crypto.c 2007-06-16 06:50:23 UTC (rev 2470)
+++ trunk/net80211/ieee80211_crypto.c 2007-06-17 00:31:00 UTC (rev 2471)
@@ -332,7 +332,7 @@
* If the hardware does not support the cipher then
* fallback to a host-based implementation.
*/
- if ((vap->iv_caps & (1<<cipher)) == 0) {
+ if ((vap->iv_caps & !(1 << cipher))) {
IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO,
"%s: no h/w support for cipher %s, falling back to s/w\n",
__func__, cip->ic_name);
@@ -344,12 +344,12 @@
* the cipher modules honor it.
*/
if (cipher == IEEE80211_CIPHER_TKIP) {
- if ((vap->iv_caps & IEEE80211_C_TKIPMIC) == 0) {
+ if (!(vap->iv_caps & IEEE80211_C_TKIPMIC)) {
IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO,
"%s: no h/w support for TKIP MIC, falling back
to s/w\n",
__func__);
flags |= IEEE80211_KEY_SWMIC;
- } else if (((vap->iv_caps & IEEE80211_C_WME_TKIPMIC) == 0) &&
+ } else if (!((vap->iv_caps & IEEE80211_C_WME_TKIPMIC)) &&
(vap->iv_flags & IEEE80211_F_WME)) {
IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO,
"%s: no h/w support for TKIP MIC when WMM is
turned on,"
@@ -365,7 +365,7 @@
* cipher module can optimize space usage based on
* whether or not it needs to do the cipher work.
*/
- if (key->wk_cipher != cip || key->wk_flags != flags) {
+ if ((key->wk_cipher != cip) || (key->wk_flags != flags)) {
again:
/*
* Fill in the flags so cipher modules can see s/w
Modified: trunk/net80211/ieee80211_wireless.c
===================================================================
--- trunk/net80211/ieee80211_wireless.c 2007-06-16 06:50:23 UTC (rev 2470)
+++ trunk/net80211/ieee80211_wireless.c 2007-06-17 00:31:00 UTC (rev 2471)
@@ -47,7 +47,7 @@
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/utsname.h>
-#include <linux/if_arp.h> /* XXX for ARPHRD_ETHER */
+#include <linux/if_arp.h> /* for ARPHRD_ETHER */
#include <linux/delay.h>
#include <linux/wireless.h>
@@ -2304,11 +2304,19 @@
}
break;
case IEEE80211_PARAM_WMM:
- /* XXX: We need to reset HAL state when we change this flag */
if (ic->ic_caps & IEEE80211_C_WME){
+ retv = ENETRESET; /* Renegotiate for capabilities
*/
+
if (value) {
- vap->iv_flags |= IEEE80211_F_WME;
- vap->iv_ic->ic_flags |= IEEE80211_F_WME;
+ /* All TKIP keys need resetting to use software
MIC.
+ * They aren't, so this is disabled.
+ * XXX: Can never turn it back on. */
+ if (!(vap->iv_ic->ic_caps &
IEEE80211_C_WME_TKIPMIC))
+ retv = EBUSY;
+ else {
+ vap->iv_flags |= IEEE80211_F_WME;
+ vap->iv_ic->ic_flags |= IEEE80211_F_WME;
+ }
} else {
vap->iv_flags &= ~IEEE80211_F_WME;
@@ -2327,9 +2335,8 @@
vap->iv_ic->ic_flags &=
~IEEE80211_F_WME;
}
}
+ }
- retv = ENETRESET; /* Renegotiate for capabilities
*/
- }
break;
case IEEE80211_PARAM_HIDESSID:
if (value)
@@ -2621,7 +2628,8 @@
/* set the same params on the xr vap device if exists */
if (vap->iv_xrvap && !(vap->iv_flags & IEEE80211_F_XR)) {
ieee80211_ioctl_setparam(vap->iv_xrvap->iv_dev, info, w, extra);
- vap->iv_xrvap->iv_ath_cap &= IEEE80211_ATHC_XR; /* XR vap does
not support any superG features */
+ /* XR vap does not support any superG features */
+ vap->iv_xrvap->iv_ath_cap &= IEEE80211_ATHC_XR;
}
/*
* do not reset the xr vap , which is automatically
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
|