1 /* SPDX-License-Identifier: GPL-2.0-only */ 1 2 /* 3 * Copyright 2006, Johannes Berg <johannes@sip 4 */ 5 6 #include <linux/list.h> 7 #include <linux/spinlock.h> 8 #include <linux/leds.h> 9 #include "ieee80211_i.h" 10 11 #define MAC80211_BLINK_DELAY 50 /* ms */ 12 13 static inline void ieee80211_led_rx(struct iee 14 { 15 #ifdef CONFIG_MAC80211_LEDS 16 if (!atomic_read(&local->rx_led_active 17 return; 18 led_trigger_blink_oneshot(&local->rx_l 19 #endif 20 } 21 22 static inline void ieee80211_led_tx(struct iee 23 { 24 #ifdef CONFIG_MAC80211_LEDS 25 if (!atomic_read(&local->tx_led_active 26 return; 27 led_trigger_blink_oneshot(&local->tx_l 28 #endif 29 } 30 31 #ifdef CONFIG_MAC80211_LEDS 32 void ieee80211_led_assoc(struct ieee80211_loca 33 bool associated); 34 void ieee80211_led_radio(struct ieee80211_loca 35 bool enabled); 36 void ieee80211_alloc_led_names(struct ieee8021 37 void ieee80211_free_led_names(struct ieee80211 38 void ieee80211_led_init(struct ieee80211_local 39 void ieee80211_led_exit(struct ieee80211_local 40 void ieee80211_mod_tpt_led_trig(struct ieee802 41 unsigned int t 42 #else 43 static inline void ieee80211_led_assoc(struct 44 bool as 45 { 46 } 47 static inline void ieee80211_led_radio(struct 48 bool en 49 { 50 } 51 static inline void ieee80211_alloc_led_names(s 52 { 53 } 54 static inline void ieee80211_free_led_names(st 55 { 56 } 57 static inline void ieee80211_led_init(struct i 58 { 59 } 60 static inline void ieee80211_led_exit(struct i 61 { 62 } 63 static inline void ieee80211_mod_tpt_led_trig( 64 65 66 { 67 } 68 #endif 69 70 static inline void 71 ieee80211_tpt_led_trig_tx(struct ieee80211_loc 72 { 73 #ifdef CONFIG_MAC80211_LEDS 74 if (atomic_read(&local->tpt_led_active 75 local->tpt_led_trigger->tx_byt 76 #endif 77 } 78 79 static inline void 80 ieee80211_tpt_led_trig_rx(struct ieee80211_loc 81 { 82 #ifdef CONFIG_MAC80211_LEDS 83 if (atomic_read(&local->tpt_led_active 84 local->tpt_led_trigger->rx_byt 85 #endif 86 } 87
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.