lkml.org 
[lkml]   [2013]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[ 15/26] rt2800: fix RT5390 & RT3290 TX power settings regression
    Date
    3.9-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Stanislaw Gruszka <sgruszka@redhat.com>

    commit 8c8d2017ba25c510ddf093419048460db1109bc4 upstream.

    My change:

    commit cee2c7315f60beeff6137ee59e99acc77d636eeb
    Author: Stanislaw Gruszka <sgruszka@redhat.com>
    Date: Fri Oct 5 13:44:09 2012 +0200

    rt2800: use BBP_R1 for setting tx power

    unfortunately does not work well with RT5390 and RT3290 chips as they
    require different temperature compensation TX power settings (TSSI
    tuning). Since that commit make wireless connection very unstable on
    those chips, restore previous behavior to fix regression. Once we
    implement proper TSSI tuning on 5390/3290 we can restore back setting
    TX power by BBP_R1 register for those chips.

    Reported-and-tested-by: Mike Romberg <mike-romberg@comcast.net>
    Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
    Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/net/wireless/rt2x00/rt2800lib.c | 29 ++++++++++++++++++-----------
    1 file changed, 18 insertions(+), 11 deletions(-)

    --- a/drivers/net/wireless/rt2x00/rt2800lib.c
    +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
    @@ -2634,19 +2634,26 @@ static void rt2800_config_txpower(struct
    * TODO: we do not use +6 dBm option to do not increase power beyond
    * regulatory limit, however this could be utilized for devices with
    * CAPABILITY_POWER_LIMIT.
    + *
    + * TODO: add different temperature compensation code for RT3290 & RT5390
    + * to allow to use BBP_R1 for those chips.
    */
    - rt2800_bbp_read(rt2x00dev, 1, &r1);
    - if (delta <= -12) {
    - power_ctrl = 2;
    - delta += 12;
    - } else if (delta <= -6) {
    - power_ctrl = 1;
    - delta += 6;
    - } else {
    - power_ctrl = 0;
    + if (!rt2x00_rt(rt2x00dev, RT3290) &&
    + !rt2x00_rt(rt2x00dev, RT5390)) {
    + rt2800_bbp_read(rt2x00dev, 1, &r1);
    + if (delta <= -12) {
    + power_ctrl = 2;
    + delta += 12;
    + } else if (delta <= -6) {
    + power_ctrl = 1;
    + delta += 6;
    + } else {
    + power_ctrl = 0;
    + }
    + rt2x00_set_field8(&r1, BBP1_TX_POWER_CTRL, power_ctrl);
    + rt2800_bbp_write(rt2x00dev, 1, r1);
    }
    - rt2x00_set_field8(&r1, BBP1_TX_POWER_CTRL, power_ctrl);
    - rt2800_bbp_write(rt2x00dev, 1, r1);
    +
    offset = TX_PWR_CFG_0;

    for (i = 0; i < EEPROM_TXPOWER_BYRATE_SIZE; i += 2) {



    \
     
     \ /
      Last update: 2013-07-01 23:21    [W:3.913 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site