[ath9k-devel] [patch] ath9k: indent an if statement

2016-08-03 Thread Dan Carpenter
It looks like this code is correct, but it just needs to be indented a bit. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index a394622..eb00724 100644 --- a/drivers/net/wireless/ath

Re: [ath9k-devel] [patch -next] ath9k: fix ath9k_hw_nvram_check_version()

2015-12-20 Thread Dan Carpenter
On Sun, Dec 20, 2015 at 11:05:55AM -0800, Joe Perches wrote: > On Sun, 2015-12-20 at 20:00 +0100, Julia Lawall wrote: > > On Sun, 20 Dec 2015, Joe Perches wrote: > > > > > On Sat, 2015-12-19 at 13:59 +0300, Dan Carpenter wrote: > > > > There is a t

[ath9k-devel] [patch -next] ath9k: fix ath9k_hw_nvram_check_version()

2015-12-19 Thread Dan Carpenter
There is a type bug so it always returns success. Fixes: 6fa658fd5ab2 ('ath9k: Simplify and fix eeprom endianness swapping') Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c index f

[ath9k-devel] [patch] ath9k_htc: check for underflow in ath9k_htc_rx_msg()

2015-11-06 Thread Dan Carpenter
We check for overflow here, but we don't check for underflow so it causes a static checker warning. Fixes: fb9987d0f748 ('ath9k_htc: Support for AR9271 chipset.') Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wi

Re: [ath9k-devel] ath9k_htc: Support for AR9271 chipset.

2015-08-11 Thread Dan Carpenter
msecs_to_jiffies(cal_interval)); 852 } regards, dan carpenter ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Re: [ath9k-devel] [patch] ath9k: fix some debugfs output

2014-10-29 Thread Dan Carpenter
On Wed, Oct 29, 2014 at 09:08:39AM -0700, Joe Perches wrote: On Wed, 2014-10-29 at 18:48 +0300, Dan Carpenter wrote: The right shift operation has higher precedence than the mask so we left shift by (i * 3) and then immediately right shift by (i * 3) then we mask. It should be left shift

[ath9k-devel] [patch] ath9k: fix some debugfs output

2014-10-29 Thread Dan Carpenter
The right shift operation has higher precedence than the mask so we left shift by (i * 3) and then immediately right shift by (i * 3) then we mask. It should be left shift, mask, and then right shift. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/net/wireless/ath

Re: [ath9k-devel] [patch] ath9k: fix some debugfs output

2014-10-29 Thread Dan Carpenter
On Wed, Oct 29, 2014 at 09:13:24AM -0700, Joe Perches wrote: On Wed, 2014-10-29 at 19:10 +0300, Dan Carpenter wrote: On Wed, Oct 29, 2014 at 09:08:39AM -0700, Joe Perches wrote: On Wed, 2014-10-29 at 18:48 +0300, Dan Carpenter wrote: The right shift operation has higher precedence than

Re: [ath9k-devel] ath9k: Add channel context worker thread

2014-06-20 Thread Dan Carpenter
code dereferences hchan unconditionally. 325 regards, dan carpenter ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Re: [ath9k-devel] ath9k: reduce baseband hang detection false positive rate

2014-02-28 Thread Dan Carpenter
: 1560 return true; 1561 } 1562 1563 udelay(1); ^ We never hit this recently added delay. 1564 } while (count-- 0); regards, dan carpenter

[ath9k-devel] [patch] ath9k: fix SC_OP_INVALID test in ath9k_tx99_init()

2013-11-05 Thread Dan Carpenter
SC_OP_INVALID is zero so the test is always false. We're supposed to be testing the lowest bit instead. Fixes: 89f927af7f33 ('ath9k: add TX99 support') Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k

Re: [ath9k-devel] [patch] ath9k: fix SC_OP_INVALID test in ath9k_tx99_init()

2013-11-05 Thread Dan Carpenter
On Wed, Nov 06, 2013 at 10:49:21AM +0530, Sujith Manoharan wrote: Dan Carpenter wrote: SC_OP_INVALID is zero so the test is always false. We're supposed to be testing the lowest bit instead. Fixes: 89f927af7f33 ('ath9k: add TX99 support') Signed-off-by: Dan Carpenter dan.carpen

Re: [ath9k-devel] ath9k: dfs move ath_dfs_pool_stats

2013-11-01 Thread Dan Carpenter
); 69 ATH9K_DFS_STAT(Radars detected , radar_detected); regards, dan carpenter ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel

[ath9k-devel] [patch] ath9k: use GFP_ATOMIC under spinlock

2013-04-16 Thread Dan Carpenter
() channel_detector_get() channel_detector_create() pri_detector_init() channel_detector_create() uses GFP_ATOMIC as well. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- Static analysis stuff. I haven't tested this but it looks like a real bug to me. diff --git a/drivers/net/wireless/ath

Re: [ath9k-devel] ath9k: Add concurrent WLAN and BT tx support for MCI based chips

2012-11-27 Thread Dan Carpenter
On Tue, Nov 27, 2012 at 01:58:35PM +0530, Rajkumar Manoharan wrote: On Tue, Nov 27, 2012 at 12:03:37AM +0300, Dan Carpenter wrote: Hello Rajkumar Manoharan, The patch db60428b1af1: ath9k: Add concurrent WLAN and BT tx support for MCI based chips from Oct 12, 2012, leads to the following

Re: [ath9k-devel] ath9k: Add concurrent WLAN and BT tx support for MCI based chips

2012-11-26 Thread Dan Carpenter
are reading one positition past the end of the array. 415 } Possibly we need to add some code to handle ATH_BTCOEX_STOMP_AUDIO which was added recently in 2884561a ath9k: stomp audio profiles on weak signal strength. regards, dan carpenter ___ ath9k

Re: [ath9k-devel] [RFC] ath9k_hw: precedence bug in ath9k_hw_set_ofdm_nil()

2012-04-10 Thread Dan Carpenter
this would make the code clearer. regards, dan carpenter ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel

[ath9k-devel] [patch] ath9k: cleanup a min_t() cast

2012-02-01 Thread Dan Carpenter
If the firmware was over 2G, it would cause memory corruption and the system would die here. Obviously we all know the firmware isn't going to be that large but static checkers get upset. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c

[ath9k-devel] [patch] ath9k_hw: min_t() casts u32 to int

2011-10-17 Thread Dan Carpenter
The code here treats very large values of limit as less than MAX_POWER_RATE because of the cast to int. We should do the compare as u32 instead. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index

[ath9k-devel] [patch] ath9k: remove some bogus error handling code

2011-10-05 Thread Dan Carpenter
If axq_qnum = ARRAY_SIZE(sc-tx.txq), then the call to ath9k_hw_releasetxqueue() would read beyond the end of the ah-txq[] array and possibly corrupt memory. Fortunately, ath9k_hw_setuptxqueue() doesn't return high values of axq_qnum and this code can be removed. Signed-off-by: Dan Carpenter

[ath9k-devel] [patch -next] ath9k: unlock on error path in ath9k_change_interface()

2010-12-20 Thread Dan Carpenter
There is a missing unlock when we hit the No beacon slot available error condition. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index cb53fbb..0ffa115 100644 --- a/drivers/net/wireless/ath/ath9k/main.c

[ath9k-devel] [patch -next] ath9k: snprintf() returns largish values

2010-07-22 Thread Dan Carpenter
The snprintf() function returns the number of characters that would have been written (not counting the NUL character on the end). It could potentially be larger than the size of the buffer. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/net/wireless/ath/ath9k

[ath9k-devel] [patch] ath9k: cleanup: remove unneeded null check

2010-05-22 Thread Dan Carpenter
We dereference wmi on the line before and also when we initialize ah. This check has always been after a dereference since the first commit a couple months ago. Looking through the code, it looks like wmi can't actually be null here so I just removed the check. Signed-off-by: Dan Carpenter erro

[ath9k-devel] [patch -next 1/2 v2] ath9k/debug: improve the snprintf() handling

2010-05-15 Thread Dan Carpenter
the read_file_rcstat() function added an explicit NULL terminator before calling snprintf(). That's unnecessary because snprintf() will add the null terminator automatically. Signed-off-by: Dan Carpenter erro...@gmail.com --- V2: Include NULL terminator in the buffer which gets copied to the user. Btw. I don't

[ath9k-devel] [patch -next 1/2] ath9k/debug: improve the snprintf() handling

2010-05-14 Thread Dan Carpenter
automatically. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 2ca9bba..f344128 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c @@ -41,7 +41,7 @@ static

[ath9k-devel] [patch -next 2/2] ath9k/debug: fixup the return codes

2010-05-14 Thread Dan Carpenter
Changed -EINVAL to -EFAULT if copy_to_user() failed. Changed 0 to -ENOMEM if allocations failed. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index f344128..3123d16 100644 --- a/drivers/net/wireless

Re: [ath9k-devel] [patch 2/9] ath9k: range checking issues in htc_hst.c

2010-05-10 Thread Dan Carpenter
On Mon, May 10, 2010 at 10:07:12AM +0530, Sujith wrote: Dan Carpenter wrote: The original code had ENDPOINT_MAX and HST_ENDPOINT_MAX switched. Hm, no. I'm afraid I don't understand. ENDPOINT_MAX is 22 and HST_ENDPOINT_MAX is 8. The htc_target struct is defined as having 8 endpoints

Re: [ath9k-devel] [patch 3/9] ath9k: cleanup: u32 = bool

2010-05-10 Thread Dan Carpenter
On Mon, May 10, 2010 at 09:38:26AM +0200, Johannes Berg wrote: On Sat, 2010-05-08 at 18:22 +0200, Dan Carpenter wrote: + bool on = param ? 1 : 0; umm, if you're going to use bool then use true/false too. johannes The 1 and 0 are used as array indexes so it looks funny to use

[ath9k-devel] [patch 3/9] ath9k: cleanup: u32 = bool

2010-05-08 Thread Dan Carpenter
This is used as a boolean variable so changing it to a boolean type is a cleanup. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c index b2c17c9..f685b8b 100644 --- a/drivers/net/wireless/ath

[ath9k-devel] signed vs unsigned bug in ath9k

2009-12-07 Thread Dan Carpenter
but it looks like someone may have chosen to have it signed on purpose. Another (uglier) option, is to declare ATH9K_RSSI_BAD like this: #define ATH9K_RSSI_BAD ((int8_t)0x80) regards, dan carpenter ___ ath9k-devel mailing list ath9k