Lines Matching refs:local

15 void ieee80211_led_rx(struct ieee80211_local *local)  in ieee80211_led_rx()  argument
17 if (unlikely(!local->rx_led)) in ieee80211_led_rx()
19 if (local->rx_led_counter++ % 2 == 0) in ieee80211_led_rx()
20 led_trigger_event(local->rx_led, LED_OFF); in ieee80211_led_rx()
22 led_trigger_event(local->rx_led, LED_FULL); in ieee80211_led_rx()
26 void ieee80211_led_tx(struct ieee80211_local *local, int q) in ieee80211_led_tx() argument
28 if (unlikely(!local->tx_led)) in ieee80211_led_tx()
31 local->tx_led_counter += 2*q-1; in ieee80211_led_tx()
32 if (local->tx_led_counter % 2 == 0) in ieee80211_led_tx()
33 led_trigger_event(local->tx_led, LED_OFF); in ieee80211_led_tx()
35 led_trigger_event(local->tx_led, LED_FULL); in ieee80211_led_tx()
38 void ieee80211_led_assoc(struct ieee80211_local *local, bool associated) in ieee80211_led_assoc() argument
40 if (unlikely(!local->assoc_led)) in ieee80211_led_assoc()
43 led_trigger_event(local->assoc_led, LED_FULL); in ieee80211_led_assoc()
45 led_trigger_event(local->assoc_led, LED_OFF); in ieee80211_led_assoc()
48 void ieee80211_led_radio(struct ieee80211_local *local, bool enabled) in ieee80211_led_radio() argument
50 if (unlikely(!local->radio_led)) in ieee80211_led_radio()
53 led_trigger_event(local->radio_led, LED_FULL); in ieee80211_led_radio()
55 led_trigger_event(local->radio_led, LED_OFF); in ieee80211_led_radio()
58 void ieee80211_led_names(struct ieee80211_local *local) in ieee80211_led_names() argument
60 snprintf(local->rx_led_name, sizeof(local->rx_led_name), in ieee80211_led_names()
61 "%srx", wiphy_name(local->hw.wiphy)); in ieee80211_led_names()
62 snprintf(local->tx_led_name, sizeof(local->tx_led_name), in ieee80211_led_names()
63 "%stx", wiphy_name(local->hw.wiphy)); in ieee80211_led_names()
64 snprintf(local->assoc_led_name, sizeof(local->assoc_led_name), in ieee80211_led_names()
65 "%sassoc", wiphy_name(local->hw.wiphy)); in ieee80211_led_names()
66 snprintf(local->radio_led_name, sizeof(local->radio_led_name), in ieee80211_led_names()
67 "%sradio", wiphy_name(local->hw.wiphy)); in ieee80211_led_names()
70 void ieee80211_led_init(struct ieee80211_local *local) in ieee80211_led_init() argument
72 local->rx_led = kzalloc(sizeof(struct led_trigger), GFP_KERNEL); in ieee80211_led_init()
73 if (local->rx_led) { in ieee80211_led_init()
74 local->rx_led->name = local->rx_led_name; in ieee80211_led_init()
75 if (led_trigger_register(local->rx_led)) { in ieee80211_led_init()
76 kfree(local->rx_led); in ieee80211_led_init()
77 local->rx_led = NULL; in ieee80211_led_init()
81 local->tx_led = kzalloc(sizeof(struct led_trigger), GFP_KERNEL); in ieee80211_led_init()
82 if (local->tx_led) { in ieee80211_led_init()
83 local->tx_led->name = local->tx_led_name; in ieee80211_led_init()
84 if (led_trigger_register(local->tx_led)) { in ieee80211_led_init()
85 kfree(local->tx_led); in ieee80211_led_init()
86 local->tx_led = NULL; in ieee80211_led_init()
90 local->assoc_led = kzalloc(sizeof(struct led_trigger), GFP_KERNEL); in ieee80211_led_init()
91 if (local->assoc_led) { in ieee80211_led_init()
92 local->assoc_led->name = local->assoc_led_name; in ieee80211_led_init()
93 if (led_trigger_register(local->assoc_led)) { in ieee80211_led_init()
94 kfree(local->assoc_led); in ieee80211_led_init()
95 local->assoc_led = NULL; in ieee80211_led_init()
99 local->radio_led = kzalloc(sizeof(struct led_trigger), GFP_KERNEL); in ieee80211_led_init()
100 if (local->radio_led) { in ieee80211_led_init()
101 local->radio_led->name = local->radio_led_name; in ieee80211_led_init()
102 if (led_trigger_register(local->radio_led)) { in ieee80211_led_init()
103 kfree(local->radio_led); in ieee80211_led_init()
104 local->radio_led = NULL; in ieee80211_led_init()
108 if (local->tpt_led_trigger) { in ieee80211_led_init()
109 if (led_trigger_register(&local->tpt_led_trigger->trig)) { in ieee80211_led_init()
110 kfree(local->tpt_led_trigger); in ieee80211_led_init()
111 local->tpt_led_trigger = NULL; in ieee80211_led_init()
116 void ieee80211_led_exit(struct ieee80211_local *local) in ieee80211_led_exit() argument
118 if (local->radio_led) { in ieee80211_led_exit()
119 led_trigger_unregister(local->radio_led); in ieee80211_led_exit()
120 kfree(local->radio_led); in ieee80211_led_exit()
122 if (local->assoc_led) { in ieee80211_led_exit()
123 led_trigger_unregister(local->assoc_led); in ieee80211_led_exit()
124 kfree(local->assoc_led); in ieee80211_led_exit()
126 if (local->tx_led) { in ieee80211_led_exit()
127 led_trigger_unregister(local->tx_led); in ieee80211_led_exit()
128 kfree(local->tx_led); in ieee80211_led_exit()
130 if (local->rx_led) { in ieee80211_led_exit()
131 led_trigger_unregister(local->rx_led); in ieee80211_led_exit()
132 kfree(local->rx_led); in ieee80211_led_exit()
135 if (local->tpt_led_trigger) { in ieee80211_led_exit()
136 led_trigger_unregister(&local->tpt_led_trigger->trig); in ieee80211_led_exit()
137 kfree(local->tpt_led_trigger); in ieee80211_led_exit()
143 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_get_radio_led_name() local
145 return local->radio_led_name; in __ieee80211_get_radio_led_name()
151 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_get_assoc_led_name() local
153 return local->assoc_led_name; in __ieee80211_get_assoc_led_name()
159 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_get_tx_led_name() local
161 return local->tx_led_name; in __ieee80211_get_tx_led_name()
167 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_get_rx_led_name() local
169 return local->rx_led_name; in __ieee80211_get_rx_led_name()
173 static unsigned long tpt_trig_traffic(struct ieee80211_local *local, in tpt_trig_traffic() argument
187 struct ieee80211_local *local = (void *)data; in tpt_trig_timer() local
188 struct tpt_led_trigger *tpt_trig = local->tpt_led_trigger; in tpt_trig_timer()
198 tpt = tpt_trig_traffic(local, tpt_trig); in tpt_trig_timer()
224 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_create_tpt_led_trigger() local
227 if (WARN_ON(local->tpt_led_trigger)) in __ieee80211_create_tpt_led_trigger()
235 "%stpt", wiphy_name(local->hw.wiphy)); in __ieee80211_create_tpt_led_trigger()
243 setup_timer(&tpt_trig->timer, tpt_trig_timer, (unsigned long)local); in __ieee80211_create_tpt_led_trigger()
245 local->tpt_led_trigger = tpt_trig; in __ieee80211_create_tpt_led_trigger()
251 static void ieee80211_start_tpt_led_trig(struct ieee80211_local *local) in ieee80211_start_tpt_led_trig() argument
253 struct tpt_led_trigger *tpt_trig = local->tpt_led_trigger; in ieee80211_start_tpt_led_trig()
259 tpt_trig_traffic(local, tpt_trig); in ieee80211_start_tpt_led_trig()
262 tpt_trig_timer((unsigned long)local); in ieee80211_start_tpt_led_trig()
266 static void ieee80211_stop_tpt_led_trig(struct ieee80211_local *local) in ieee80211_stop_tpt_led_trig() argument
268 struct tpt_led_trigger *tpt_trig = local->tpt_led_trigger; in ieee80211_stop_tpt_led_trig()
283 void ieee80211_mod_tpt_led_trig(struct ieee80211_local *local, in ieee80211_mod_tpt_led_trig() argument
286 struct tpt_led_trigger *tpt_trig = local->tpt_led_trigger; in ieee80211_mod_tpt_led_trig()
306 ieee80211_stop_tpt_led_trig(local); in ieee80211_mod_tpt_led_trig()
308 ieee80211_start_tpt_led_trig(local); in ieee80211_mod_tpt_led_trig()