From 2bbcb1d2dcd3cec58b316cd17046ff53cae6fce0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 24 Oct 2007 04:35:02 +0000 Subject: upgrade madwifi to r2756 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9422 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/madwifi/patches/125-tpc_PR_1435.patch | 100 -------------------------- 1 file changed, 100 deletions(-) delete mode 100644 package/madwifi/patches/125-tpc_PR_1435.patch (limited to 'package/madwifi/patches/125-tpc_PR_1435.patch') diff --git a/package/madwifi/patches/125-tpc_PR_1435.patch b/package/madwifi/patches/125-tpc_PR_1435.patch deleted file mode 100644 index 8df9d870fb..0000000000 --- a/package/madwifi/patches/125-tpc_PR_1435.patch +++ /dev/null @@ -1,100 +0,0 @@ -Index: madwifi-ng-r2568-20070710/ath/if_ath.c -=================================================================== ---- madwifi-ng-r2568-20070710.orig/ath/if_ath.c 2007-10-20 20:52:09.000000000 +0200 -+++ madwifi-ng-r2568-20070710/ath/if_ath.c 2007-10-20 20:53:00.000000000 +0200 -@@ -273,9 +273,7 @@ - static char *autocreate = NULL; - static char *ratectl = DEF_RATE_CTL; - static int rfkill = 0; --#ifdef ATH_CAP_TPC - static int tpc = 0; --#endif - static int countrycode = -1; - static int outdoor = -1; - static int xchanmode = -1; -@@ -533,12 +531,6 @@ - rfkill ? "on" : "off"); - ath_hal_setrfsilent(ah, rfkill); - --#ifdef ATH_CAP_TPC -- printk(KERN_INFO "ath_pci: ath_pci: switching per-packet transmit power control %s\n", -- tpc ? "on" : "off"); -- ath_hal_settpc(ah, tpc); --#endif -- - /* - * Setup rate tables for all potential media types. - */ -@@ -818,11 +810,18 @@ - */ - #ifdef ATH_CAP_TPC - sc->sc_hastpc = ath_hal_hastpc(ah); -- if (sc->sc_hastpc || ath_hal_hastxpowlimit(ah)) -+ if(tpc && !sc->sc_hastpc) { -+ printk(KERN_WARNING "ath_pci: WARNING: per-packet transmit power control was requested, but is not supported by the hardware.\n"); -+ tpc = 0; -+ } -+ printk(KERN_INFO "ath_pci: switching per-packet transmit power control %s\n", -+ tpc ? "on" : "off"); -+ ath_hal_settpc(ah, tpc); - #else - sc->sc_hastpc = 0; -- if (ath_hal_hastxpowlimit(ah)) -+ tpc = 0; /* TPC is always zero, when compiled without ATH_CAP_TPC */ - #endif -+ if (sc->sc_hastpc || ath_hal_hastxpowlimit(ah)) - ic->ic_caps |= IEEE80211_C_TXPMGT; - - /* -@@ -1836,7 +1835,7 @@ - ath_stop_locked(dev); - - #ifdef ATH_CAP_TPC -- /* Re-enable after suspend (?) */ -+ /* Re-enable after suspend */ - ath_hal_settpc(ah, tpc); - #endif - -@@ -8787,26 +8786,16 @@ - * Search for the VAP that needs a txpow change, if any - */ - TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { --#ifdef ATH_CAP_TPC -- if (ic->ic_newtxpowlimit == vap->iv_bss->ni_txpower) { -+ if (!tpc || ic->ic_newtxpowlimit >= vap->iv_bss->ni_txpower) { - vap->iv_bss->ni_txpower = clamped_txpow; - ieee80211_iterate_nodes(&vap->iv_ic->ic_sta, set_node_txpower, &clamped_txpow); - } --#else -- vap->iv_bss->ni_txpower = clamped_txpow; -- ieee80211_iterate_nodes(&vap->iv_ic->ic_sta, set_node_txpower, &clamped_txpow); --#endif - } - -- ic->ic_newtxpowlimit = sc->sc_curtxpow = clamped_txpow; -+ sc->sc_curtxpow = clamped_txpow; - --#ifdef ATH_CAP_TPC -- if (ic->ic_newtxpowlimit >= txpowlimit) -- ath_hal_settxpowlimit(ah, ic->ic_newtxpowlimit); --#else -- if (ic->ic_newtxpowlimit != txpowlimit) -- ath_hal_settxpowlimit(ah, ic->ic_newtxpowlimit); --#endif -+ if (clamped_txpow != txpowlimit) -+ ath_hal_settxpowlimit(ah, clamped_txpow); - } - - -Index: madwifi-ng-r2568-20070710/net80211/ieee80211_wireless.c -=================================================================== ---- madwifi-ng-r2568-20070710.orig/net80211/ieee80211_wireless.c 2007-10-20 20:51:37.000000000 +0200 -+++ madwifi-ng-r2568-20070710/net80211/ieee80211_wireless.c 2007-10-20 20:52:29.000000000 +0200 -@@ -1403,6 +1403,7 @@ - } else { - if (!fixed) /* no change */ - return 0; -+ ic->ic_newtxpowlimit = IEEE80211_TXPOWER_MAX; - ic->ic_flags &= ~IEEE80211_F_TXPOW_FIXED; - } - done: -- cgit v1.2.3