X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/bb03c545e8fec89bf3b1feae52095b2afd291e84..6e12beb80be45304eb1e08837aeb8e95e6fe1eab:/package/mac80211/patches/510-ath9k_led_cleanup.patch diff --git a/package/mac80211/patches/510-ath9k_led_cleanup.patch b/package/mac80211/patches/510-ath9k_led_cleanup.patch index 968804ad3..ded236cd9 100644 --- a/package/mac80211/patches/510-ath9k_led_cleanup.patch +++ b/package/mac80211/patches/510-ath9k_led_cleanup.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h -@@ -438,26 +438,20 @@ void ath9k_btcoex_timer_pause(struct ath +@@ -449,26 +449,20 @@ void ath9k_btcoex_timer_pause(struct ath #define ATH_LED_PIN_DEF 1 #define ATH_LED_PIN_9287 8 @@ -38,7 +38,7 @@ /* Antenna diversity/combining */ #define ATH_ANT_RX_CURRENT_SHIFT 4 -@@ -608,15 +602,11 @@ struct ath_softc { +@@ -620,15 +614,11 @@ struct ath_softc { struct ath_beacon beacon; struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS]; @@ -57,8 +57,8 @@ + struct led_classdev led_cdev; +#endif - int beacon_interval; - + struct ath9k_hw_cal_data caldata; + int last_rssi; --- a/drivers/net/wireless/ath/ath9k/gpio.c +++ b/drivers/net/wireless/ath/ath9k/gpio.c @@ -20,120 +20,25 @@ @@ -149,8 +149,8 @@ - - ret = led_classdev_register(wiphy_dev(sc->hw->wiphy), &led->led_cdev); - if (ret) -- ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_FATAL, -- "Failed to register led:%s", led->name); +- ath_err(ath9k_hw_common(sc->sc_ah), +- "Failed to register led:%s", led->name); - else - led->registered = 1; - return ret; @@ -253,22 +253,23 @@ /* Rfkill */ --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -1278,9 +1278,6 @@ static void ath9k_stop(struct ieee80211_ +@@ -1204,9 +1204,6 @@ static void ath9k_stop(struct ieee80211_ - aphy->state = ATH_WIPHY_INACTIVE; + mutex_lock(&sc->mutex); - if (led_blink) - cancel_delayed_work_sync(&sc->ath_led_blink_work); - cancel_delayed_work_sync(&sc->tx_complete_work); + cancel_delayed_work_sync(&sc->hw_pll_work); cancel_work_sync(&sc->paprd_work); - cancel_work_sync(&sc->hw_check_work); --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -139,6 +139,20 @@ static struct ieee80211_rate ath9k_legac +@@ -145,6 +145,21 @@ static struct ieee80211_rate ath9k_legac RATE(540, 0x0c, 0), }; ++#ifdef CONFIG_MAC80211_LEDS +static const struct ieee80211_tpt_blink ath9k_tpt_blink[] = { + { .throughput = 0 * 1024, .blink_time = 334 }, + { .throughput = 1 * 1024, .blink_time = 260 }, @@ -281,18 +282,21 @@ + { .throughput = 200 * 1024, .blink_time = 80 }, + { .throughput = 300 * 1024, .blink_time = 50 }, +}; -+ ++#endif + static void ath9k_deinit_softc(struct ath_softc *sc); /* -@@ -750,6 +764,10 @@ int ath9k_init_device(u16 devid, struct +@@ -746,6 +761,13 @@ int ath9k_init_device(u16 devid, struct ath9k_init_txpower_limits(sc); ++#ifdef CONFIG_MAC80211_LEDS + /* must be initialized before ieee80211_register_hw */ + sc->led_cdev.default_trigger = ieee80211_create_tpt_led_trigger(sc->hw, -+ ath9k_tpt_blink, ARRAY_SIZE(ath9k_tpt_blink)); ++ IEEE80211_TPT_LEDTRIG_FL_RADIO, ath9k_tpt_blink, ++ ARRAY_SIZE(ath9k_tpt_blink)); ++#endif + /* Register with mac80211 */ error = ieee80211_register_hw(hw);