Changeset 24921


Ignore:
Timestamp:
2011-01-08T11:17:35+01:00 (7 years ago)
Author:
juhosg
Message:

backfire: ar71xx: improve the wndr3700 quirks (backport of r23822, r23875)

  • move most of the code out of ath9k and instead allow the platform device to specify gpio overrides
  • fixes 5ghz signal strength issues
Location:
branches/backfire/target/linux/ar71xx/files
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/backfire/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-pci.c

    r18860 r24921  
    1818#include "dev-ap91-pci.h" 
    1919 
    20 static struct ath9k_platform_data ap91_wmac_data; 
     20static struct ath9k_platform_data ap91_wmac_data = { 
     21        .led_pin = -1, 
     22}; 
    2123static char ap91_wmac_mac[6]; 
    2224static int ap91_pci_fixup_enabled; 
  • branches/backfire/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap94-pci.c

    r19565 r24921  
    1818#include "dev-ap94-pci.h" 
    1919 
    20 static struct ath9k_platform_data ap94_wmac0_data; 
    21 static struct ath9k_platform_data ap94_wmac1_data; 
     20static struct ath9k_platform_data ap94_wmac0_data = { 
     21        .led_pin = -1, 
     22}; 
     23static struct ath9k_platform_data ap94_wmac1_data = { 
     24        .led_pin = -1, 
     25}; 
    2226static char ap94_wmac0_mac[6]; 
    2327static char ap94_wmac1_mac[6]; 
     
    128132void __init ap94_pci_enable_quirk_wndr3700(void) 
    129133{ 
    130         ap94_wmac0_data.quirk_wndr3700 = 1; 
    131         ap94_wmac1_data.quirk_wndr3700 = 1; 
     134        /* WNDR3700 uses GPIO 6-9 for antenna configuration */ 
     135 
     136        ap94_wmac0_data.led_pin = 5; 
     137        ap94_wmac0_data.gpio_mask = (0xf << 6); 
     138        /* 2.4 GHz uses the first fixed antenna group (0, 1, 0, 1) */ 
     139        ap94_wmac0_data.gpio_val = (10 << 6); 
     140 
     141        ap94_wmac1_data.led_pin = 5; 
     142        ap94_wmac1_data.gpio_mask = (0xf << 6); 
     143        /* 5 GHz uses the second fixed antenna group (0, 1, 1, 0) */ 
     144        ap94_wmac1_data.gpio_val = (6 << 6); 
    132145} 
    133146 
  • branches/backfire/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ar913x-wmac.c

    r20279 r24921  
    2323#include "dev-ar913x-wmac.h" 
    2424 
    25 static struct ath9k_platform_data ar913x_wmac_data; 
     25static struct ath9k_platform_data ar913x_wmac_data = { 
     26        .led_pin = -1, 
     27}; 
    2628static char ar913x_wmac_mac[6]; 
    2729 
  • branches/backfire/target/linux/ar71xx/files/include/linux/ath9k_platform.h

    r19565 r24921  
    11/* 
    2  * ath9k platform data defines 
     2 * Copyright (c) 2008 Atheros Communications Inc. 
     3 * Copyright (c) 2009 Gabor Juhos <juhosg@openwrt.org> 
     4 * Copyright (c) 2009 Imre Kaloz <kaloz@openwrt.org> 
    35 * 
    4  * Copyright (C) 2008 Gabor Juhos <juhosg@openwrt.org> 
     6 * Permission to use, copy, modify, and/or distribute this software for any 
     7 * purpose with or without fee is hereby granted, provided that the above 
     8 * copyright notice and this permission notice appear in all copies. 
    59 * 
    6  * This program is free software; you can redistribute it and/or modify it 
    7  * under the terms of the GNU General Public License version 2 as published 
    8  * by the Free Software Foundation. 
     10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 
     11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 
     12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 
     13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 
     14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 
     15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 
     16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 
    917 */ 
    1018 
     
    1826        u8 *macaddr; 
    1927 
    20         unsigned long quirk_wndr3700:1; 
     28        int led_pin; 
     29        u32 gpio_mask; 
     30        u32 gpio_val; 
    2131}; 
    2232 
Note: See TracChangeset for help on using the changeset viewer.