diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-09-08 16:43:37 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2013-10-21 23:58:37 +0200 |
commit | 7ce655474ab7a3898bef8a37f8f98c26301672d5 (patch) | |
tree | d7ae14edace7ac6754c10d26265eaa7e423df29a | |
parent | bdf745295610c1214ff8a9219051d4318c8dbee9 (diff) |
backports: use old led api on old kernel versions.
Usage of a new led api was introduced in mac80211, this patch make
backports use the old api on older kernel versions. This could cause a
problem with the led, the transmit led could stay on if nothing is
transfered.
This backports the following upstream commit:
commit e47f2509e5f182f4df144406de6f2bc78179d57e
Author: Fabio Baltieri <fabio.baltieri@gmail.com>
Date: Thu Jul 25 12:00:26 2013 +0200
mac80211: use oneshot blink API for LED triggers
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r-- | patches/collateral-evolutions/network/77-led-blink-api/INFO | 13 | ||||
-rw-r--r-- | patches/collateral-evolutions/network/77-led-blink-api/mac80211.patch | 51 |
2 files changed, 64 insertions, 0 deletions
diff --git a/patches/collateral-evolutions/network/77-led-blink-api/INFO b/patches/collateral-evolutions/network/77-led-blink-api/INFO new file mode 100644 index 00000000..f5f4d30b --- /dev/null +++ b/patches/collateral-evolutions/network/77-led-blink-api/INFO @@ -0,0 +1,13 @@ +backports: use old led api on old kernel versions. + +Usage of a new led api was introduced in mac80211, this patch make +backports use the old api on older kernel versions. This could cause a +problem with the led, the transmit led could stay on if nothing is +transfered. + +This backports the following upstream commit: +commit e47f2509e5f182f4df144406de6f2bc78179d57e +Author: Fabio Baltieri <fabio.baltieri@gmail.com> +Date: Thu Jul 25 12:00:26 2013 +0200 + + mac80211: use oneshot blink API for LED triggers diff --git a/patches/collateral-evolutions/network/77-led-blink-api/mac80211.patch b/patches/collateral-evolutions/network/77-led-blink-api/mac80211.patch new file mode 100644 index 00000000..c06ba673 --- /dev/null +++ b/patches/collateral-evolutions/network/77-led-blink-api/mac80211.patch @@ -0,0 +1,51 @@ +--- a/net/mac80211/ieee80211_i.h ++++ b/net/mac80211/ieee80211_i.h +@@ -1106,6 +1106,9 @@ struct ieee80211_local { + u32 dot11TransmittedFrameCount; + + #ifdef CONFIG_MAC80211_LEDS ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0) ++ int tx_led_counter, rx_led_counter; ++#endif + struct led_trigger *tx_led, *rx_led, *assoc_led, *radio_led; + struct tpt_led_trigger *tpt_led_trigger; + char tx_led_name[32], rx_led_name[32], +--- a/net/mac80211/led.c ++++ b/net/mac80211/led.c +@@ -16,18 +16,36 @@ + + void ieee80211_led_rx(struct ieee80211_local *local) + { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) + unsigned long led_delay = MAC80211_BLINK_DELAY; ++#endif + if (unlikely(!local->rx_led)) + return; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) + led_trigger_blink_oneshot(local->rx_led, &led_delay, &led_delay, 0); ++#else ++ if (local->rx_led_counter++ % 2 == 0) ++ led_trigger_event(local->rx_led, LED_OFF); ++ else ++ led_trigger_event(local->rx_led, LED_FULL); ++#endif + } + + void ieee80211_led_tx(struct ieee80211_local *local) + { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) + unsigned long led_delay = MAC80211_BLINK_DELAY; ++#endif + if (unlikely(!local->tx_led)) + return; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) + led_trigger_blink_oneshot(local->tx_led, &led_delay, &led_delay, 0); ++#else ++ if (local->tx_led_counter++ % 2 == 0) ++ led_trigger_event(local->tx_led, LED_OFF); ++ else ++ led_trigger_event(local->tx_led, LED_FULL); ++#endif + } + + void ieee80211_led_assoc(struct ieee80211_local *local, bool associated) |