aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-3945-led.c
diff options
context:
space:
mode:
authorAbhijeet Kolekar <abhijeet.kolekar@intel.com>2008-12-18 21:37:28 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:13 -0500
commit4a8a43222db6f04c88def2160a95f978f704b515 (patch)
treec5b5666c735e4f78045688ece7f5879f9529b032 /drivers/net/wireless/iwlwifi/iwl-3945-led.c
parentf2c7e52100545e54af064fe0345d141fdcf2d243 (diff)
iwl3945: replaces iwl3945_priv with iwl_priv
The patch replaces iwl3945_priv to iwl_priv. It adds 3945 specific data members to iwl_priv. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945-led.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945-led.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-led.c b/drivers/net/wireless/iwlwifi/iwl-3945-led.c
index 1ef21b6b3c4f..165da9e314d9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-led.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-led.c
@@ -67,7 +67,7 @@ static const struct {
67#define IWL_MAX_BLINK_TBL (ARRAY_SIZE(blink_tbl) - 1) /*Exclude Solid on*/ 67#define IWL_MAX_BLINK_TBL (ARRAY_SIZE(blink_tbl) - 1) /*Exclude Solid on*/
68#define IWL_SOLID_BLINK_IDX (ARRAY_SIZE(blink_tbl) - 1) 68#define IWL_SOLID_BLINK_IDX (ARRAY_SIZE(blink_tbl) - 1)
69 69
70static int iwl3945_led_cmd_callback(struct iwl3945_priv *priv, 70static int iwl3945_led_cmd_callback(struct iwl_priv *priv,
71 struct iwl3945_cmd *cmd, 71 struct iwl3945_cmd *cmd,
72 struct sk_buff *skb) 72 struct sk_buff *skb)
73{ 73{
@@ -80,7 +80,7 @@ static inline int iwl3945_brightness_to_idx(enum led_brightness brightness)
80} 80}
81 81
82/* Send led command */ 82/* Send led command */
83static int iwl_send_led_cmd(struct iwl3945_priv *priv, 83static int iwl_send_led_cmd(struct iwl_priv *priv,
84 struct iwl_led_cmd *led_cmd) 84 struct iwl_led_cmd *led_cmd)
85{ 85{
86 struct iwl3945_host_cmd cmd = { 86 struct iwl3945_host_cmd cmd = {
@@ -97,7 +97,7 @@ static int iwl_send_led_cmd(struct iwl3945_priv *priv,
97 97
98 98
99/* Set led on command */ 99/* Set led on command */
100static int iwl3945_led_pattern(struct iwl3945_priv *priv, int led_id, 100static int iwl3945_led_pattern(struct iwl_priv *priv, int led_id,
101 unsigned int idx) 101 unsigned int idx)
102{ 102{
103 struct iwl_led_cmd led_cmd = { 103 struct iwl_led_cmd led_cmd = {
@@ -115,7 +115,7 @@ static int iwl3945_led_pattern(struct iwl3945_priv *priv, int led_id,
115 115
116 116
117/* Set led on command */ 117/* Set led on command */
118static int iwl3945_led_on(struct iwl3945_priv *priv, int led_id) 118static int iwl3945_led_on(struct iwl_priv *priv, int led_id)
119{ 119{
120 struct iwl_led_cmd led_cmd = { 120 struct iwl_led_cmd led_cmd = {
121 .id = led_id, 121 .id = led_id,
@@ -127,7 +127,7 @@ static int iwl3945_led_on(struct iwl3945_priv *priv, int led_id)
127} 127}
128 128
129/* Set led off command */ 129/* Set led off command */
130static int iwl3945_led_off(struct iwl3945_priv *priv, int led_id) 130static int iwl3945_led_off(struct iwl_priv *priv, int led_id)
131{ 131{
132 struct iwl_led_cmd led_cmd = { 132 struct iwl_led_cmd led_cmd = {
133 .id = led_id, 133 .id = led_id,
@@ -142,7 +142,7 @@ static int iwl3945_led_off(struct iwl3945_priv *priv, int led_id)
142/* 142/*
143 * brightness call back function for Tx/Rx LED 143 * brightness call back function for Tx/Rx LED
144 */ 144 */
145static int iwl3945_led_associated(struct iwl3945_priv *priv, int led_id) 145static int iwl3945_led_associated(struct iwl_priv *priv, int led_id)
146{ 146{
147 if (test_bit(STATUS_EXIT_PENDING, &priv->status) || 147 if (test_bit(STATUS_EXIT_PENDING, &priv->status) ||
148 !test_bit(STATUS_READY, &priv->status)) 148 !test_bit(STATUS_READY, &priv->status))
@@ -163,7 +163,7 @@ static void iwl3945_led_brightness_set(struct led_classdev *led_cdev,
163{ 163{
164 struct iwl3945_led *led = container_of(led_cdev, 164 struct iwl3945_led *led = container_of(led_cdev,
165 struct iwl3945_led, led_dev); 165 struct iwl3945_led, led_dev);
166 struct iwl3945_priv *priv = led->priv; 166 struct iwl_priv *priv = led->priv;
167 167
168 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 168 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
169 return; 169 return;
@@ -199,7 +199,7 @@ static void iwl3945_led_brightness_set(struct led_classdev *led_cdev,
199/* 199/*
200 * Register led class with the system 200 * Register led class with the system
201 */ 201 */
202static int iwl3945_led_register_led(struct iwl3945_priv *priv, 202static int iwl3945_led_register_led(struct iwl_priv *priv,
203 struct iwl3945_led *led, 203 struct iwl3945_led *led,
204 enum led_type type, u8 set_led, 204 enum led_type type, u8 set_led,
205 char *trigger) 205 char *trigger)
@@ -231,7 +231,7 @@ static int iwl3945_led_register_led(struct iwl3945_priv *priv,
231/* 231/*
232 * calculate blink rate according to last 2 sec Tx/Rx activities 232 * calculate blink rate according to last 2 sec Tx/Rx activities
233 */ 233 */
234static inline u8 get_blink_rate(struct iwl3945_priv *priv) 234static inline u8 get_blink_rate(struct iwl_priv *priv)
235{ 235{
236 int index; 236 int index;
237 u64 current_tpt = priv->rxtxpackets; 237 u64 current_tpt = priv->rxtxpackets;
@@ -250,7 +250,7 @@ static inline u8 get_blink_rate(struct iwl3945_priv *priv)
250 return index; 250 return index;
251} 251}
252 252
253static inline int is_rf_kill(struct iwl3945_priv *priv) 253static inline int is_rf_kill(struct iwl_priv *priv)
254{ 254{
255 return test_bit(STATUS_RF_KILL_HW, &priv->status) || 255 return test_bit(STATUS_RF_KILL_HW, &priv->status) ||
256 test_bit(STATUS_RF_KILL_SW, &priv->status); 256 test_bit(STATUS_RF_KILL_SW, &priv->status);
@@ -261,7 +261,7 @@ static inline int is_rf_kill(struct iwl3945_priv *priv)
261 * happen very frequent we postpone led command to be called from 261 * happen very frequent we postpone led command to be called from
262 * REPLY handler so we know ucode is up 262 * REPLY handler so we know ucode is up
263 */ 263 */
264void iwl3945_led_background(struct iwl3945_priv *priv) 264void iwl3945_led_background(struct iwl_priv *priv)
265{ 265{
266 u8 blink_idx; 266 u8 blink_idx;
267 267
@@ -301,7 +301,7 @@ void iwl3945_led_background(struct iwl3945_priv *priv)
301 301
302 302
303/* Register all led handler */ 303/* Register all led handler */
304int iwl3945_led_register(struct iwl3945_priv *priv) 304int iwl3945_led_register(struct iwl_priv *priv)
305{ 305{
306 char *trigger; 306 char *trigger;
307 int ret; 307 int ret;
@@ -399,7 +399,7 @@ static void iwl3945_led_unregister_led(struct iwl3945_led *led, u8 set_led)
399} 399}
400 400
401/* Unregister all led handlers */ 401/* Unregister all led handlers */
402void iwl3945_led_unregister(struct iwl3945_priv *priv) 402void iwl3945_led_unregister(struct iwl_priv *priv)
403{ 403{
404 iwl3945_led_unregister_led(&priv->led39[IWL_LED_TRG_ASSOC], 0); 404 iwl3945_led_unregister_led(&priv->led39[IWL_LED_TRG_ASSOC], 0);
405 iwl3945_led_unregister_led(&priv->led39[IWL_LED_TRG_RX], 0); 405 iwl3945_led_unregister_led(&priv->led39[IWL_LED_TRG_RX], 0);