diff options
author | blogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-10-05 10:12:53 +0000 |
---|---|---|
committer | blogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-10-05 10:12:53 +0000 |
commit | 5c105d9f3fd086aff195d3849dcf847d6b0bd927 (patch) | |
tree | 1229a11f725bfa58aa7c57a76898553bb5f6654a /package/madwifi/patches/417-beacon_txpower.patch | |
download | openwrt-5c105d9f3fd086aff195d3849dcf847d6b0bd927.tar.gz openwrt-5c105d9f3fd086aff195d3849dcf847d6b0bd927.zip |
branch Attitude Adjustment
git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@33625 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/madwifi/patches/417-beacon_txpower.patch')
-rw-r--r-- | package/madwifi/patches/417-beacon_txpower.patch | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/package/madwifi/patches/417-beacon_txpower.patch b/package/madwifi/patches/417-beacon_txpower.patch new file mode 100644 index 000000000..8a59c1211 --- /dev/null +++ b/package/madwifi/patches/417-beacon_txpower.patch @@ -0,0 +1,81 @@ +--- a/ath/if_ath.c ++++ b/ath/if_ath.c +@@ -395,7 +395,7 @@ static int bstuck_thresh = BSTUCK_THRESH + static char *autocreate = NULL; + static char *ratectl = DEF_RATE_CTL; + static int rfkill = 0; +-static int tpc = 0; ++static int tpc = 1; + static int countrycode = -1; + static int maxvaps = -1; + static int outdoor = -1; +@@ -4932,6 +4932,7 @@ ath_beacon_setup(struct ath_softc *sc, s + (((_ic)->ic_flags & (IEEE80211_F_SHPREAMBLE | IEEE80211_F_USEBARKER))\ + == IEEE80211_F_SHPREAMBLE) + struct ieee80211com *ic = bf->bf_node->ni_ic; ++ struct ieee80211vap *vap = bf->bf_node->ni_vap; + struct sk_buff *skb = bf->bf_skb; + struct ath_hal *ah = sc->sc_ah; + struct ath_desc *ds; +@@ -4999,7 +5000,7 @@ ath_beacon_setup(struct ath_softc *sc, s + skb->len + IEEE80211_CRC_LEN, /* frame length */ + sizeof(struct ieee80211_frame), /* header length */ + HAL_PKT_TYPE_BEACON, /* Atheros packet type */ +- bf->bf_node->ni_txpower, /* txpower XXX */ ++ (vap->iv_beacon_txpow ? vap->iv_beacon_txpow : 63), + rate, 1, /* series 0 rate/tries */ + HAL_TXKEYIX_INVALID, /* no encryption */ + antenna, /* antenna mode */ +--- a/net80211/ieee80211_ioctl.h ++++ b/net80211/ieee80211_ioctl.h +@@ -652,6 +652,7 @@ enum { + IEEE80211_PARAM_WDS_SEP = 82, /* move wds stations into separate interfaces */ + IEEE80211_PARAM_MAXASSOC = 83, /* maximum associated stations */ + IEEE80211_PARAM_PROBEREQ = 84, /* enable handling of probe requests */ ++ IEEE80211_PARAM_BEACON_TXP = 85, /* set beacon tx power */ + }; + + #define SIOCG80211STATS (SIOCDEVPRIVATE+2) +--- a/net80211/ieee80211_var.h ++++ b/net80211/ieee80211_var.h +@@ -254,6 +254,7 @@ struct ieee80211vap { + u_int8_t iv_dtim_period; /* DTIM period */ + u_int8_t iv_dtim_count; /* DTIM count from last bcn */ + /* set/unset aid pwrsav state */ ++ u_int8_t iv_beacon_txpow; /* beacon tx power */ + void (*iv_set_tim)(struct ieee80211_node *, int); + u_int8_t iv_uapsdinfo; /* sta mode QoS Info flags */ + struct ieee80211_node *iv_bss; /* information for this node */ +--- a/net80211/ieee80211_wireless.c ++++ b/net80211/ieee80211_wireless.c +@@ -2871,6 +2871,9 @@ ieee80211_ioctl_setparam(struct net_devi + case IEEE80211_PARAM_PROBEREQ: + vap->iv_no_probereq = !value; + break; ++ case IEEE80211_PARAM_BEACON_TXP: ++ vap->iv_beacon_txpow = value; ++ break; + #ifdef ATH_REVERSE_ENGINEERING + case IEEE80211_PARAM_DUMPREGS: + ieee80211_dump_registers(dev, info, w, extra); +@@ -3236,6 +3239,9 @@ ieee80211_ioctl_getparam(struct net_devi + case IEEE80211_PARAM_PROBEREQ: + param[0] = !vap->iv_no_probereq; + break; ++ case IEEE80211_PARAM_BEACON_TXP: ++ param[0] = vap->iv_beacon_txpow; ++ break; + default: + return -EOPNOTSUPP; + } +@@ -5810,6 +5816,10 @@ static const struct iw_priv_args ieee802 + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "probereq"}, + { IEEE80211_PARAM_PROBEREQ, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_probereq"}, ++ { IEEE80211_PARAM_BEACON_TXP, ++ IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "beacon_pwr"}, ++ { IEEE80211_PARAM_BEACON_TXP, ++ 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_beacon_pwr"}, + + #ifdef ATH_REVERSE_ENGINEERING + /* |