Changeset 29604


Ignore:
Timestamp:
2011-12-23T15:27:16+01:00 (5 years ago)
Author:
juhosg
Message:

ramips: initial support for Sitecom WL-351 v1 002

This add support for the Sitecom WL-351 v1 002.
In principle the Engenius ESR9850 should also work with this, but I
don't have the hardware to test it.

Since an external gigabit switch (RTL8366RB) is used,
I had to modify the ramips_esw driver to add a 'bypass' mode, which
just configures it to not filter the vlan tags.
Also two initialization words (FCT2 and FPA2) are set to different
values by u-boot than what the driver is using and it only seems to
work correctly when they not overridden by the driver, so I
added them to the platform specific data as reg_initval_fct2 and
reg_initval_fpa2.

With this wired lan works as expected, however I'm still having some
trouble with the wireless lan:
It only works after I rmmod & re-insmod rt2800pci and then
reconfigure it in the webinterface, but not directly after
rebooting.

The symptom of this is wpad saying:
Dec 20 15:45:09 OpenWrt daemon.info hostapd: wlan1: STA <notebookmac> IEEE 802.11: associated (aid 1)
Dec 20 15:45:09 OpenWrt daemon.info hostapd: wlan1: STA <notebookmac> WPA: pairwise key handshake completed (RSN)
Dec 20 15:45:22 OpenWrt daemon.info hostapd: wlan1: STA <notebookmac> IEEE 802.11: authenticated

But wpa_supplicant on the client saying:
Authentication with <wl351mac> timed out.

Signed-off-by: Tobias Diedrich <ranma+openwrt@…>

Location:
trunk/target/linux/ramips
Files:
1 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ramips/base-files/etc/diag.sh

    r29603 r29604  
    6767                status_led="whr-g300n:green:router" 
    6868                ;; 
     69        wl-351) 
     70                status_led="wl-351:amber:power" 
     71                ;; 
    6972        esac 
    7073} 
  • trunk/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom

    r29603 r29604  
    6060        wcr-150gn | \ 
    6161        whr-g300n | \ 
     62        wl-351 | \ 
    6263        wr512-3gn) 
    6364                rt2x00_eeprom_extract "factory" 0 272 
  • trunk/target/linux/ramips/base-files/etc/uci-defaults/network

    r29603 r29604  
    2222        nw718) 
    2323                ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" 
     24                ;; 
     25 
     26        wl-351) 
     27                ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" 
     28                ucidef_add_switch "rtl8366rb" "1" "1" 
     29                ucidef_add_switch_vlan "rtl8366rb" "1" "0 1 2 3 5t" 
     30                ucidef_add_switch_vlan "rtl8366rb" "2" "4 5t" 
    2431                ;; 
    2532 
     
    5764        b2c | \ 
    5865        nw718 | \ 
    59         rt-n15) 
     66        rt-n15 | \ 
     67        wl-351) 
    6068                lan_mac=$(ramips_get_mac_binary factory 4) 
    6169                wan_mac=$(/usr/sbin/maccalc add "$lan_mac" 1) 
  • trunk/target/linux/ramips/base-files/lib/ramips.sh

    r29603 r29604  
    105105                name="whr-g300n" 
    106106                ;; 
     107        *"Sitecom WL-351 v1 002") 
     108                name="wl-351" 
     109                ;; 
    107110        *"WZR-AGL300NH") 
    108111                name="wzr-agl300nh" 
  • trunk/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h

    r29603 r29604  
    3939        RAMIPS_MACH_WCR150GN,           /* Sparklan WCR-150GN */ 
    4040        RAMIPS_MACH_WHR_G300N,          /* Buffalo WHR-G300N */ 
     41        RAMIPS_MACH_WL351,              /* Sitecom WL-351 v1 002 */ 
    4142        RAMIPS_MACH_WR512_3GN,          /* SH-WR512NU/WS-WR512N1-like 3GN*/ 
    4243}; 
  • trunk/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt305x_esw_platform.h

    r27990 r29604  
    1414enum { 
    1515        RT305X_ESW_VLAN_CONFIG_NONE = 0, 
     16        RT305X_ESW_VLAN_CONFIG_BYPASS, 
    1617        RT305X_ESW_VLAN_CONFIG_LLLLW, 
    1718        RT305X_ESW_VLAN_CONFIG_WLLLL, 
     
    2122{ 
    2223        u8 vlan_config; 
     24        u32 reg_initval_fct2; 
     25        u32 reg_initval_fpa2; 
    2326}; 
    2427 
  • trunk/target/linux/ramips/files/arch/mips/ralink/rt305x/Kconfig

    r29603 r29604  
    7777        select RALINK_DEV_GPIO_LEDS 
    7878 
     79config RT305X_MACH_WL351 
     80        bool "Sitecom WL-351 support" 
     81        select RALINK_DEV_GPIO_BUTTONS 
     82        select RALINK_DEV_GPIO_LEDS 
     83 
    7984config RT305X_MACH_WCR150GN 
    8085        bool "Sparklan WCR-150GN support" 
  • trunk/target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile

    r29603 r29604  
    2929obj-$(CONFIG_RT305X_MACH_WHR_G300N)     += mach-whr-g300n.o 
    3030obj-$(CONFIG_RT305X_MACH_WR512_3GN)     += mach-wr512-3gn.o 
    31  
     31obj-$(CONFIG_RT305X_MACH_WL351)         += mach-wl351.o 
  • trunk/target/linux/ramips/files/arch/mips/ralink/rt305x/devices.c

    r27995 r29604  
    2525 
    2626#include <ramips_eth_platform.h> 
     27#include <rt305x_esw_platform.h> 
    2728 
    2829static struct resource rt305x_flash0_resources[] = { 
     
    143144}; 
    144145 
    145 struct rt305x_esw_platform_data rt305x_esw_data; 
     146struct rt305x_esw_platform_data rt305x_esw_data = { 
     147        .vlan_config            = RT305X_ESW_VLAN_CONFIG_NONE, 
     148        .reg_initval_fct2       = 0x00d6500c, 
     149        .reg_initval_fpa2       = 0x3f502b28, 
     150}; 
     151 
    146152static struct platform_device rt305x_esw_device = { 
    147153        .name           = "rt305x-esw", 
  • trunk/target/linux/ramips/files/drivers/net/ramips_esw.c

    r29603 r29604  
    219219                      RT305X_ESW_REG_POC3); 
    220220 
    221         rt305x_esw_wr(esw, 0x00d6500c, RT305X_ESW_REG_FCT2); 
     221        rt305x_esw_wr(esw, esw->pdata->reg_initval_fct2, RT305X_ESW_REG_FCT2); 
    222222        rt305x_esw_wr(esw, 0x0008a301, RT305X_ESW_REG_SGC); 
    223223 
     
    230230                      RT305X_ESW_REG_SOCPC); 
    231231 
    232         rt305x_esw_wr(esw, 0x3f502b28, RT305X_ESW_REG_FPA2); 
     232        rt305x_esw_wr(esw, esw->pdata->reg_initval_fpa2, RT305X_ESW_REG_FPA2); 
    233233        rt305x_esw_wr(esw, 0x00000000, RT305X_ESW_REG_FPA); 
    234234 
     
    278278                break; 
    279279 
     280        case RT305X_ESW_VLAN_CONFIG_BYPASS: 
     281                /* Pass all vlan tags to all ports */ 
     282                for (i = 0; i < RT305X_ESW_NUM_VLANS; i++) { 
     283                        rt305x_esw_set_vlan_id(esw, i, i+1); 
     284                        rt305x_esw_set_vmsc(esw, i, RT305X_ESW_PORTS_ALL); 
     285                } 
     286                /* Disable VLAN TAG removal, keep aging on. */ 
     287                rt305x_esw_wr(esw, 
     288                              RT305X_ESW_PORTS_ALL << RT305X_ESW_POC3_ENAGING_S, 
     289                              RT305X_ESW_REG_POC3); 
     290                break; 
     291 
    280292        case RT305X_ESW_VLAN_CONFIG_LLLLW: 
    281293                rt305x_esw_set_vlan_id(esw, 0, 1); 
  • trunk/target/linux/ramips/image/Makefile

    r29603 r29604  
    180180endef 
    181181 
     182define Image/Build/Profile/WL351 
     183        $(call Image/Build/Template/GENERIC_4M,$(1),wl-351,WL-351) 
     184endef 
     185 
    182186define Image/Build/Profile/NW718 
    183187        $(call Image/Build/Template/NW718,$(1),nw718,NW718) 
     
    272276        $(call Image/Build/Profile/MOFI35003GN,$(1)) 
    273277        $(call Image/Build/Profile/WR5123GN,$(1)) 
     278        $(call Image/Build/Profile/WL351,$(1)) 
    274279endef 
    275280endif 
  • trunk/target/linux/ramips/rt305x/config-2.6.39

    r29603 r29604  
    108108CONFIG_RT305X_MACH_WCR150GN=y 
    109109CONFIG_RT305X_MACH_WHR_G300N=y 
     110CONFIG_RT305X_MACH_WL351=y 
    110111CONFIG_RT305X_MACH_WR512_3GN=y 
    111112# CONFIG_SCSI_DMA is not set 
Note: See TracChangeset for help on using the changeset viewer.