* [ath9k-devel] [PATCH] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation
[not found] <120e427452ad7e93f17828e8bba4b043@openmailbox.org>
@ 2016-04-12 17:37 ` Oleksij Rempel
2016-04-13 9:41 ` Kalle Valo
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Oleksij Rempel @ 2016-04-12 17:37 UTC (permalink / raw)
To: ath9k-devel
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 <lkml2017@openmailbox.org>
Tested-by: Gustav Frederiksen <lkml2017@openmailbox.org>
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
---
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);
+
cur_bin = -6000;
upper = bin + 100;
lower = bin - 100;
@@ -424,14 +427,9 @@ static void ar5008_hw_spur_mitigate(struct ath_hw *ah,
int tmp, new;
int i;
- int8_t mask_m[123];
- int8_t mask_p[123];
int cur_bb_spur;
bool is2GHz = IS_CHAN_2GHZ(chan);
- memset(&mask_m, 0, sizeof(int8_t) * 123);
- memset(&mask_p, 0, sizeof(int8_t) * 123);
-
for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) {
cur_bb_spur = ah->eep_ops->get_spur_channel(ah, i, is2GHz);
if (AR_NO_SPUR == cur_bb_spur)
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_phy.c b/drivers/net/wireless/ath/ath9k/ar9002_phy.c
index db66245..53d7445 100644
--- a/drivers/net/wireless/ath/ath9k/ar9002_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.c
@@ -178,14 +178,9 @@ static void ar9002_hw_spur_mitigate(struct ath_hw *ah,
int i;
struct chan_centers centers;
- int8_t mask_m[123];
- int8_t mask_p[123];
int cur_bb_spur;
bool is2GHz = IS_CHAN_2GHZ(chan);
- memset(&mask_m, 0, sizeof(int8_t) * 123);
- memset(&mask_p, 0, sizeof(int8_t) * 123);
-
ath9k_hw_get_channel_centers(ah, chan, ¢ers);
freq = centers.synth_center;
--
2.5.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [ath9k-devel] [PATCH] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation
2016-04-12 17:37 ` [ath9k-devel] [PATCH] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation Oleksij Rempel
@ 2016-04-13 9:41 ` Kalle Valo
2016-04-13 9:45 ` Kalle Valo
2016-04-15 18:05 ` [ath9k-devel] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_pinitialisation Kalle Valo
2016-04-15 20:59 ` [ath9k-devel] [PATCH] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation Bob Copeland
2 siblings, 1 reply; 8+ messages in thread
From: Kalle Valo @ 2016-04-13 9:41 UTC (permalink / raw)
To: ath9k-devel
Oleksij Rempel <linux@rempel-privat.de> writes:
> 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 <lkml2017@openmailbox.org>
> Tested-by: Gustav Frederiksen <lkml2017@openmailbox.org>
> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
If no objections I'm planning to send this to 4.6.
--
Kalle Valo
^ permalink raw reply [flat|nested] 8+ messages in thread
* [ath9k-devel] [PATCH] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation
2016-04-13 9:41 ` Kalle Valo
@ 2016-04-13 9:45 ` Kalle Valo
2016-04-13 16:45 ` Oleksij Rempel
0 siblings, 1 reply; 8+ messages in thread
From: Kalle Valo @ 2016-04-13 9:45 UTC (permalink / raw)
To: ath9k-devel
Kalle Valo <kvalo@codeaurora.org> writes:
> Oleksij Rempel <linux@rempel-privat.de> writes:
>
>> 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 <lkml2017@openmailbox.org>
>> Tested-by: Gustav Frederiksen <lkml2017@openmailbox.org>
>> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
>
> If no objections I'm planning to send this to 4.6.
Should we also CC stable (4.2+)? I can add that before I commit the
patch.
--
Kalle Valo
^ permalink raw reply [flat|nested] 8+ messages in thread
* [ath9k-devel] [PATCH] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation
2016-04-13 9:45 ` Kalle Valo
@ 2016-04-13 16:45 ` Oleksij Rempel
0 siblings, 0 replies; 8+ messages in thread
From: Oleksij Rempel @ 2016-04-13 16:45 UTC (permalink / raw)
To: ath9k-devel
Am 13.04.2016 um 11:45 schrieb Kalle Valo:
> Kalle Valo <kvalo@codeaurora.org> writes:
>
>> Oleksij Rempel <linux@rempel-privat.de> writes:
>>
>>> 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 <lkml2017@openmailbox.org>
>>> Tested-by: Gustav Frederiksen <lkml2017@openmailbox.org>
>>> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
>>
>> If no objections I'm planning to send this to 4.6.
>
> Should we also CC stable (4.2+)? I can add that before I commit the
> patch.
>
Yes, please.
Thank you.
--
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/20160413/37abbfd1/attachment.pgp
^ permalink raw reply [flat|nested] 8+ messages in thread
* [ath9k-devel] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_pinitialisation
2016-04-12 17:37 ` [ath9k-devel] [PATCH] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation Oleksij Rempel
2016-04-13 9:41 ` Kalle Valo
@ 2016-04-15 18:05 ` Kalle Valo
2016-04-15 20:59 ` [ath9k-devel] [PATCH] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation Bob Copeland
2 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2016-04-15 18:05 UTC (permalink / raw)
To: ath9k-devel
> 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 <lkml2017@openmailbox.org>
> Tested-by: Gustav Frederiksen <lkml2017@openmailbox.org>
> Cc: <stable@vger.kernel.org> # 4.2+
> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Thanks, applied to wireless-drivers.git.
Kalle Valo
^ permalink raw reply [flat|nested] 8+ messages in thread
* [ath9k-devel] [PATCH] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation
2016-04-12 17:37 ` [ath9k-devel] [PATCH] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation Oleksij Rempel
2016-04-13 9:41 ` Kalle Valo
2016-04-15 18:05 ` [ath9k-devel] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_pinitialisation Kalle Valo
@ 2016-04-15 20:59 ` Bob Copeland
2016-04-16 6:01 ` Oleksij Rempel
2 siblings, 1 reply; 8+ messages in thread
From: Bob Copeland @ 2016-04-15 20:59 UTC (permalink / raw)
To: ath9k-devel
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 <lkml2017@openmailbox.org>
> Tested-by: Gustav Frederiksen <lkml2017@openmailbox.org>
> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
> ---
> 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 :)
--
Bob Copeland %% http://bobcopeland.com/
^ permalink raw reply [flat|nested] 8+ messages in thread
* [ath9k-devel] [PATCH] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation
2016-04-15 20:59 ` [ath9k-devel] [PATCH] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation Bob Copeland
@ 2016-04-16 6:01 ` Oleksij Rempel
2016-04-16 14:53 ` Bob Copeland
0 siblings, 1 reply; 8+ messages in thread
From: Oleksij Rempel @ 2016-04-16 6:01 UTC (permalink / raw)
To: ath9k-devel
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 <lkml2017@openmailbox.org>
>> Tested-by: Gustav Frederiksen <lkml2017@openmailbox.org>
>> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
>> ---
>> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [ath9k-devel] [PATCH] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation
2016-04-16 6:01 ` Oleksij Rempel
@ 2016-04-16 14:53 ` Bob Copeland
0 siblings, 0 replies; 8+ messages in thread
From: Bob Copeland @ 2016-04-16 14:53 UTC (permalink / raw)
To: ath9k-devel
On Sat, Apr 16, 2016 at 08:01:59AM +0200, Oleksij Rempel wrote:
> > 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.
I wasn't on it, but yeah I'll send a patch on top of this momentarily :)
--
Bob Copeland %% http://bobcopeland.com/
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-04-16 14:53 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <120e427452ad7e93f17828e8bba4b043@openmailbox.org>
2016-04-12 17:37 ` [ath9k-devel] [PATCH] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation Oleksij Rempel
2016-04-13 9:41 ` Kalle Valo
2016-04-13 9:45 ` Kalle Valo
2016-04-13 16:45 ` Oleksij Rempel
2016-04-15 18:05 ` [ath9k-devel] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_pinitialisation Kalle Valo
2016-04-15 20:59 ` [ath9k-devel] [PATCH] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation Bob Copeland
2016-04-16 6:01 ` Oleksij Rempel
2016-04-16 14:53 ` Bob Copeland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).