build: create pkginfo dir earlier to avoid build breakage
[openwrt/svn-archive/archive.git] / package / madwifi / patches / 464-0dbm_txpower_fix.patch
1 --- a/net80211/ieee80211_wireless.c
2 +++ b/net80211/ieee80211_wireless.c
3 @@ -1370,15 +1370,9 @@ ieee80211_ioctl_siwtxpow(struct net_devi
4 int fixed, disabled;
5
6 fixed = (ic->ic_flags & IEEE80211_F_TXPOW_FIXED);
7 - disabled = (fixed && ic->ic_txpowlimit == 0);
8 - if (rrq->disabled) {
9 - if (!disabled) {
10 - ic->ic_flags |= IEEE80211_F_TXPOW_FIXED;
11 - ic->ic_txpowlimit = 0;
12 - goto done;
13 - }
14 - return 0;
15 - }
16 +
17 + if (rrq->disabled)
18 + return -EINVAL;
19
20 if (rrq->fixed) {
21 if ((ic->ic_caps & IEEE80211_C_TXPMGT) == 0)
22 @@ -1571,7 +1565,7 @@ ieee80211_ioctl_giwtxpow(struct net_devi
23 rrq->fixed = 0;
24 }
25 rrq->value = txp / 2;
26 - rrq->disabled = (rrq->fixed && rrq->value == 0);
27 + rrq->disabled = 0;
28 rrq->flags = IW_TXPOW_DBM;
29 return 0;
30 }