[ath9k-devel] [PATCH] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation

Oleksij Rempel <[email protected]>
Newsgroups org.ath9k.lists.ath9k-devel,org.kernel.vger.linux-wireless
Message-ID <[email protected]>
Am 15.04.2016 um 22:59 schrieb Bob Copeland:
> On Tue, Apr 12, 2016 at 07:37:44PM +0200, Oleksij Rempel wrote:
>> by moving common code to ar5008_hw_cmn_spur_mitigate i forgot to move
>> mask_m & mask_p initialisation. This coused a performance regression
>> on ar9281.
>>
>> Fixes: f911085ffa88 ("ath9k: split ar5008_hw_spur_mitigate and reuse common code in ar9002_hw_spur_mitigate.")
>> Reported-by: Gustav Frederiksen <[email protected]>
>> Tested-by: Gustav Frederiksen <[email protected]>
>> Signed-off-by: Oleksij Rempel <[email protected]>
>> ---
>>  drivers/net/wireless/ath/ath9k/ar5008_phy.c | 8 +++-----
>>  drivers/net/wireless/ath/ath9k/ar9002_phy.c | 5 -----
>>  2 files changed, 3 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
>> index 8f87930..1b271b9 100644
>> --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
>> +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
>> @@ -274,6 +274,9 @@ void ar5008_hw_cmn_spur_mitigate(struct ath_hw *ah,
>>  	};
>>  	static const int inc[4] = { 0, 100, 0, 0 };
>>  
>> +	memset(&mask_m, 0, sizeof(int8_t) * 123);
>> +	memset(&mask_p, 0, sizeof(int8_t) * 123);
>> +
> 
> For a future patch, "sizeof(mask_m)" or even just:
> 
>     u8 mask_m[123] = {0};
> 
> ... would be better here.  I looked at this bit and thought, no way is
> "123" actually correct.  Lo and behold, that is actually the number of
> array elements, whether that has a basis in something real or not :)

If you already on it can you please rework it on top of this patch?
This complete function can be probably reworked.

-- 
Regards,
Oleksij

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
Url : http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20160416/bc3401c0/attachment.pgp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.