Commit Graph

71 Commits (68bf5a96595a8a0983842c8ff0eaa8af290adc51)

Author SHA1 Message Date
INAGAKI Hiroshi 8f3b176e86 kernel: rtl8367b: fix external interface modes
The interface mode number of RGMII_33V is 7 on RTL8367, but it's 9 on
RTL8367B.

the external interface modes for RTL8367 are follows:

- 0, Disabled
- 1, RGMII
- 2, MII_MAC
- 3, MII_PHY
- 4, TMII_MAC
- 5, TMII_PHY
- 6, GMII
- 7, RGMII_33V

the external interface modes for RTL8367B are follows:

- 0, Disabled
- 1, RGMII
- 2, MII_MAC
- 3, MII_PHY
- 4, TMII_MAC
- 5, TMII_PHY
- 6, GMII
- 7, RMII_MAC
- 8, RMII_PHY
- 9, RGMII_33V

But the driver in U-Boot of RT-N56U GPL tar blocks using RGMII_33V (9)
mode and it seems to be unsupported on RTL8367B, so drop it from
switch-case in rtl8367b_extif_set_mode.

ref (RTL8367):

- TL-WR2453ND v1

ref (RTL8367B):

- ASUS RT-N56U
- TP-Link Archer C2 v1

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
4 years ago
Hauke Mehrtens a272af75cd kernel: Move modifications of b53.h into patch
The b53 driver was added as a dsa driver into the mainline Linux kernel,
but we still use the swconfig based driver. The header file b53.h is
used by both drivers, but the swconfig one needs an extra member, add
this one in a patch to not overwrite the version shipped with the
mainline kernel.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
John Crispin f7aa08595d kernel: add reset control support to rtl8366 driver
Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
Thibaut VARENE c30a70fc9f generic: make switch_port_stats tx/rx_bytes long long
This generic structure defines tx_bytes and rx_bytes as unsigned long (u32),
while several devices would typically report unsigned long long (u64).

The code can work as is, but there's a chance that with a sufficiently fast
interface the overflow might happen too fast to be correctly noticed by the
consumers of this data.

This patch makes both field unsigned long long and updates the only known
consumer of this data: swconfig_leds.c

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Mirko Parthey 1dace8cbe0 brcm47xx: resolve GPIO conflict for WRT54GSv1
On the Linksys WRT54GSv1, the adm6996 switch driver and the
gpio_button_hotplug module both claim GPIO 6, which is connected to the
Reset button.  When the switch driver's request wins, the Reset button
cannot work. This makes it impossible to enter failsafe mode without a
serial console.

Stop requesting the "adm_rc" GPIO in the switch driver, since it is not
used anywhere.

Fixes FS#792.

Signed-off-by: Mirko Parthey <mirko.parthey@web.de>
7 years ago
Mathias Kresin 4a4c00e7c4 ath9k: drop obsolete patch
Now that the wireless LEDs are added via platform leds this patch isn't
required any longer.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Pavel Kubelun 5a69f59602 net: ar8216: address security vulnerabilities in swconfig & ar8216
Imported from e1aaf7ec00%5E%21/#F0
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>

CHROMIUM: net: ar8216: address security vulnerabilities in swconfig & ar8216

This patch does the following changes:
*address the security vulnerabilities in both swconfig framework and in
 ar8216 driver (many bound check additions, and turned swconfig structure
 signed element into unsigned when applicable)
*address a couple of whitespaces and indendation issues

BUG=chrome-os-partner:33096
TEST=none

Change-Id: I94ea78fcce8c1932cc584d1508c6e3b5dfb93ce9
Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>
Reviewed-on: https://chromium-review.googlesource.com/236490
Reviewed-by: Toshi Kikuchi <toshik@chromium.org>
Commit-Queue: Toshi Kikuchi <toshik@chromium.org>
Tested-by: Toshi Kikuchi <toshik@chromium.org>
8 years ago
Matthias Schiffer fa845e9978
ath9k: add support for the HSR tuner of the Ubiquiti UAP Outdoor+
Without setting the HSR to the selected channel, the WLAN of the UAP
Outdoor+ will exhibit high packet loss in RX.

Based-on-patch-by: Stefan Rompf <stefan@loplof.de>
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Mathias Kresin e7c019c24d mac80211: rt2x00: fold patches
The patch 615-rt2x00-fix_20mhz_clk.patch fixes code introduced by
611-rt2x00-rf_vals-rt3352-xtal20.patch and makes the the platform data
property clk_is_20mhz obsolete.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
John Crispin 99a1888287 swconfig: revert the portmapping patches, they seem to cause a segfault
Revert "kernel/swconfig: remove obsolete portmapping feature from swconfig"

This reverts commit 675407baa4.

Revert "swconfig: remove obsolete portmapping feature"

This reverts commit fca1eb349e.

Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
John Crispin 675407baa4 kernel/swconfig: remove obsolete portmapping feature from swconfig
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Ben Whitten 7509658220 generic: remove brcmfmac-sdio.h
This file is present in the kernel so no point overlaying it.

Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
8 years ago
Felix Fietkau 7eeb254cc4 treewide: replace nbd@openwrt.org with nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau df93d53a4b mac80211: update to wireless-testing 2016-05-12
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 6bece706ec mac80211: ath9k: enable GPIO buttons
Enable platform-defined GPIO button support for ath9k device.
Key poller is activated for attached platform buttons.
Requires ath9k GPIO chip access.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>

SVN-Revision: 48921
8 years ago
Felix Fietkau a8c15c0204 mac80211: ath9k: enable platform WLAN LED name
Enable platform-supplied WLAN LED name for ath9k device.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>

SVN-Revision: 48879
8 years ago
Rafał Miłecki 19b9e14c47 swconfig: add (PHY) generic helper setting port link
It's quite common for switches to have PHY per port so adding a generic
helper setting link state will help many drivers. It just needs an API
to access PHYs which this patch also adds.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 48621
9 years ago
Rafał Miłecki 5f69279dd6 swconfig: add API for setting port link speed
Some switches can force link speed for a port. Let's add API that will
allow drivers to export this feature.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 48142
9 years ago
John Crispin 67e10d757f swconfig: add SWITCH_TYPE_LINK and support sending link info to user space
So far we were sending link data as a string. It got some drawbacks:
1) Didn't allow writing clean user space apps reading link state. It was
   needed to do some screen scraping.
2) Forced whole PORT_LINK communication to be string based. Adding
   support for *setting* port link required passing string and parting
   it in the kernel space.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 47997
9 years ago
Felix Fietkau 814d70b2fd ar8216: rework/fix AR8337 MAC swap handling
In r45970 the MAC swap handling was made opt-in, however some boards
have been forgotten during the conversion. Since the reference design
uses this MAC swapping, and pretty much all known boards using this chip
seem to do so too, enabling the swapping is a more reasonable default
than leaving it disabled.

Change the code to still allow boards to opt-out of this.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47956
9 years ago
John Crispin 932bc8d5eb ath9k: Allow configuration of LED polarity in platform data.
Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>

SVN-Revision: 47910
9 years ago
Felix Fietkau 4a9d726200 ar8216: Fix problem with AR8337 MAC swap handling
AR8337 supports a configuration bit to swap MAC0 and MAC6.
Currently this is set in general if an AR8337 is detected and causes
issues with devices using an AR8334 (internally an AR8337, just
less chip pins).
And it might even cause issues with AR8337-based devices with
different board designs.

Swapping the MAC's however isn't needed for AR8337 in general.
It's just needed in case of certain board designs (affected devices
seem to be based on Atheros reference board AP135/136-010).
Therefore this configuration bit should be moved to platform data.

The patch includes the needed changes to the device initialization
code of affected devices. Hopefully I didn't miss any ..

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 45970
9 years ago
John Crispin baaef42952 ar71xx: Revert "added board support for compex wpj558"
This reverts commit f7873071561d82e75ba2dc46433a2982fef8ac6f.

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 44245
10 years ago
John Crispin bc906ca59e added board support for compex wpj558
Signed-off-by: Christian Mehlis <christian@m3hlis.de>

SVN-Revision: 44237
10 years ago
Felix Fietkau 53c0c6054f ar8216: add 802.3az EEE info to swconfig get_link attribute
AR8327/AR8337 allow to read the result of EEE autonegotiation.
If EEE is autonegotiated between the link partners, display
this as part of the swconfig get_link attribute.

eee100:  100MBit EEE supported by both link partners
eee1000: 1GBit EEE supported by both link partners

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 44022
10 years ago
Felix Fietkau 8513629e3e mac80211: update to wireless-testing 2014-05-19
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40800
10 years ago
Gabor Juhos 0056ac55af generic: ar8216: add custom LED support for the AR8327 switch
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39338
11 years ago
Gabor Juhos 0601b5f404 kernel: define RB_ID_HW_OPTIONS in include/linux/routerboot.h
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39090
11 years ago
Felix Fietkau 7a260c3620 ath9k: merge initval and tx gain table updates, calibration fixes
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39001
11 years ago
Hauke Mehrtens 7a82667372 kernel: adm6996: add support for ADM6996L and GPIO interface
This patch makes it possible to use adm6996.c on first generation
BCM47XX devices with ADM switches.
The GPIO bit banging protocol implementation was copied from the old
switch driver and adapted to this driver and changed to the mainline
kernel GPIO interface.
The ADM6996L is different from the ADM6996M which is supported, for
both specs are available in the Internet.

This was tested on a WRT54GS version 1.0, thank you Dirk Neukirchen for
the device.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 38698
11 years ago
Luka Perkov 4f679c1775 kernel: drop dead pwm code
The files have last been used with 2.6.x kernel.

Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 37810
11 years ago
Luka Perkov a2dccb958c kernel: drop dead glamo code
The code is not used since the s3c24xx target was removed.

Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 37809
11 years ago
Jonas Gorski 29954b9ffc kernel: remove gpio_buttons
It hasn't been buildable for a long time, and there are no users of it
anymore left as all of them have been switched to the upstream accepted
version.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 37436
11 years ago
Gabor Juhos a1f91282b4 generic: ar8216: allow to specify SGMII config via platform data
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36798
11 years ago
Gabor Juhos c170d3c3e4 generic: ar8216: add get_port_link callback
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36797
11 years ago
Jonas Gorski a33dd13c98 kernel: add missing bcma defines and header file for bcrmfmac
Fixes build failure when having kmod-mmc and brcmfmac selected.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 36468
11 years ago
John Crispin fff58a5801 allow loading port maps from OF
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36283
11 years ago
Jonas Gorski bb0118c66f generic: add b53 swconfig switch driver
Add swconfig switch driver for Broadcom BCM53XX switch chips. Supports
switches connected through MDIO, SPI or memory mapped registers, and
supports BCM5325, BCM539x, BCM531x5 and the BCM63XX internal switch
chips.

Tested are BCM5325 trough MDIO, BCM53115 through SPI, and BCM6328.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 35305
12 years ago
Gabor Juhos d4b4c7d102 generic: ar8216: add sgmii_delay_en field to ar8327_platform_data
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 34881
12 years ago
Gabor Juhos 3931c9524c generic: ar8316: allow to configure port 6 via platform data on AR8327
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 34847
12 years ago
Gabor Juhos a0b31f97bb generic: ar8216: rename cpuport_cfg to port0_cfg in ar8327_platform_data
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 34846
12 years ago
Gabor Juhos a860153cce generic: disintegrate UAPI from include/linux/switch.h
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 34677
12 years ago
Gabor Juhos dfd718d13d mac80211: ath9k: allow to load EEPROM data via firmware API
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 34606
12 years ago
Gabor Juhos 6c1fbb2d5c mac80211/rt2x00: add rf_vals for Rt3352 with Xtal=20MHz
[juhosg: move ramips specific stuff into a followup patch]

Signed-off-by: Daniel Golle <dgolle@allnet.de>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 34269
12 years ago
Gabor Juhos e8fc46b7c5 generic: allow to disable [25]GHz support in ath9k via platform data
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 33954
12 years ago
Gabor Juhos 0045449b1b generic: add driver for the the RTL8367R{B,-VB} switches
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 33839
12 years ago
John Crispin ba6751058b gpiodev/gpioctl RIP
SVN-Revision: 33725
12 years ago
Gabor Juhos 2323120d5e generic add WLAN calibration data ID to routerboot.h
SVN-Revision: 33346
12 years ago
Gabor Juhos f3ecbea052 adm5120: move common routerboot definitions into a separate header file
Those will be used on the ar71xx platform as well.

SVN-Revision: 33341
12 years ago
Gabor Juhos e2782eae8e generic: rtl836x: add hw_reset field to struct rtl8366_smi
It will be used to start/stop the switch if that is
supported by the given board.

SVN-Revision: 32943
12 years ago