From: John W. Linville Date: Tue, 22 Apr 2014 19:01:24 +0000 (-0400) Subject: Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwif... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bf4c69f7dd8e0c3427262cc11652227ec7256a75;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git Merge branch 'master' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next --- bf4c69f7dd8e0c3427262cc11652227ec7256a75 diff --cc drivers/net/wireless/iwlwifi/mvm/rs.c index 9f52c5b3f0ec,7a332cb9c1ce..d44b2b33b5cc --- a/drivers/net/wireless/iwlwifi/mvm/rs.c +++ b/drivers/net/wireless/iwlwifi/mvm/rs.c @@@ -524,9 -507,11 +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 0acfac96a56c,958c99d7e36e..374a83d7db25 --- a/drivers/net/wireless/iwlwifi/mvm/rs.h +++ b/drivers/net/wireless/iwlwifi/mvm/rs.h @@@ -156,8 -156,14 +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) @@@ -315,16 -329,12 +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;