Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #include <linux/list.h>
00010 #include <linux/spinlock.h>
00011 #include <linux/leds.h>
00012 #include "ieee80211_i.h"
00013
00014 #ifdef CONFIG_MAC80211_LEDS
00015 void ieee80211_led_rx(struct ieee80211_local *local);
00016 void ieee80211_led_tx(struct ieee80211_local *local, int q);
00017 void ieee80211_led_assoc(struct ieee80211_local *local,
00018 bool associated);
00019 void ieee80211_led_radio(struct ieee80211_local *local,
00020 bool enabled);
00021 void ieee80211_led_names(struct ieee80211_local *local);
00022 void ieee80211_led_init(struct ieee80211_local *local);
00023 void ieee80211_led_exit(struct ieee80211_local *local);
00024 void ieee80211_mod_tpt_led_trig(struct ieee80211_local *local,
00025 unsigned int types_on, unsigned int types_off);
00026 #else
00027 static inline void ieee80211_led_rx(struct ieee80211_local *local)
00028 {
00029 }
00030 static inline void ieee80211_led_tx(struct ieee80211_local *local, int q)
00031 {
00032 }
00033 static inline void ieee80211_led_assoc(struct ieee80211_local *local,
00034 bool associated)
00035 {
00036 }
00037 static inline void ieee80211_led_radio(struct ieee80211_local *local,
00038 bool enabled)
00039 {
00040 }
00041 static inline void ieee80211_led_names(struct ieee80211_local *local)
00042 {
00043 }
00044 static inline void ieee80211_led_init(struct ieee80211_local *local)
00045 {
00046 }
00047 static inline void ieee80211_led_exit(struct ieee80211_local *local)
00048 {
00049 }
00050 static inline void ieee80211_mod_tpt_led_trig(struct ieee80211_local *local,
00051 unsigned int types_on,
00052 unsigned int types_off)
00053 {
00054 }
00055 #endif
00056
00057 static inline void
00058 ieee80211_tpt_led_trig_tx(struct ieee80211_local *local, __le16 fc, int bytes)
00059 {
00060 #ifdef CONFIG_MAC80211_LEDS
00061 if (local->tpt_led_trigger && ieee80211_is_data(fc))
00062 local->tpt_led_trigger->tx_bytes += bytes;
00063 #endif
00064 }
00065
00066 static inline void
00067 ieee80211_tpt_led_trig_rx(struct ieee80211_local *local, __le16 fc, int bytes)
00068 {
00069 #ifdef CONFIG_MAC80211_LEDS
00070 if (local->tpt_led_trigger && ieee80211_is_data(fc))
00071 local->tpt_led_trigger->rx_bytes += bytes;
00072 #endif
00073 }