From: Gabor Juhos <juhosg@openwrt.org>
To: Sujith Manoharan <sujith@msujith.org>, linux-wireless@vger.kernel.org
Cc: ath9k-devel@lists.ath9k.org
Subject: Re: [RFC 08/12] ath9k: Use a separate TX gain table for WZR-HP-G450H
Date: Thu, 05 Dec 2013 11:19:17 +0100 [thread overview]
Message-ID: <52A05325.2070501@openwrt.org> (raw)
In-Reply-To: <1386233177-11132-9-git-send-email-sujith@msujith.org>
2013.12.05. 9:46 keltezéssel, Sujith Manoharan írta:
> From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
>
> The Buffalo device WZR-HP-G450H uses the index 3 for TX gain,
> which is set to the high_power table currently. Later variants
> of the router use the same index, but instead refer to the
> low_ob_db gain table. This is not handled in the driver since
> there is no way to distinguish board revisions and the high_power
> table is used (incorrectly) for the newer variants.
>
> By default, devices based on AR9300 using the TX gain index 3 have
> to use the high_power table. To make sure that WZR-HP-G450H is not
> broken when the high_power table is updated, use a separate array
> based on information obtained from the platform data.
>
> The current situation where only the original variant of WZR-HP-G450H
> works properly stays unchanged.
>
> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
<...>
> diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
> index 8f4c167..998335c 100644
> --- a/drivers/net/wireless/ath/ath9k/init.c
> +++ b/drivers/net/wireless/ath/ath9k/init.c
> @@ -554,7 +554,7 @@ static void ath9k_init_misc(struct ath_softc *sc)
> sc->spec_config.fft_period = 0xF;
> }
>
> -static void ath9k_init_platform(struct ath_softc *sc)
> +static void ath9k_init_pcoem_platform(struct ath_softc *sc)
> {
> struct ath_hw *ah = sc->sc_ah;
> struct ath9k_hw_capabilities *pCap = &ah->caps;
> @@ -664,6 +664,27 @@ static void ath9k_eeprom_release(struct ath_softc *sc)
> release_firmware(sc->sc_ah->eeprom_blob);
> }
>
> +static int ath9k_init_soc_platform(struct ath_softc *sc)
> +{
> + struct ath9k_platform_data *pdata = sc->dev->platform_data;
> + struct ath_hw *ah = sc->sc_ah;
> + int ret = 0;
> +
> + if (!pdata)
> + return 0;
> +
> + if (pdata->eeprom_name) {
> + ret = ath9k_eeprom_request(sc, pdata->eeprom_name);
> + if (ret)
> + return ret;
> + }
> +
> + if (pdata->tx_gain_buffalo)
The ath9k_platform_data structure in 'include/linux/ath9k_platform.h' should be
updated as well. Otherwise this will cause a build error.
> + ah->config.tx_gain_buffalo = true;
> +
> + return ret;
> +}
> +
-Gabor
next prev parent reply other threads:[~2013-12-05 10:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-05 8:46 [RFC 00/12] ath9k initval updates Sujith Manoharan
2013-12-05 8:46 ` [RFC 01/12] ath9k: Add initval arrays for DFS channels Sujith Manoharan
2013-12-05 8:46 ` [RFC 02/12] ath9k: Initialize baseband " Sujith Manoharan
2013-12-05 8:46 ` [RFC 03/12] ath9k: Update mac_postamble for AR9003 family Sujith Manoharan
2013-12-05 8:46 ` [RFC 04/12] ath9k: Remove AR955x INI duplicates Sujith Manoharan
2013-12-05 8:46 ` [RFC 05/12] ath9k: Update AR9331 v1.1 initvals Sujith Manoharan
2013-12-05 8:46 ` [RFC 06/12] ath9k: Update AR9331 v1.2 initvals Sujith Manoharan
2013-12-05 8:46 ` [RFC 07/12] ath9k: Add a new flag for Buffalo devices Sujith Manoharan
2013-12-05 8:46 ` [RFC 08/12] ath9k: Use a separate TX gain table for WZR-HP-G450H Sujith Manoharan
2013-12-05 10:19 ` Gabor Juhos [this message]
2013-12-05 10:17 ` Sujith Manoharan
2013-12-05 10:34 ` Gabor Juhos
2013-12-05 8:46 ` [RFC 09/12] ath9k: Update high power gain table for AR9300 Sujith Manoharan
2013-12-05 8:46 ` [RFC 10/12] ath9k: Identify duplicate AR9485 initvals Sujith Manoharan
2013-12-05 8:46 ` [RFC 11/12] ath9k: Identify duplicate AR9462 v2.0 initvals Sujith Manoharan
2013-12-05 8:46 ` [RFC 12/12] ath9k: Identify duplicate AR9565 v1.0 initvals Sujith Manoharan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52A05325.2070501@openwrt.org \
--to=juhosg@openwrt.org \
--cc=ath9k-devel@lists.ath9k.org \
--cc=linux-wireless@vger.kernel.org \
--cc=sujith@msujith.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox