All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] ath9k: fix firmware bug in some of Mikrotik R11e-2HPnD cards
@ 2019-12-27  7:18 Denis Kalashnikov
  2020-01-10  8:27 ` Kalle Valo
  0 siblings, 1 reply; 4+ messages in thread
From: Denis Kalashnikov @ 2019-12-27  7:18 UTC (permalink / raw)
  To: linux-wireless; +Cc: kvalo

Some of the Mikrotik R11e-2HPnD cards have EEPROM where is
flashed that a card has 3 chains, but actually all this cards
have only 2. This leads ath9k to write periodically into the logs:
'ath: phy0: Unable to reset channel, reset status -5' and
stations don't see that AP.

Mikrotik R11e-2HPnD is based on AR9582 chip.

Signed-off-by: Denis Kalashnikov <denis281089@gmail.com>
---
 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index b4885a700296..554a81400648 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -3373,6 +3373,15 @@ static int
ar9300_eeprom_restore_internal(struct ath_hw *ah,
                cptr -= (COMP_HDR_LEN + osize + COMP_CKSUM_LEN);
        }

+       /**
+        * Fix firmware bug of some Mikrotik R11e-2HPnD cards (based on AR9582)
+        * that claim that they have 3 chains, but actually have only 2.
+        */
+       if (AR_SREV_9580(ah)) {
+               eep = (struct ar9300_eeprom *)mptr;
+               eep->baseEepHeader.txrxMask &= 0x33;
+       }
+
        kfree(word);
        return cptr;

-- 
2.23.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] ath9k: fix firmware bug in some of Mikrotik R11e-2HPnD cards
  2019-12-27  7:18 [PATCH 1/1] ath9k: fix firmware bug in some of Mikrotik R11e-2HPnD cards Denis Kalashnikov
@ 2020-01-10  8:27 ` Kalle Valo
  2020-01-10 11:37   ` Denis Kalashnikov
  2020-01-10 11:38   ` Tom Psyborg
  0 siblings, 2 replies; 4+ messages in thread
From: Kalle Valo @ 2020-01-10  8:27 UTC (permalink / raw)
  To: Denis Kalashnikov; +Cc: linux-wireless

Denis Kalashnikov <denis281089@gmail.com> writes:

> Some of the Mikrotik R11e-2HPnD cards have EEPROM where is
> flashed that a card has 3 chains, but actually all this cards
> have only 2. This leads ath9k to write periodically into the logs:
> 'ath: phy0: Unable to reset channel, reset status -5' and
> stations don't see that AP.
>
> Mikrotik R11e-2HPnD is based on AR9582 chip.
>
> Signed-off-by: Denis Kalashnikov <denis281089@gmail.com>
> ---
>  drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> index b4885a700296..554a81400648 100644
> --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> @@ -3373,6 +3373,15 @@ static int
> ar9300_eeprom_restore_internal(struct ath_hw *ah,
>                 cptr -= (COMP_HDR_LEN + osize + COMP_CKSUM_LEN);
>         }
>
> +       /**
> +        * Fix firmware bug of some Mikrotik R11e-2HPnD cards (based on AR9582)
> +        * that claim that they have 3 chains, but actually have only 2.
> +        */
> +       if (AR_SREV_9580(ah)) {
> +               eep = (struct ar9300_eeprom *)mptr;
> +               eep->baseEepHeader.txrxMask &= 0x33;
> +       }

What about 9580 devices which really have 3 chains, doesn't this broke
those? Or is such setup impossible?

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] ath9k: fix firmware bug in some of Mikrotik R11e-2HPnD cards
  2020-01-10  8:27 ` Kalle Valo
@ 2020-01-10 11:37   ` Denis Kalashnikov
  2020-01-10 11:38   ` Tom Psyborg
  1 sibling, 0 replies; 4+ messages in thread
From: Denis Kalashnikov @ 2020-01-10 11:37 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless

You are right, it is possible. I will fix my patch and resend. Thank you.

пт, 10 янв. 2020 г. в 11:27, Kalle Valo <kvalo@codeaurora.org>:
>
> Denis Kalashnikov <denis281089@gmail.com> writes:
>
> > Some of the Mikrotik R11e-2HPnD cards have EEPROM where is
> > flashed that a card has 3 chains, but actually all this cards
> > have only 2. This leads ath9k to write periodically into the logs:
> > 'ath: phy0: Unable to reset channel, reset status -5' and
> > stations don't see that AP.
> >
> > Mikrotik R11e-2HPnD is based on AR9582 chip.
> >
> > Signed-off-by: Denis Kalashnikov <denis281089@gmail.com>
> > ---
> >  drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> > b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> > index b4885a700296..554a81400648 100644
> > --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> > +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> > @@ -3373,6 +3373,15 @@ static int
> > ar9300_eeprom_restore_internal(struct ath_hw *ah,
> >                 cptr -= (COMP_HDR_LEN + osize + COMP_CKSUM_LEN);
> >         }
> >
> > +       /**
> > +        * Fix firmware bug of some Mikrotik R11e-2HPnD cards (based on AR9582)
> > +        * that claim that they have 3 chains, but actually have only 2.
> > +        */
> > +       if (AR_SREV_9580(ah)) {
> > +               eep = (struct ar9300_eeprom *)mptr;
> > +               eep->baseEepHeader.txrxMask &= 0x33;
> > +       }
>
> What about 9580 devices which really have 3 chains, doesn't this broke
> those? Or is such setup impossible?
>
> --
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] ath9k: fix firmware bug in some of Mikrotik R11e-2HPnD cards
  2020-01-10  8:27 ` Kalle Valo
  2020-01-10 11:37   ` Denis Kalashnikov
@ 2020-01-10 11:38   ` Tom Psyborg
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Psyborg @ 2020-01-10 11:38 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Denis Kalashnikov, linux-wireless

On 10/01/2020, Kalle Valo <kvalo@codeaurora.org> wrote:
> Denis Kalashnikov <denis281089@gmail.com> writes:
>
>> Some of the Mikrotik R11e-2HPnD cards have EEPROM where is
>> flashed that a card has 3 chains, but actually all this cards
>> have only 2. This leads ath9k to write periodically into the logs:
>> 'ath: phy0: Unable to reset channel, reset status -5' and
>> stations don't see that AP.
>>
>> Mikrotik R11e-2HPnD is based on AR9582 chip.
>>
>> Signed-off-by: Denis Kalashnikov <denis281089@gmail.com>
>> ---
>>  drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
>> b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
>> index b4885a700296..554a81400648 100644
>> --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
>> +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
>> @@ -3373,6 +3373,15 @@ static int
>> ar9300_eeprom_restore_internal(struct ath_hw *ah,
>>                 cptr -= (COMP_HDR_LEN + osize + COMP_CKSUM_LEN);
>>         }
>>
>> +       /**
>> +        * Fix firmware bug of some Mikrotik R11e-2HPnD cards (based on
>> AR9582)
>> +        * that claim that they have 3 chains, but actually have only 2.
>> +        */
>> +       if (AR_SREV_9580(ah)) {
>> +               eep = (struct ar9300_eeprom *)mptr;
>> +               eep->baseEepHeader.txrxMask &= 0x33;
>> +       }
>
> What about 9580 devices which really have 3 chains, doesn't this broke
> those? Or is such setup impossible?
>
> --
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
>

See this:
https://openwrt.org/_media/media/tplink/tl-wdr4310/tl-wdr4310_11.jpg

This commit would definitely break it. The fix should involve PCI sub
id of the miktrotik card

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-01-10 11:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-27  7:18 [PATCH 1/1] ath9k: fix firmware bug in some of Mikrotik R11e-2HPnD cards Denis Kalashnikov
2020-01-10  8:27 ` Kalle Valo
2020-01-10 11:37   ` Denis Kalashnikov
2020-01-10 11:38   ` Tom Psyborg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.