From: Emmanuel Grumbach Date: Tue, 6 May 2014 17:37:33 +0000 (+0300) Subject: Merge remote-tracking branch 'iwlwifi-fixes/master' into iwlwifi-next X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=939ecf6b14c46e3448411a934418311b492bfee4;p=openwrt%2Fstaging%2Fblogic.git Merge remote-tracking branch 'iwlwifi-fixes/master' into iwlwifi-next --- 939ecf6b14c46e3448411a934418311b492bfee4 diff --cc drivers/net/wireless/iwlwifi/mvm/rs.c index 7a332cb9c1ce,e1c838899363..857ddaf6f48c --- a/drivers/net/wireless/iwlwifi/mvm/rs.c +++ b/drivers/net/wireless/iwlwifi/mvm/rs.c @@@ -507,11 -524,9 +524,12 @@@ static void rs_rate_scale_clear_tbl_win { int i; + IWL_DEBUG_RATE(mvm, "Clearing up window stats\n"); for (i = 0; i < IWL_RATE_COUNT; i++) rs_rate_scale_clear_window(&tbl->win[i]); + + for (i = 0; i < ARRAY_SIZE(tbl->tpc_win); i++) + rs_rate_scale_clear_window(&tbl->tpc_win[i]); } static inline u8 rs_is_valid_ant(u8 valid_antenna, u8 ant_type) diff --cc drivers/net/wireless/iwlwifi/mvm/rs.h index 958c99d7e36e,0acfac96a56c..374a83d7db25 --- a/drivers/net/wireless/iwlwifi/mvm/rs.h +++ b/drivers/net/wireless/iwlwifi/mvm/rs.h @@@ -156,14 -156,8 +156,15 @@@ enum #define IWL_RATE_HIGH_TH 10880 /* 85% */ #define IWL_RATE_INCREASE_TH 6400 /* 50% */ #define RS_SR_FORCE_DECREASE 1920 /* 15% */ + #define RS_SR_NO_DECREASE 10880 /* 85% */ +#define TPC_SR_FORCE_INCREASE 9600 /* 75% */ +#define TPC_SR_NO_INCREASE 10880 /* 85% */ +#define TPC_TX_POWER_STEP 3 +#define TPC_MAX_REDUCTION 15 +#define TPC_NO_REDUCTION 0 +#define TPC_INVALID 0xff + #define LINK_QUAL_AGG_TIME_LIMIT_DEF (4000) /* 4 milliseconds */ #define LINK_QUAL_AGG_TIME_LIMIT_MAX (8000) #define LINK_QUAL_AGG_TIME_LIMIT_MIN (100) @@@ -329,12 -315,16 +331,18 @@@ struct iwl_lq_sta bool is_vht; enum ieee80211_band band; + struct rs_rate_stats tx_stats[RS_COLUMN_COUNT][IWL_RATE_COUNT]; + /* The following are bitmaps of rates; IWL_RATE_6M_MASK, etc. */ - u16 active_legacy_rate; - u16 active_siso_rate; - u16 active_mimo2_rate; + unsigned long active_legacy_rate; + unsigned long active_siso_rate; + unsigned long active_mimo2_rate; + + /* Highest rate per Tx mode */ + u8 max_legacy_rate_idx; + u8 max_siso_rate_idx; + u8 max_mimo2_rate_idx; + s8 max_rate_idx; /* Max rate set by user */ u8 missed_rate_counter;