Signed-off-by: Tobias Doerffel <tobias.doerf...@gmail.com> --- drivers/net/wireless/ath5k/base.c | 35 ++++++++++++++++++++++++----------- include/linux/pci_ids.h | 2 ++ 2 files changed, 26 insertions(+), 11 deletions(-)
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index 933c606..0b56e0e 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c @@ -2580,6 +2580,7 @@ ath5k_init_leds(struct ath5k_softc *sc) struct ieee80211_hw *hw = sc->hw; struct pci_dev *pdev = sc->pdev; char name[ATH5K_LED_MAX_NAME_LEN + 1]; + bool has_rx_tx_leds = true; /* * Auto-enable soft led processing for IBM cards and for @@ -2604,22 +2605,34 @@ ath5k_init_leds(struct ath5k_softc *sc) sc->led_on = 0; /* active low */ } + /* Enable softled on PIN0 on Samsung NC10 */ + if (pdev->subsystem_vendor == PCI_VENDOR_ID_ASKEY) { + __set_bit(ATH_STAT_LEDSOFT, sc->status); + sc->led_pin = 0; + sc->led_on = 1; /* active high */ + has_rx_tx_leds = false; + } + if (!test_bit(ATH_STAT_LEDSOFT, sc->status)) goto out; ath5k_led_enable(sc); - snprintf(name, sizeof(name), "ath5k-%s::rx", wiphy_name(hw->wiphy)); - ret = ath5k_register_led(sc, &sc->rx_led, name, - ieee80211_get_rx_led_name(hw)); - if (ret) - goto out; - - snprintf(name, sizeof(name), "ath5k-%s::tx", wiphy_name(hw->wiphy)); - ret = ath5k_register_led(sc, &sc->tx_led, name, - ieee80211_get_tx_led_name(hw)); - if (ret) - goto out; + if (has_rx_tx_leds) { + snprintf(name, sizeof(name), "ath5k-%s::rx", + wiphy_name(hw->wiphy)); + ret = ath5k_register_led(sc, &sc->rx_led, name, + ieee80211_get_rx_led_name(hw)); + if (ret) + goto out; + + snprintf(name, sizeof(name), "ath5k-%s::tx", + wiphy_name(hw->wiphy)); + ret = ath5k_register_led(sc, &sc->tx_led, name, + ieee80211_get_tx_led_name(hw)); + if (ret) + goto out; + } snprintf(name, sizeof(name), "ath5k-%s::radio", wiphy_name(hw->wiphy)); ret = ath5k_register_led(sc, &sc->radio_led, name, diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 21f8b6c..8212071 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -1967,6 +1967,8 @@ #define PCI_VENDOR_ID_SAMSUNG 0x144d +#define PCI_VENDOR_ID_ASKEY 0x144f + #define PCI_VENDOR_ID_MYRICOM 0x14c1 #define PCI_VENDOR_ID_TITAN 0x14D2 -- 1.6.0.4 _______________________________________________ ath5k-devel mailing list ath5k-devel@lists.ath5k.org https://lists.ath5k.org/mailman/listinfo/ath5k-devel