[ath6kl:pending 12/14] drivers/net/wireless/ath/ath9k/calib.c:270 ath9k_hw_loadnf() error: buffer overflow 'ath9k_hw_get_nf_limits(ah, chan)->cal' 3 <= 5

2018-01-30 Thread Dan Carpenter
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git pending
head:   e5ff4344eab68c86e00036e937847ce89dfaeef6
commit: 15511de6d14c8b947499c3546a40181221b272fe [12/14] ath9k: Use calibrated 
noise floor value when available

smatch warnings:
drivers/net/wireless/ath/ath9k/calib.c:270 ath9k_hw_loadnf() error: buffer 
overflow 'ath9k_hw_get_nf_limits(ah, chan)->cal' 3 <= 5

# 
https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?id=15511de6d14c8b947499c3546a40181221b272fe
git remote add ath6kl 
https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
git remote update ath6kl
git checkout 15511de6d14c8b947499c3546a40181221b272fe
vim +270 drivers/net/wireless/ath/ath9k/calib.c

f1dc56003 drivers/net/wireless/ath9k/calib.c Sujith 2008-10-29  
242  
7b8aaead9 drivers/net/wireless/ath/ath9k/calib.c Felix Fietkau  2014-10-25  
243  int ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan)
bbacee13f drivers/net/wireless/ath/ath9k/calib.c Felix Fietkau  2010-07-11  
244  {
20bd2a095 drivers/net/wireless/ath/ath9k/calib.c Felix Fietkau  2010-07-31  
245 struct ath9k_nfcal_hist *h = NULL;
bbacee13f drivers/net/wireless/ath/ath9k/calib.c Felix Fietkau  2010-07-11  
246 unsigned i, j;
487f0e010 drivers/net/wireless/ath/ath9k/calib.c Felix Fietkau  2010-07-23  
247 u8 chainmask = (ah->rxchainmask << 3) | ah->rxchainmask;
bbacee13f drivers/net/wireless/ath/ath9k/calib.c Felix Fietkau  2010-07-11  
248 struct ath_common *common = ath9k_hw_common(ah);
15511de6d drivers/net/wireless/ath/ath9k/calib.c Wojciech Dubowik   2018-01-24  
249 s16 default_nf = ath9k_hw_get_nf_limits(ah, chan)->nominal;
82def495d drivers/net/wireless/ath/ath9k/calib.c Miaoqing Pan   2016-02-05  
250 u32 bb_agc_ctl = REG_READ(ah, AR_PHY_AGC_CONTROL);
bbacee13f drivers/net/wireless/ath/ath9k/calib.c Felix Fietkau  2010-07-11  
251  
20bd2a095 drivers/net/wireless/ath/ath9k/calib.c Felix Fietkau  2010-07-31  
252 if (ah->caldata)
20bd2a095 drivers/net/wireless/ath/ath9k/calib.c Felix Fietkau  2010-07-31  
253 h = ah->caldata->nfCalHist;
bbacee13f drivers/net/wireless/ath/ath9k/calib.c Felix Fietkau  2010-07-11  
254  
9830ba6c9 drivers/net/wireless/ath/ath9k/calib.c Oleksij Rempel 2015-03-22  
255 ENABLE_REG_RMW_BUFFER(ah);
bbacee13f drivers/net/wireless/ath/ath9k/calib.c Felix Fietkau  2010-07-11  
256 for (i = 0; i < NUM_NF_READINGS; i++) {


i < 6

bbacee13f drivers/net/wireless/ath/ath9k/calib.c Felix Fietkau  2010-07-11  
257 if (chainmask & (1 << i)) {
20bd2a095 drivers/net/wireless/ath/ath9k/calib.c Felix Fietkau  2010-07-31  
258 s16 nfval;
20bd2a095 drivers/net/wireless/ath/ath9k/calib.c Felix Fietkau  2010-07-31  
259  
e4744ec78 drivers/net/wireless/ath/ath9k/calib.c Felix Fietkau  2013-10-11  
260 if ((i >= AR5416_MAX_CHAINS) && !IS_CHAN_HT40(chan))

 ^^^
This is a limit test, but the "&& !IS_CHAN_HT40(chan)" means that i can
be up to 5.

28ef6450f drivers/net/wireless/ath/ath9k/calib.c Rajkumar Manoharan 2011-05-04  
261 continue;
28ef6450f drivers/net/wireless/ath/ath9k/calib.c Rajkumar Manoharan 2011-05-04  
262  
b90189759 drivers/net/wireless/ath/ath9k/calib.c Simon Wunderlich   2017-03-23  
263 if (ah->nf_override)
b90189759 drivers/net/wireless/ath/ath9k/calib.c Simon Wunderlich   2017-03-23  
264 nfval = ah->nf_override;
b90189759 drivers/net/wireless/ath/ath9k/calib.c Simon Wunderlich   2017-03-23  
265 else if (h)
20bd2a095 drivers/net/wireless/ath/ath9k/calib.c Felix Fietkau  2010-07-31  
266 nfval = h[i].privNF;
15511de6d drivers/net/wireless/ath/ath9k/calib.c Wojciech Dubowik   2018-01-24  
267 else {
15511de6d drivers/net/wireless/ath/ath9k/calib.c Wojciech Dubowik   2018-01-24  
268 /* Try to get calibrated noise floor value */
15511de6d drivers/net/wireless/ath/ath9k/calib.c Wojciech Dubowik   2018-01-24  
269 nfval =
15511de6d drivers/net/wireless/ath/ath9k/calib.c Wojciech Dubowik   2018-01-24 
@270 ath9k_hw_get_nf_limits(ah, chan)->cal[i];
15511de6d drivers/net/wireless/ath/ath9k/calib.c Wojciech Dubowik   2018-01-24  
271 if (nfval > -60 || nfval < -127)
20bd2a095 drivers/net/wireless/ath/ath9k/calib.c Felix Fietkau  2010-07-31  
272 nfval = default_nf;
15511de6d drivers/net/wireless/ath/ath9k/calib.c Wojciech Dubowik   2018-01-24  
273  

Single rate issues in QCA988x based device

2018-01-30 Thread KAVITA MATHUR
Hi,

WLE600VX (2x2 MIMO, QCA9888x chipset) is used as WiFi module in my access 
point. I am
working on certification project of this system, there I need to fix single 
rate in all
the legacy, HT and VHT modes for 20MHz and 40MHz channels.

There are two problems observed during this test:

1. 9Mbps legacy rate is always set to 24Mbps in g mode. While in a mode it is 
set as
9Mbps.What can be the issue, firmware or driver? any suggestions to see this 
issue?

2. Not able to set Short GI for 40MHz channels for all the MCS except MCS 7 and 
15. What
cab be the reason for this. again, where should I suspect?..firmware or driver? 
Please
help on this.


ath10k version : git 16 oct 2017(v4.14-rc2-1-24-gc6db471)
firmware version : firmware-5.bin_10.2.4.70.66
Kernel version : 3.12


Thanks & Regards,
Kavita

___
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k