English Language flag
// Log In
// CVSweb
Project: FreeWRT
// Summary // Activity // Search // Tracker // Lists // News // SCM // Wiki

SCM Repository

ViewVC logotype

Contents of /branches/freewrt_1_0/package/madwifi/patches/patch-net80211_ieee80211_wireless_c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2951 - (show annotations) (download)
Tue Jun 26 19:20:08 2007 UTC (6 years, 8 months ago) by tha
File size: 2978 byte(s)
Madwifi (fixing bug: #155):
 - downgraded to 0.9.2.1, because in 0.9.3.x the madwifi kernel module
   oopses in monitor mode.
 - applied debian's security fixed for 0.9.2.1, because every 
   unpatched version before 0.9.3.1 is vulnerable to three knows security
   issues (see madwifi.org).
 - converted four manual patches to the freewrt patch format
 - thx to shorty for sending a one-liner fix in the Makefile for 0.9.2.1

Aiccu (fixing a bug reported via the xen-users ml by Frank Matthiess):
 - merged fix from trunk rev #2881 for fixing a bug regarding a broken
   IP Header in the aiccu packets.

Broadcom-wl-util (fixing bug: #334):
 - qouted the wpa password in the if-<pre>up.d scripts.
   hopefully this fixes this bug. Until now I only checked that it 
   doesn't brake something that was already working before.

Freeradius (fixing bug: #321):
 - the init.d script now exports the correct library path before radiusd
   is started. otherwise the daemon fails in certain setups because some
   libraries cannot be found. thx to tg for this fix.

License:
 - updated the license file to refelect the current developer team.
   the names and the alphabetic order has been "stolen" by me from
   http://www.freewrt.org/trac/wiki/Development/Developers


1 $FreeWRT$
2 --- madwifi-0.9.2.1.orig/net80211/ieee80211_wireless.c 2006-12-07 14:47:17.000000000 +0100
3 +++ madwifi-0.9.2.1/net80211/ieee80211_wireless.c 2007-06-26 18:54:01.000000000 +0200
4 @@ -1248,35 +1248,37 @@ ieee80211_ioctl_siwpower(struct net_devi
5 {
6 struct ieee80211vap *vap = dev->priv;
7 struct ieee80211com *ic = vap->iv_ic;
8 +
9 + /* XXX: These values, flags, and caps do not seem to be used elsewhere
10 + * at all? */
11
12 + if ((ic->ic_caps & IEEE80211_C_PMGT) == 0)
13 + return -EOPNOTSUPP;
14 +
15 if (wrq->disabled) {
16 - if (ic->ic_flags & IEEE80211_F_PMGTON) {
17 + if (ic->ic_flags & IEEE80211_F_PMGTON)
18 ic->ic_flags &= ~IEEE80211_F_PMGTON;
19 - goto done;
20 + } else {
21 + switch (wrq->flags & IW_POWER_MODE) {
22 + case IW_POWER_UNICAST_R:
23 + case IW_POWER_ALL_R:
24 + case IW_POWER_ON:
25 + if (wrq->flags & IW_POWER_PERIOD) {
26 + if (IEEE80211_BINTVAL_VALID(wrq->value))
27 + ic->ic_lintval = IEEE80211_MS_TO_TU(wrq->value);
28 + else
29 + return -EINVAL;
30 + }
31 + if (wrq->flags & IW_POWER_TIMEOUT)
32 + ic->ic_holdover = IEEE80211_MS_TO_TU(wrq->value);
33 +
34 + ic->ic_flags |= IEEE80211_F_PMGTON;
35 + break;
36 + default:
37 + return -EINVAL;
38 }
39 - return 0;
40 }
41 -
42 - if ((ic->ic_caps & IEEE80211_C_PMGT) == 0)
43 - return -EOPNOTSUPP;
44 - switch (wrq->flags & IW_POWER_MODE) {
45 - case IW_POWER_UNICAST_R:
46 - case IW_POWER_ALL_R:
47 - case IW_POWER_ON:
48 - ic->ic_flags |= IEEE80211_F_PMGTON;
49 - break;
50 - default:
51 - return -EINVAL;
52 - }
53 - if (wrq->flags & IW_POWER_TIMEOUT) {
54 - ic->ic_holdover = IEEE80211_MS_TO_TU(wrq->value);
55 - ic->ic_flags |= IEEE80211_F_PMGTON;
56 - }
57 - if (wrq->flags & IW_POWER_PERIOD) {
58 - ic->ic_lintval = IEEE80211_MS_TO_TU(wrq->value);
59 - ic->ic_flags |= IEEE80211_F_PMGTON;
60 - }
61 -done:
62 +
63 return IS_UP(ic->ic_dev) ? ic->ic_reset(ic->ic_dev) : 0;
64 }
65
66 @@ -2266,8 +2268,7 @@ ieee80211_ioctl_setparam(struct net_devi
67 if (vap->iv_opmode != IEEE80211_M_HOSTAP &&
68 vap->iv_opmode != IEEE80211_M_IBSS)
69 return -EINVAL;
70 - if (IEEE80211_BINTVAL_MIN <= value &&
71 - value <= IEEE80211_BINTVAL_MAX) {
72 + if (IEEE80211_BINTVAL_VALID(value)) {
73 ic->ic_lintval = value; /* XXX multi-bss */
74 retv = ENETRESET; /* requires restart */
75 } else
76 @@ -3300,7 +3301,8 @@ ieee80211_ioctl_setwmmparams(struct net_
77 {
78 struct ieee80211vap *vap = dev->priv;
79 int *param = (int *) extra;
80 - int ac = (param[1] < WME_NUM_AC) ? param[1] : WME_AC_BE;
81 + int ac = (param[1] >= 0 && param[1] < WME_NUM_AC) ?
82 + param[1] : WME_AC_BE;
83 int bss = param[2];
84 struct ieee80211_wme_state *wme = &vap->iv_ic->ic_wme;
85
86 @@ -3388,7 +3390,8 @@ ieee80211_ioctl_getwmmparams(struct net_
87 {
88 struct ieee80211vap *vap = dev->priv;
89 int *param = (int *) extra;
90 - int ac = (param[1] < WME_NUM_AC) ? param[1] : WME_AC_BE;
91 + int ac = (param[1] >= 0 && param[1] < WME_NUM_AC) ?
92 + param[1] : WME_AC_BE;
93 struct ieee80211_wme_state *wme = &vap->iv_ic->ic_wme;
94 struct chanAccParams *chanParams = (param[2] == 0) ?
95 &(wme->wme_chanParams) : &(wme->wme_bssChanParams);

root@freewrt.org:443
ViewVC Help
Powered by ViewVC 1.1.20