diff options
Diffstat (limited to 'drivers/net/wireless/libertas/main.c')
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 528 |
1 files changed, 264 insertions, 264 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 1823b48a8ba7..825970af3419 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include "join.h" | 24 | #include "join.h" |
25 | 25 | ||
26 | #define DRIVER_RELEASE_VERSION "323.p0" | 26 | #define DRIVER_RELEASE_VERSION "323.p0" |
27 | const char libertas_driver_version[] = "COMM-USB8388-" DRIVER_RELEASE_VERSION | 27 | const char lbs_driver_version[] = "COMM-USB8388-" DRIVER_RELEASE_VERSION |
28 | #ifdef DEBUG | 28 | #ifdef DEBUG |
29 | "-dbg" | 29 | "-dbg" |
30 | #endif | 30 | #endif |
@@ -32,80 +32,80 @@ const char libertas_driver_version[] = "COMM-USB8388-" DRIVER_RELEASE_VERSION | |||
32 | 32 | ||
33 | 33 | ||
34 | /* Module parameters */ | 34 | /* Module parameters */ |
35 | unsigned int libertas_debug = 0; | 35 | unsigned int lbs_debug; |
36 | module_param(libertas_debug, int, 0644); | 36 | EXPORT_SYMBOL_GPL(lbs_debug); |
37 | EXPORT_SYMBOL_GPL(libertas_debug); | 37 | module_param_named(libertas_debug, lbs_debug, int, 0644); |
38 | 38 | ||
39 | 39 | ||
40 | #define WLAN_TX_PWR_DEFAULT 20 /*100mW */ | 40 | #define LBS_TX_PWR_DEFAULT 20 /*100mW */ |
41 | #define WLAN_TX_PWR_US_DEFAULT 20 /*100mW */ | 41 | #define LBS_TX_PWR_US_DEFAULT 20 /*100mW */ |
42 | #define WLAN_TX_PWR_JP_DEFAULT 16 /*50mW */ | 42 | #define LBS_TX_PWR_JP_DEFAULT 16 /*50mW */ |
43 | #define WLAN_TX_PWR_FR_DEFAULT 20 /*100mW */ | 43 | #define LBS_TX_PWR_FR_DEFAULT 20 /*100mW */ |
44 | #define WLAN_TX_PWR_EMEA_DEFAULT 20 /*100mW */ | 44 | #define LBS_TX_PWR_EMEA_DEFAULT 20 /*100mW */ |
45 | 45 | ||
46 | /* Format { channel, frequency (MHz), maxtxpower } */ | 46 | /* Format { channel, frequency (MHz), maxtxpower } */ |
47 | /* band: 'B/G', region: USA FCC/Canada IC */ | 47 | /* band: 'B/G', region: USA FCC/Canada IC */ |
48 | static struct chan_freq_power channel_freq_power_US_BG[] = { | 48 | static struct chan_freq_power channel_freq_power_US_BG[] = { |
49 | {1, 2412, WLAN_TX_PWR_US_DEFAULT}, | 49 | {1, 2412, LBS_TX_PWR_US_DEFAULT}, |
50 | {2, 2417, WLAN_TX_PWR_US_DEFAULT}, | 50 | {2, 2417, LBS_TX_PWR_US_DEFAULT}, |
51 | {3, 2422, WLAN_TX_PWR_US_DEFAULT}, | 51 | {3, 2422, LBS_TX_PWR_US_DEFAULT}, |
52 | {4, 2427, WLAN_TX_PWR_US_DEFAULT}, | 52 | {4, 2427, LBS_TX_PWR_US_DEFAULT}, |
53 | {5, 2432, WLAN_TX_PWR_US_DEFAULT}, | 53 | {5, 2432, LBS_TX_PWR_US_DEFAULT}, |
54 | {6, 2437, WLAN_TX_PWR_US_DEFAULT}, | 54 | {6, 2437, LBS_TX_PWR_US_DEFAULT}, |
55 | {7, 2442, WLAN_TX_PWR_US_DEFAULT}, | 55 | {7, 2442, LBS_TX_PWR_US_DEFAULT}, |
56 | {8, 2447, WLAN_TX_PWR_US_DEFAULT}, | 56 | {8, 2447, LBS_TX_PWR_US_DEFAULT}, |
57 | {9, 2452, WLAN_TX_PWR_US_DEFAULT}, | 57 | {9, 2452, LBS_TX_PWR_US_DEFAULT}, |
58 | {10, 2457, WLAN_TX_PWR_US_DEFAULT}, | 58 | {10, 2457, LBS_TX_PWR_US_DEFAULT}, |
59 | {11, 2462, WLAN_TX_PWR_US_DEFAULT} | 59 | {11, 2462, LBS_TX_PWR_US_DEFAULT} |
60 | }; | 60 | }; |
61 | 61 | ||
62 | /* band: 'B/G', region: Europe ETSI */ | 62 | /* band: 'B/G', region: Europe ETSI */ |
63 | static struct chan_freq_power channel_freq_power_EU_BG[] = { | 63 | static struct chan_freq_power channel_freq_power_EU_BG[] = { |
64 | {1, 2412, WLAN_TX_PWR_EMEA_DEFAULT}, | 64 | {1, 2412, LBS_TX_PWR_EMEA_DEFAULT}, |
65 | {2, 2417, WLAN_TX_PWR_EMEA_DEFAULT}, | 65 | {2, 2417, LBS_TX_PWR_EMEA_DEFAULT}, |
66 | {3, 2422, WLAN_TX_PWR_EMEA_DEFAULT}, | 66 | {3, 2422, LBS_TX_PWR_EMEA_DEFAULT}, |
67 | {4, 2427, WLAN_TX_PWR_EMEA_DEFAULT}, | 67 | {4, 2427, LBS_TX_PWR_EMEA_DEFAULT}, |
68 | {5, 2432, WLAN_TX_PWR_EMEA_DEFAULT}, | 68 | {5, 2432, LBS_TX_PWR_EMEA_DEFAULT}, |
69 | {6, 2437, WLAN_TX_PWR_EMEA_DEFAULT}, | 69 | {6, 2437, LBS_TX_PWR_EMEA_DEFAULT}, |
70 | {7, 2442, WLAN_TX_PWR_EMEA_DEFAULT}, | 70 | {7, 2442, LBS_TX_PWR_EMEA_DEFAULT}, |
71 | {8, 2447, WLAN_TX_PWR_EMEA_DEFAULT}, | 71 | {8, 2447, LBS_TX_PWR_EMEA_DEFAULT}, |
72 | {9, 2452, WLAN_TX_PWR_EMEA_DEFAULT}, | 72 | {9, 2452, LBS_TX_PWR_EMEA_DEFAULT}, |
73 | {10, 2457, WLAN_TX_PWR_EMEA_DEFAULT}, | 73 | {10, 2457, LBS_TX_PWR_EMEA_DEFAULT}, |
74 | {11, 2462, WLAN_TX_PWR_EMEA_DEFAULT}, | 74 | {11, 2462, LBS_TX_PWR_EMEA_DEFAULT}, |
75 | {12, 2467, WLAN_TX_PWR_EMEA_DEFAULT}, | 75 | {12, 2467, LBS_TX_PWR_EMEA_DEFAULT}, |
76 | {13, 2472, WLAN_TX_PWR_EMEA_DEFAULT} | 76 | {13, 2472, LBS_TX_PWR_EMEA_DEFAULT} |
77 | }; | 77 | }; |
78 | 78 | ||
79 | /* band: 'B/G', region: Spain */ | 79 | /* band: 'B/G', region: Spain */ |
80 | static struct chan_freq_power channel_freq_power_SPN_BG[] = { | 80 | static struct chan_freq_power channel_freq_power_SPN_BG[] = { |
81 | {10, 2457, WLAN_TX_PWR_DEFAULT}, | 81 | {10, 2457, LBS_TX_PWR_DEFAULT}, |
82 | {11, 2462, WLAN_TX_PWR_DEFAULT} | 82 | {11, 2462, LBS_TX_PWR_DEFAULT} |
83 | }; | 83 | }; |
84 | 84 | ||
85 | /* band: 'B/G', region: France */ | 85 | /* band: 'B/G', region: France */ |
86 | static struct chan_freq_power channel_freq_power_FR_BG[] = { | 86 | static struct chan_freq_power channel_freq_power_FR_BG[] = { |
87 | {10, 2457, WLAN_TX_PWR_FR_DEFAULT}, | 87 | {10, 2457, LBS_TX_PWR_FR_DEFAULT}, |
88 | {11, 2462, WLAN_TX_PWR_FR_DEFAULT}, | 88 | {11, 2462, LBS_TX_PWR_FR_DEFAULT}, |
89 | {12, 2467, WLAN_TX_PWR_FR_DEFAULT}, | 89 | {12, 2467, LBS_TX_PWR_FR_DEFAULT}, |
90 | {13, 2472, WLAN_TX_PWR_FR_DEFAULT} | 90 | {13, 2472, LBS_TX_PWR_FR_DEFAULT} |
91 | }; | 91 | }; |
92 | 92 | ||
93 | /* band: 'B/G', region: Japan */ | 93 | /* band: 'B/G', region: Japan */ |
94 | static struct chan_freq_power channel_freq_power_JPN_BG[] = { | 94 | static struct chan_freq_power channel_freq_power_JPN_BG[] = { |
95 | {1, 2412, WLAN_TX_PWR_JP_DEFAULT}, | 95 | {1, 2412, LBS_TX_PWR_JP_DEFAULT}, |
96 | {2, 2417, WLAN_TX_PWR_JP_DEFAULT}, | 96 | {2, 2417, LBS_TX_PWR_JP_DEFAULT}, |
97 | {3, 2422, WLAN_TX_PWR_JP_DEFAULT}, | 97 | {3, 2422, LBS_TX_PWR_JP_DEFAULT}, |
98 | {4, 2427, WLAN_TX_PWR_JP_DEFAULT}, | 98 | {4, 2427, LBS_TX_PWR_JP_DEFAULT}, |
99 | {5, 2432, WLAN_TX_PWR_JP_DEFAULT}, | 99 | {5, 2432, LBS_TX_PWR_JP_DEFAULT}, |
100 | {6, 2437, WLAN_TX_PWR_JP_DEFAULT}, | 100 | {6, 2437, LBS_TX_PWR_JP_DEFAULT}, |
101 | {7, 2442, WLAN_TX_PWR_JP_DEFAULT}, | 101 | {7, 2442, LBS_TX_PWR_JP_DEFAULT}, |
102 | {8, 2447, WLAN_TX_PWR_JP_DEFAULT}, | 102 | {8, 2447, LBS_TX_PWR_JP_DEFAULT}, |
103 | {9, 2452, WLAN_TX_PWR_JP_DEFAULT}, | 103 | {9, 2452, LBS_TX_PWR_JP_DEFAULT}, |
104 | {10, 2457, WLAN_TX_PWR_JP_DEFAULT}, | 104 | {10, 2457, LBS_TX_PWR_JP_DEFAULT}, |
105 | {11, 2462, WLAN_TX_PWR_JP_DEFAULT}, | 105 | {11, 2462, LBS_TX_PWR_JP_DEFAULT}, |
106 | {12, 2467, WLAN_TX_PWR_JP_DEFAULT}, | 106 | {12, 2467, LBS_TX_PWR_JP_DEFAULT}, |
107 | {13, 2472, WLAN_TX_PWR_JP_DEFAULT}, | 107 | {13, 2472, LBS_TX_PWR_JP_DEFAULT}, |
108 | {14, 2484, WLAN_TX_PWR_JP_DEFAULT} | 108 | {14, 2484, LBS_TX_PWR_JP_DEFAULT} |
109 | }; | 109 | }; |
110 | 110 | ||
111 | /** | 111 | /** |
@@ -153,13 +153,13 @@ static struct region_cfp_table region_cfp_table[] = { | |||
153 | /** | 153 | /** |
154 | * the table to keep region code | 154 | * the table to keep region code |
155 | */ | 155 | */ |
156 | u16 libertas_region_code_to_index[MRVDRV_MAX_REGION_CODE] = | 156 | u16 lbs_region_code_to_index[MRVDRV_MAX_REGION_CODE] = |
157 | { 0x10, 0x20, 0x30, 0x31, 0x32, 0x40 }; | 157 | { 0x10, 0x20, 0x30, 0x31, 0x32, 0x40 }; |
158 | 158 | ||
159 | /** | 159 | /** |
160 | * 802.11b/g supported bitrates (in 500Kb/s units) | 160 | * 802.11b/g supported bitrates (in 500Kb/s units) |
161 | */ | 161 | */ |
162 | u8 libertas_bg_rates[MAX_RATES] = | 162 | u8 lbs_bg_rates[MAX_RATES] = |
163 | { 0x02, 0x04, 0x0b, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6c, | 163 | { 0x02, 0x04, 0x0b, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6c, |
164 | 0x00, 0x00 }; | 164 | 0x00, 0x00 }; |
165 | 165 | ||
@@ -179,7 +179,7 @@ static u8 fw_data_rates[MAX_RATES] = | |||
179 | * @param idx The index of data rate | 179 | * @param idx The index of data rate |
180 | * @return data rate or 0 | 180 | * @return data rate or 0 |
181 | */ | 181 | */ |
182 | u32 libertas_fw_index_to_data_rate(u8 idx) | 182 | u32 lbs_fw_index_to_data_rate(u8 idx) |
183 | { | 183 | { |
184 | if (idx >= sizeof(fw_data_rates)) | 184 | if (idx >= sizeof(fw_data_rates)) |
185 | idx = 0; | 185 | idx = 0; |
@@ -192,7 +192,7 @@ u32 libertas_fw_index_to_data_rate(u8 idx) | |||
192 | * @param rate data rate | 192 | * @param rate data rate |
193 | * @return index or 0 | 193 | * @return index or 0 |
194 | */ | 194 | */ |
195 | u8 libertas_data_rate_to_fw_index(u32 rate) | 195 | u8 lbs_data_rate_to_fw_index(u32 rate) |
196 | { | 196 | { |
197 | u8 i; | 197 | u8 i; |
198 | 198 | ||
@@ -213,13 +213,13 @@ u8 libertas_data_rate_to_fw_index(u32 rate) | |||
213 | /** | 213 | /** |
214 | * @brief Get function for sysfs attribute anycast_mask | 214 | * @brief Get function for sysfs attribute anycast_mask |
215 | */ | 215 | */ |
216 | static ssize_t libertas_anycast_get(struct device * dev, | 216 | static ssize_t lbs_anycast_get(struct device *dev, |
217 | struct device_attribute *attr, char * buf) | 217 | struct device_attribute *attr, char * buf) |
218 | { | 218 | { |
219 | struct cmd_ds_mesh_access mesh_access; | 219 | struct cmd_ds_mesh_access mesh_access; |
220 | 220 | ||
221 | memset(&mesh_access, 0, sizeof(mesh_access)); | 221 | memset(&mesh_access, 0, sizeof(mesh_access)); |
222 | libertas_prepare_and_send_command(to_net_dev(dev)->priv, | 222 | lbs_prepare_and_send_command(to_net_dev(dev)->priv, |
223 | CMD_MESH_ACCESS, | 223 | CMD_MESH_ACCESS, |
224 | CMD_ACT_MESH_GET_ANYCAST, | 224 | CMD_ACT_MESH_GET_ANYCAST, |
225 | CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access); | 225 | CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access); |
@@ -230,7 +230,7 @@ static ssize_t libertas_anycast_get(struct device * dev, | |||
230 | /** | 230 | /** |
231 | * @brief Set function for sysfs attribute anycast_mask | 231 | * @brief Set function for sysfs attribute anycast_mask |
232 | */ | 232 | */ |
233 | static ssize_t libertas_anycast_set(struct device * dev, | 233 | static ssize_t lbs_anycast_set(struct device *dev, |
234 | struct device_attribute *attr, const char * buf, size_t count) | 234 | struct device_attribute *attr, const char * buf, size_t count) |
235 | { | 235 | { |
236 | struct cmd_ds_mesh_access mesh_access; | 236 | struct cmd_ds_mesh_access mesh_access; |
@@ -240,86 +240,86 @@ static ssize_t libertas_anycast_set(struct device * dev, | |||
240 | sscanf(buf, "%x", &datum); | 240 | sscanf(buf, "%x", &datum); |
241 | mesh_access.data[0] = cpu_to_le32(datum); | 241 | mesh_access.data[0] = cpu_to_le32(datum); |
242 | 242 | ||
243 | libertas_prepare_and_send_command((to_net_dev(dev))->priv, | 243 | lbs_prepare_and_send_command((to_net_dev(dev))->priv, |
244 | CMD_MESH_ACCESS, | 244 | CMD_MESH_ACCESS, |
245 | CMD_ACT_MESH_SET_ANYCAST, | 245 | CMD_ACT_MESH_SET_ANYCAST, |
246 | CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access); | 246 | CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access); |
247 | return strlen(buf); | 247 | return strlen(buf); |
248 | } | 248 | } |
249 | 249 | ||
250 | int libertas_add_rtap(wlan_private *priv); | 250 | int lbs_add_rtap(lbs_private *priv); |
251 | void libertas_remove_rtap(wlan_private *priv); | 251 | void lbs_remove_rtap(lbs_private *priv); |
252 | 252 | ||
253 | /** | 253 | /** |
254 | * Get function for sysfs attribute rtap | 254 | * Get function for sysfs attribute rtap |
255 | */ | 255 | */ |
256 | static ssize_t libertas_rtap_get(struct device * dev, | 256 | static ssize_t lbs_rtap_get(struct device *dev, |
257 | struct device_attribute *attr, char * buf) | 257 | struct device_attribute *attr, char * buf) |
258 | { | 258 | { |
259 | wlan_private *priv = (wlan_private *) (to_net_dev(dev))->priv; | 259 | lbs_private *priv = (lbs_private *) (to_net_dev(dev))->priv; |
260 | wlan_adapter *adapter = priv->adapter; | 260 | lbs_adapter *adapter = priv->adapter; |
261 | return snprintf(buf, 5, "0x%X\n", adapter->monitormode); | 261 | return snprintf(buf, 5, "0x%X\n", adapter->monitormode); |
262 | } | 262 | } |
263 | 263 | ||
264 | /** | 264 | /** |
265 | * Set function for sysfs attribute rtap | 265 | * Set function for sysfs attribute rtap |
266 | */ | 266 | */ |
267 | static ssize_t libertas_rtap_set(struct device * dev, | 267 | static ssize_t lbs_rtap_set(struct device *dev, |
268 | struct device_attribute *attr, const char * buf, size_t count) | 268 | struct device_attribute *attr, const char * buf, size_t count) |
269 | { | 269 | { |
270 | int monitor_mode; | 270 | int monitor_mode; |
271 | wlan_private *priv = (wlan_private *) (to_net_dev(dev))->priv; | 271 | lbs_private *priv = (lbs_private *) (to_net_dev(dev))->priv; |
272 | wlan_adapter *adapter = priv->adapter; | 272 | lbs_adapter *adapter = priv->adapter; |
273 | 273 | ||
274 | sscanf(buf, "%x", &monitor_mode); | 274 | sscanf(buf, "%x", &monitor_mode); |
275 | if (monitor_mode != WLAN_MONITOR_OFF) { | 275 | if (monitor_mode != LBS_MONITOR_OFF) { |
276 | if(adapter->monitormode == monitor_mode) | 276 | if(adapter->monitormode == monitor_mode) |
277 | return strlen(buf); | 277 | return strlen(buf); |
278 | if (adapter->monitormode == WLAN_MONITOR_OFF) { | 278 | if (adapter->monitormode == LBS_MONITOR_OFF) { |
279 | if (adapter->mode == IW_MODE_INFRA) | 279 | if (adapter->mode == IW_MODE_INFRA) |
280 | libertas_send_deauthentication(priv); | 280 | lbs_send_deauthentication(priv); |
281 | else if (adapter->mode == IW_MODE_ADHOC) | 281 | else if (adapter->mode == IW_MODE_ADHOC) |
282 | libertas_stop_adhoc_network(priv); | 282 | lbs_stop_adhoc_network(priv); |
283 | libertas_add_rtap(priv); | 283 | lbs_add_rtap(priv); |
284 | } | 284 | } |
285 | adapter->monitormode = monitor_mode; | 285 | adapter->monitormode = monitor_mode; |
286 | } | 286 | } |
287 | 287 | ||
288 | else { | 288 | else { |
289 | if(adapter->monitormode == WLAN_MONITOR_OFF) | 289 | if (adapter->monitormode == LBS_MONITOR_OFF) |
290 | return strlen(buf); | 290 | return strlen(buf); |
291 | adapter->monitormode = WLAN_MONITOR_OFF; | 291 | adapter->monitormode = LBS_MONITOR_OFF; |
292 | libertas_remove_rtap(priv); | 292 | lbs_remove_rtap(priv); |
293 | netif_wake_queue(priv->dev); | 293 | netif_wake_queue(priv->dev); |
294 | netif_wake_queue(priv->mesh_dev); | 294 | netif_wake_queue(priv->mesh_dev); |
295 | } | 295 | } |
296 | 296 | ||
297 | libertas_prepare_and_send_command(priv, | 297 | lbs_prepare_and_send_command(priv, |
298 | CMD_802_11_MONITOR_MODE, CMD_ACT_SET, | 298 | CMD_802_11_MONITOR_MODE, CMD_ACT_SET, |
299 | CMD_OPTION_WAITFORRSP, 0, &adapter->monitormode); | 299 | CMD_OPTION_WAITFORRSP, 0, &adapter->monitormode); |
300 | return strlen(buf); | 300 | return strlen(buf); |
301 | } | 301 | } |
302 | 302 | ||
303 | /** | 303 | /** |
304 | * libertas_rtap attribute to be exported per mshX interface | 304 | * lbs_rtap attribute to be exported per mshX interface |
305 | * through sysfs (/sys/class/net/mshX/libertas-rtap) | 305 | * through sysfs (/sys/class/net/mshX/libertas-rtap) |
306 | */ | 306 | */ |
307 | static DEVICE_ATTR(libertas_rtap, 0644, libertas_rtap_get, | 307 | static DEVICE_ATTR(lbs_rtap, 0644, lbs_rtap_get, |
308 | libertas_rtap_set ); | 308 | lbs_rtap_set ); |
309 | 309 | ||
310 | /** | 310 | /** |
311 | * anycast_mask attribute to be exported per mshX interface | 311 | * anycast_mask attribute to be exported per mshX interface |
312 | * through sysfs (/sys/class/net/mshX/anycast_mask) | 312 | * through sysfs (/sys/class/net/mshX/anycast_mask) |
313 | */ | 313 | */ |
314 | static DEVICE_ATTR(anycast_mask, 0644, libertas_anycast_get, libertas_anycast_set); | 314 | static DEVICE_ATTR(anycast_mask, 0644, lbs_anycast_get, lbs_anycast_set); |
315 | 315 | ||
316 | static ssize_t libertas_autostart_enabled_get(struct device * dev, | 316 | static ssize_t lbs_autostart_enabled_get(struct device *dev, |
317 | struct device_attribute *attr, char * buf) | 317 | struct device_attribute *attr, char * buf) |
318 | { | 318 | { |
319 | struct cmd_ds_mesh_access mesh_access; | 319 | struct cmd_ds_mesh_access mesh_access; |
320 | 320 | ||
321 | memset(&mesh_access, 0, sizeof(mesh_access)); | 321 | memset(&mesh_access, 0, sizeof(mesh_access)); |
322 | libertas_prepare_and_send_command(to_net_dev(dev)->priv, | 322 | lbs_prepare_and_send_command(to_net_dev(dev)->priv, |
323 | CMD_MESH_ACCESS, | 323 | CMD_MESH_ACCESS, |
324 | CMD_ACT_MESH_GET_AUTOSTART_ENABLED, | 324 | CMD_ACT_MESH_GET_AUTOSTART_ENABLED, |
325 | CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access); | 325 | CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access); |
@@ -327,19 +327,19 @@ static ssize_t libertas_autostart_enabled_get(struct device * dev, | |||
327 | return sprintf(buf, "%d\n", le32_to_cpu(mesh_access.data[0])); | 327 | return sprintf(buf, "%d\n", le32_to_cpu(mesh_access.data[0])); |
328 | } | 328 | } |
329 | 329 | ||
330 | static ssize_t libertas_autostart_enabled_set(struct device * dev, | 330 | static ssize_t lbs_autostart_enabled_set(struct device *dev, |
331 | struct device_attribute *attr, const char * buf, size_t count) | 331 | struct device_attribute *attr, const char * buf, size_t count) |
332 | { | 332 | { |
333 | struct cmd_ds_mesh_access mesh_access; | 333 | struct cmd_ds_mesh_access mesh_access; |
334 | uint32_t datum; | 334 | uint32_t datum; |
335 | wlan_private * priv = (to_net_dev(dev))->priv; | 335 | lbs_private *priv = (to_net_dev(dev))->priv; |
336 | int ret; | 336 | int ret; |
337 | 337 | ||
338 | memset(&mesh_access, 0, sizeof(mesh_access)); | 338 | memset(&mesh_access, 0, sizeof(mesh_access)); |
339 | sscanf(buf, "%d", &datum); | 339 | sscanf(buf, "%d", &datum); |
340 | mesh_access.data[0] = cpu_to_le32(datum); | 340 | mesh_access.data[0] = cpu_to_le32(datum); |
341 | 341 | ||
342 | ret = libertas_prepare_and_send_command(priv, | 342 | ret = lbs_prepare_and_send_command(priv, |
343 | CMD_MESH_ACCESS, | 343 | CMD_MESH_ACCESS, |
344 | CMD_ACT_MESH_SET_AUTOSTART_ENABLED, | 344 | CMD_ACT_MESH_SET_AUTOSTART_ENABLED, |
345 | CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access); | 345 | CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access); |
@@ -350,16 +350,16 @@ static ssize_t libertas_autostart_enabled_set(struct device * dev, | |||
350 | } | 350 | } |
351 | 351 | ||
352 | static DEVICE_ATTR(autostart_enabled, 0644, | 352 | static DEVICE_ATTR(autostart_enabled, 0644, |
353 | libertas_autostart_enabled_get, libertas_autostart_enabled_set); | 353 | lbs_autostart_enabled_get, lbs_autostart_enabled_set); |
354 | 354 | ||
355 | static struct attribute *libertas_mesh_sysfs_entries[] = { | 355 | static struct attribute *lbs_mesh_sysfs_entries[] = { |
356 | &dev_attr_anycast_mask.attr, | 356 | &dev_attr_anycast_mask.attr, |
357 | &dev_attr_autostart_enabled.attr, | 357 | &dev_attr_autostart_enabled.attr, |
358 | NULL, | 358 | NULL, |
359 | }; | 359 | }; |
360 | 360 | ||
361 | static struct attribute_group libertas_mesh_attr_group = { | 361 | static struct attribute_group lbs_mesh_attr_group = { |
362 | .attrs = libertas_mesh_sysfs_entries, | 362 | .attrs = lbs_mesh_sysfs_entries, |
363 | }; | 363 | }; |
364 | 364 | ||
365 | /** | 365 | /** |
@@ -375,8 +375,8 @@ static struct attribute_group libertas_mesh_attr_group = { | |||
375 | */ | 375 | */ |
376 | static int pre_open_check(struct net_device *dev) | 376 | static int pre_open_check(struct net_device *dev) |
377 | { | 377 | { |
378 | wlan_private *priv = (wlan_private *) dev->priv; | 378 | lbs_private *priv = (lbs_private *) dev->priv; |
379 | wlan_adapter *adapter = priv->adapter; | 379 | lbs_adapter *adapter = priv->adapter; |
380 | int i = 0; | 380 | int i = 0; |
381 | 381 | ||
382 | while (!adapter->fw_ready && i < 20) { | 382 | while (!adapter->fw_ready && i < 20) { |
@@ -397,16 +397,16 @@ static int pre_open_check(struct net_device *dev) | |||
397 | * @param dev A pointer to net_device structure | 397 | * @param dev A pointer to net_device structure |
398 | * @return 0 | 398 | * @return 0 |
399 | */ | 399 | */ |
400 | static int libertas_dev_open(struct net_device *dev) | 400 | static int lbs_dev_open(struct net_device *dev) |
401 | { | 401 | { |
402 | wlan_private *priv = (wlan_private *) dev->priv; | 402 | lbs_private *priv = (lbs_private *) dev->priv; |
403 | wlan_adapter *adapter = priv->adapter; | 403 | lbs_adapter *adapter = priv->adapter; |
404 | 404 | ||
405 | lbs_deb_enter(LBS_DEB_NET); | 405 | lbs_deb_enter(LBS_DEB_NET); |
406 | 406 | ||
407 | priv->open = 1; | 407 | priv->open = 1; |
408 | 408 | ||
409 | if (adapter->connect_status == LIBERTAS_CONNECTED) { | 409 | if (adapter->connect_status == LBS_CONNECTED) { |
410 | netif_carrier_on(priv->dev); | 410 | netif_carrier_on(priv->dev); |
411 | if (priv->mesh_dev) | 411 | if (priv->mesh_dev) |
412 | netif_carrier_on(priv->mesh_dev); | 412 | netif_carrier_on(priv->mesh_dev); |
@@ -425,16 +425,16 @@ static int libertas_dev_open(struct net_device *dev) | |||
425 | * @param dev A pointer to net_device structure | 425 | * @param dev A pointer to net_device structure |
426 | * @return 0 | 426 | * @return 0 |
427 | */ | 427 | */ |
428 | static int libertas_mesh_open(struct net_device *dev) | 428 | static int lbs_mesh_open(struct net_device *dev) |
429 | { | 429 | { |
430 | wlan_private *priv = (wlan_private *) dev->priv ; | 430 | lbs_private *priv = (lbs_private *) dev->priv ; |
431 | 431 | ||
432 | if (pre_open_check(dev) == -1) | 432 | if (pre_open_check(dev) == -1) |
433 | return -1; | 433 | return -1; |
434 | priv->mesh_open = 1 ; | 434 | priv->mesh_open = 1 ; |
435 | netif_wake_queue(priv->mesh_dev); | 435 | netif_wake_queue(priv->mesh_dev); |
436 | if (priv->infra_open == 0) | 436 | if (priv->infra_open == 0) |
437 | return libertas_dev_open(priv->dev) ; | 437 | return lbs_dev_open(priv->dev) ; |
438 | return 0; | 438 | return 0; |
439 | } | 439 | } |
440 | 440 | ||
@@ -444,22 +444,22 @@ static int libertas_mesh_open(struct net_device *dev) | |||
444 | * @param dev A pointer to net_device structure | 444 | * @param dev A pointer to net_device structure |
445 | * @return 0 | 445 | * @return 0 |
446 | */ | 446 | */ |
447 | static int libertas_open(struct net_device *dev) | 447 | static int lbs_open(struct net_device *dev) |
448 | { | 448 | { |
449 | wlan_private *priv = (wlan_private *) dev->priv ; | 449 | lbs_private *priv = (lbs_private *) dev->priv ; |
450 | 450 | ||
451 | if(pre_open_check(dev) == -1) | 451 | if(pre_open_check(dev) == -1) |
452 | return -1; | 452 | return -1; |
453 | priv->infra_open = 1 ; | 453 | priv->infra_open = 1 ; |
454 | netif_wake_queue(priv->dev); | 454 | netif_wake_queue(priv->dev); |
455 | if (priv->open == 0) | 455 | if (priv->open == 0) |
456 | return libertas_dev_open(priv->dev) ; | 456 | return lbs_dev_open(priv->dev) ; |
457 | return 0; | 457 | return 0; |
458 | } | 458 | } |
459 | 459 | ||
460 | static int libertas_dev_close(struct net_device *dev) | 460 | static int lbs_dev_close(struct net_device *dev) |
461 | { | 461 | { |
462 | wlan_private *priv = dev->priv; | 462 | lbs_private *priv = dev->priv; |
463 | 463 | ||
464 | lbs_deb_enter(LBS_DEB_NET); | 464 | lbs_deb_enter(LBS_DEB_NET); |
465 | 465 | ||
@@ -476,14 +476,14 @@ static int libertas_dev_close(struct net_device *dev) | |||
476 | * @param dev A pointer to net_device structure | 476 | * @param dev A pointer to net_device structure |
477 | * @return 0 | 477 | * @return 0 |
478 | */ | 478 | */ |
479 | static int libertas_mesh_close(struct net_device *dev) | 479 | static int lbs_mesh_close(struct net_device *dev) |
480 | { | 480 | { |
481 | wlan_private *priv = (wlan_private *) (dev->priv); | 481 | lbs_private *priv = (lbs_private *) (dev->priv); |
482 | 482 | ||
483 | priv->mesh_open = 0; | 483 | priv->mesh_open = 0; |
484 | netif_stop_queue(priv->mesh_dev); | 484 | netif_stop_queue(priv->mesh_dev); |
485 | if (priv->infra_open == 0) | 485 | if (priv->infra_open == 0) |
486 | return libertas_dev_close(dev); | 486 | return lbs_dev_close(dev); |
487 | else | 487 | else |
488 | return 0; | 488 | return 0; |
489 | } | 489 | } |
@@ -494,23 +494,23 @@ static int libertas_mesh_close(struct net_device *dev) | |||
494 | * @param dev A pointer to net_device structure | 494 | * @param dev A pointer to net_device structure |
495 | * @return 0 | 495 | * @return 0 |
496 | */ | 496 | */ |
497 | static int libertas_close(struct net_device *dev) | 497 | static int lbs_close(struct net_device *dev) |
498 | { | 498 | { |
499 | wlan_private *priv = (wlan_private *) dev->priv; | 499 | lbs_private *priv = (lbs_private *) dev->priv; |
500 | 500 | ||
501 | netif_stop_queue(dev); | 501 | netif_stop_queue(dev); |
502 | priv->infra_open = 0; | 502 | priv->infra_open = 0; |
503 | if (priv->mesh_open == 0) | 503 | if (priv->mesh_open == 0) |
504 | return libertas_dev_close(dev); | 504 | return lbs_dev_close(dev); |
505 | else | 505 | else |
506 | return 0; | 506 | return 0; |
507 | } | 507 | } |
508 | 508 | ||
509 | 509 | ||
510 | static int libertas_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | 510 | static int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) |
511 | { | 511 | { |
512 | int ret = 0; | 512 | int ret = 0; |
513 | wlan_private *priv = dev->priv; | 513 | lbs_private *priv = dev->priv; |
514 | 514 | ||
515 | lbs_deb_enter(LBS_DEB_NET); | 515 | lbs_deb_enter(LBS_DEB_NET); |
516 | 516 | ||
@@ -523,7 +523,7 @@ static int libertas_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
523 | if (priv->mesh_dev) | 523 | if (priv->mesh_dev) |
524 | netif_stop_queue(priv->mesh_dev); | 524 | netif_stop_queue(priv->mesh_dev); |
525 | 525 | ||
526 | if (libertas_process_tx(priv, skb) == 0) | 526 | if (lbs_process_tx(priv, skb) == 0) |
527 | dev->trans_start = jiffies; | 527 | dev->trans_start = jiffies; |
528 | done: | 528 | done: |
529 | lbs_deb_leave_args(LBS_DEB_NET, "ret %d", ret); | 529 | lbs_deb_leave_args(LBS_DEB_NET, "ret %d", ret); |
@@ -531,54 +531,54 @@ done: | |||
531 | } | 531 | } |
532 | 532 | ||
533 | /** | 533 | /** |
534 | * @brief Mark mesh packets and handover them to libertas_hard_start_xmit | 534 | * @brief Mark mesh packets and handover them to lbs_hard_start_xmit |
535 | * | 535 | * |
536 | */ | 536 | */ |
537 | static int libertas_mesh_pre_start_xmit(struct sk_buff *skb, | 537 | static int lbs_mesh_pre_start_xmit(struct sk_buff *skb, |
538 | struct net_device *dev) | 538 | struct net_device *dev) |
539 | { | 539 | { |
540 | wlan_private *priv = dev->priv; | 540 | lbs_private *priv = dev->priv; |
541 | int ret; | 541 | int ret; |
542 | 542 | ||
543 | lbs_deb_enter(LBS_DEB_MESH); | 543 | lbs_deb_enter(LBS_DEB_MESH); |
544 | if(priv->adapter->monitormode != WLAN_MONITOR_OFF) { | 544 | if (priv->adapter->monitormode != LBS_MONITOR_OFF) { |
545 | netif_stop_queue(dev); | 545 | netif_stop_queue(dev); |
546 | return -EOPNOTSUPP; | 546 | return -EOPNOTSUPP; |
547 | } | 547 | } |
548 | 548 | ||
549 | SET_MESH_FRAME(skb); | 549 | SET_MESH_FRAME(skb); |
550 | 550 | ||
551 | ret = libertas_hard_start_xmit(skb, priv->dev); | 551 | ret = lbs_hard_start_xmit(skb, priv->dev); |
552 | lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret); | 552 | lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret); |
553 | return ret; | 553 | return ret; |
554 | } | 554 | } |
555 | 555 | ||
556 | /** | 556 | /** |
557 | * @brief Mark non-mesh packets and handover them to libertas_hard_start_xmit | 557 | * @brief Mark non-mesh packets and handover them to lbs_hard_start_xmit |
558 | * | 558 | * |
559 | */ | 559 | */ |
560 | static int libertas_pre_start_xmit(struct sk_buff *skb, struct net_device *dev) | 560 | static int lbs_pre_start_xmit(struct sk_buff *skb, struct net_device *dev) |
561 | { | 561 | { |
562 | wlan_private *priv = dev->priv; | 562 | lbs_private *priv = dev->priv; |
563 | int ret; | 563 | int ret; |
564 | 564 | ||
565 | lbs_deb_enter(LBS_DEB_NET); | 565 | lbs_deb_enter(LBS_DEB_NET); |
566 | 566 | ||
567 | if(priv->adapter->monitormode != WLAN_MONITOR_OFF) { | 567 | if (priv->adapter->monitormode != LBS_MONITOR_OFF) { |
568 | netif_stop_queue(dev); | 568 | netif_stop_queue(dev); |
569 | return -EOPNOTSUPP; | 569 | return -EOPNOTSUPP; |
570 | } | 570 | } |
571 | 571 | ||
572 | UNSET_MESH_FRAME(skb); | 572 | UNSET_MESH_FRAME(skb); |
573 | 573 | ||
574 | ret = libertas_hard_start_xmit(skb, dev); | 574 | ret = lbs_hard_start_xmit(skb, dev); |
575 | lbs_deb_leave_args(LBS_DEB_NET, "ret %d", ret); | 575 | lbs_deb_leave_args(LBS_DEB_NET, "ret %d", ret); |
576 | return ret; | 576 | return ret; |
577 | } | 577 | } |
578 | 578 | ||
579 | static void libertas_tx_timeout(struct net_device *dev) | 579 | static void lbs_tx_timeout(struct net_device *dev) |
580 | { | 580 | { |
581 | wlan_private *priv = (wlan_private *) dev->priv; | 581 | lbs_private *priv = (lbs_private *) dev->priv; |
582 | 582 | ||
583 | lbs_deb_enter(LBS_DEB_TX); | 583 | lbs_deb_enter(LBS_DEB_TX); |
584 | 584 | ||
@@ -588,14 +588,14 @@ static void libertas_tx_timeout(struct net_device *dev) | |||
588 | dev->trans_start = jiffies; | 588 | dev->trans_start = jiffies; |
589 | 589 | ||
590 | if (priv->adapter->currenttxskb) { | 590 | if (priv->adapter->currenttxskb) { |
591 | if (priv->adapter->monitormode != WLAN_MONITOR_OFF) { | 591 | if (priv->adapter->monitormode != LBS_MONITOR_OFF) { |
592 | /* If we are here, we have not received feedback from | 592 | /* If we are here, we have not received feedback from |
593 | the previous packet. Assume TX_FAIL and move on. */ | 593 | the previous packet. Assume TX_FAIL and move on. */ |
594 | priv->adapter->eventcause = 0x01000000; | 594 | priv->adapter->eventcause = 0x01000000; |
595 | libertas_send_tx_feedback(priv); | 595 | lbs_send_tx_feedback(priv); |
596 | } else | 596 | } else |
597 | wake_up_interruptible(&priv->waitq); | 597 | wake_up_interruptible(&priv->waitq); |
598 | } else if (priv->adapter->connect_status == LIBERTAS_CONNECTED) { | 598 | } else if (priv->adapter->connect_status == LBS_CONNECTED) { |
599 | netif_wake_queue(priv->dev); | 599 | netif_wake_queue(priv->dev); |
600 | if (priv->mesh_dev) | 600 | if (priv->mesh_dev) |
601 | netif_wake_queue(priv->mesh_dev); | 601 | netif_wake_queue(priv->mesh_dev); |
@@ -607,21 +607,21 @@ static void libertas_tx_timeout(struct net_device *dev) | |||
607 | /** | 607 | /** |
608 | * @brief This function returns the network statistics | 608 | * @brief This function returns the network statistics |
609 | * | 609 | * |
610 | * @param dev A pointer to wlan_private structure | 610 | * @param dev A pointer to lbs_private structure |
611 | * @return A pointer to net_device_stats structure | 611 | * @return A pointer to net_device_stats structure |
612 | */ | 612 | */ |
613 | static struct net_device_stats *libertas_get_stats(struct net_device *dev) | 613 | static struct net_device_stats *lbs_get_stats(struct net_device *dev) |
614 | { | 614 | { |
615 | wlan_private *priv = (wlan_private *) dev->priv; | 615 | lbs_private *priv = (lbs_private *) dev->priv; |
616 | 616 | ||
617 | return &priv->stats; | 617 | return &priv->stats; |
618 | } | 618 | } |
619 | 619 | ||
620 | static int libertas_set_mac_address(struct net_device *dev, void *addr) | 620 | static int lbs_set_mac_address(struct net_device *dev, void *addr) |
621 | { | 621 | { |
622 | int ret = 0; | 622 | int ret = 0; |
623 | wlan_private *priv = (wlan_private *) dev->priv; | 623 | lbs_private *priv = (lbs_private *) dev->priv; |
624 | wlan_adapter *adapter = priv->adapter; | 624 | lbs_adapter *adapter = priv->adapter; |
625 | struct sockaddr *phwaddr = addr; | 625 | struct sockaddr *phwaddr = addr; |
626 | 626 | ||
627 | lbs_deb_enter(LBS_DEB_NET); | 627 | lbs_deb_enter(LBS_DEB_NET); |
@@ -637,7 +637,7 @@ static int libertas_set_mac_address(struct net_device *dev, void *addr) | |||
637 | lbs_deb_hex(LBS_DEB_NET, "addr", phwaddr->sa_data, ETH_ALEN); | 637 | lbs_deb_hex(LBS_DEB_NET, "addr", phwaddr->sa_data, ETH_ALEN); |
638 | memcpy(adapter->current_addr, phwaddr->sa_data, ETH_ALEN); | 638 | memcpy(adapter->current_addr, phwaddr->sa_data, ETH_ALEN); |
639 | 639 | ||
640 | ret = libertas_prepare_and_send_command(priv, CMD_802_11_MAC_ADDRESS, | 640 | ret = lbs_prepare_and_send_command(priv, CMD_802_11_MAC_ADDRESS, |
641 | CMD_ACT_SET, | 641 | CMD_ACT_SET, |
642 | CMD_OPTION_WAITFORRSP, 0, NULL); | 642 | CMD_OPTION_WAITFORRSP, 0, NULL); |
643 | 643 | ||
@@ -657,7 +657,7 @@ done: | |||
657 | return ret; | 657 | return ret; |
658 | } | 658 | } |
659 | 659 | ||
660 | static int libertas_copy_multicast_address(wlan_adapter * adapter, | 660 | static int lbs_copy_multicast_address(lbs_adapter *adapter, |
661 | struct net_device *dev) | 661 | struct net_device *dev) |
662 | { | 662 | { |
663 | int i = 0; | 663 | int i = 0; |
@@ -672,10 +672,10 @@ static int libertas_copy_multicast_address(wlan_adapter * adapter, | |||
672 | 672 | ||
673 | } | 673 | } |
674 | 674 | ||
675 | static void libertas_set_multicast_list(struct net_device *dev) | 675 | static void lbs_set_multicast_list(struct net_device *dev) |
676 | { | 676 | { |
677 | wlan_private *priv = dev->priv; | 677 | lbs_private *priv = dev->priv; |
678 | wlan_adapter *adapter = priv->adapter; | 678 | lbs_adapter *adapter = priv->adapter; |
679 | int oldpacketfilter; | 679 | int oldpacketfilter; |
680 | DECLARE_MAC_BUF(mac); | 680 | DECLARE_MAC_BUF(mac); |
681 | 681 | ||
@@ -718,7 +718,7 @@ static void libertas_set_multicast_list(struct net_device *dev) | |||
718 | CMD_ACT_MAC_MULTICAST_ENABLE; | 718 | CMD_ACT_MAC_MULTICAST_ENABLE; |
719 | 719 | ||
720 | adapter->nr_of_multicastmacaddr = | 720 | adapter->nr_of_multicastmacaddr = |
721 | libertas_copy_multicast_address(adapter, dev); | 721 | lbs_copy_multicast_address(adapter, dev); |
722 | 722 | ||
723 | lbs_deb_net("multicast addresses: %d\n", | 723 | lbs_deb_net("multicast addresses: %d\n", |
724 | dev->mc_count); | 724 | dev->mc_count); |
@@ -729,7 +729,7 @@ static void libertas_set_multicast_list(struct net_device *dev) | |||
729 | adapter->multicastlist[i])); | 729 | adapter->multicastlist[i])); |
730 | } | 730 | } |
731 | /* send multicast addresses to firmware */ | 731 | /* send multicast addresses to firmware */ |
732 | libertas_prepare_and_send_command(priv, | 732 | lbs_prepare_and_send_command(priv, |
733 | CMD_MAC_MULTICAST_ADR, | 733 | CMD_MAC_MULTICAST_ADR, |
734 | CMD_ACT_SET, 0, 0, | 734 | CMD_ACT_SET, 0, 0, |
735 | NULL); | 735 | NULL); |
@@ -738,25 +738,25 @@ static void libertas_set_multicast_list(struct net_device *dev) | |||
738 | } | 738 | } |
739 | 739 | ||
740 | if (adapter->currentpacketfilter != oldpacketfilter) { | 740 | if (adapter->currentpacketfilter != oldpacketfilter) { |
741 | libertas_set_mac_packet_filter(priv); | 741 | lbs_set_mac_packet_filter(priv); |
742 | } | 742 | } |
743 | 743 | ||
744 | lbs_deb_leave(LBS_DEB_NET); | 744 | lbs_deb_leave(LBS_DEB_NET); |
745 | } | 745 | } |
746 | 746 | ||
747 | /** | 747 | /** |
748 | * @brief This function handles the major jobs in the WLAN driver. | 748 | * @brief This function handles the major jobs in the LBS driver. |
749 | * It handles all events generated by firmware, RX data received | 749 | * It handles all events generated by firmware, RX data received |
750 | * from firmware and TX data sent from kernel. | 750 | * from firmware and TX data sent from kernel. |
751 | * | 751 | * |
752 | * @param data A pointer to wlan_thread structure | 752 | * @param data A pointer to lbs_thread structure |
753 | * @return 0 | 753 | * @return 0 |
754 | */ | 754 | */ |
755 | static int libertas_thread(void *data) | 755 | static int lbs_thread(void *data) |
756 | { | 756 | { |
757 | struct net_device *dev = data; | 757 | struct net_device *dev = data; |
758 | wlan_private *priv = dev->priv; | 758 | lbs_private *priv = dev->priv; |
759 | wlan_adapter *adapter = priv->adapter; | 759 | lbs_adapter *adapter = priv->adapter; |
760 | wait_queue_t wait; | 760 | wait_queue_t wait; |
761 | u8 ireg = 0; | 761 | u8 ireg = 0; |
762 | 762 | ||
@@ -836,7 +836,7 @@ static int libertas_thread(void *data) | |||
836 | 836 | ||
837 | adapter->hisregcpy &= ~MRVDRV_CMD_UPLD_RDY; | 837 | adapter->hisregcpy &= ~MRVDRV_CMD_UPLD_RDY; |
838 | spin_unlock_irq(&adapter->driver_lock); | 838 | spin_unlock_irq(&adapter->driver_lock); |
839 | libertas_process_rx_command(priv); | 839 | lbs_process_rx_command(priv); |
840 | spin_lock_irq(&adapter->driver_lock); | 840 | spin_lock_irq(&adapter->driver_lock); |
841 | } | 841 | } |
842 | 842 | ||
@@ -853,7 +853,7 @@ static int libertas_thread(void *data) | |||
853 | continue; | 853 | continue; |
854 | } | 854 | } |
855 | spin_unlock_irq(&adapter->driver_lock); | 855 | spin_unlock_irq(&adapter->driver_lock); |
856 | libertas_process_event(priv); | 856 | lbs_process_event(priv); |
857 | } else | 857 | } else |
858 | spin_unlock_irq(&adapter->driver_lock); | 858 | spin_unlock_irq(&adapter->driver_lock); |
859 | 859 | ||
@@ -861,7 +861,7 @@ static int libertas_thread(void *data) | |||
861 | if (adapter->psstate == PS_STATE_PRE_SLEEP) { | 861 | if (adapter->psstate == PS_STATE_PRE_SLEEP) { |
862 | if (!priv->dnld_sent && !adapter->cur_cmd) { | 862 | if (!priv->dnld_sent && !adapter->cur_cmd) { |
863 | if (adapter->connect_status == | 863 | if (adapter->connect_status == |
864 | LIBERTAS_CONNECTED) { | 864 | LBS_CONNECTED) { |
865 | lbs_deb_thread( | 865 | lbs_deb_thread( |
866 | "main_thread: PRE_SLEEP--intcounter=%d currenttxskb=%p " | 866 | "main_thread: PRE_SLEEP--intcounter=%d currenttxskb=%p " |
867 | "dnld_sent=%d cur_cmd=%p, confirm now\n", | 867 | "dnld_sent=%d cur_cmd=%p, confirm now\n", |
@@ -870,7 +870,7 @@ static int libertas_thread(void *data) | |||
870 | priv->dnld_sent, | 870 | priv->dnld_sent, |
871 | adapter->cur_cmd); | 871 | adapter->cur_cmd); |
872 | 872 | ||
873 | libertas_ps_confirm_sleep(priv, | 873 | lbs_ps_confirm_sleep(priv, |
874 | (u16) adapter->psmode); | 874 | (u16) adapter->psmode); |
875 | } else { | 875 | } else { |
876 | /* workaround for firmware sending | 876 | /* workaround for firmware sending |
@@ -894,15 +894,15 @@ static int libertas_thread(void *data) | |||
894 | 894 | ||
895 | /* Execute the next command */ | 895 | /* Execute the next command */ |
896 | if (!priv->dnld_sent && !priv->adapter->cur_cmd) | 896 | if (!priv->dnld_sent && !priv->adapter->cur_cmd) |
897 | libertas_execute_next_command(priv); | 897 | lbs_execute_next_command(priv); |
898 | 898 | ||
899 | /* Wake-up command waiters which can't sleep in | 899 | /* Wake-up command waiters which can't sleep in |
900 | * libertas_prepare_and_send_command | 900 | * lbs_prepare_and_send_command |
901 | */ | 901 | */ |
902 | if (!adapter->nr_cmd_pending) | 902 | if (!adapter->nr_cmd_pending) |
903 | wake_up_all(&adapter->cmd_pending); | 903 | wake_up_all(&adapter->cmd_pending); |
904 | 904 | ||
905 | libertas_tx_runqueue(priv); | 905 | lbs_tx_runqueue(priv); |
906 | } | 906 | } |
907 | 907 | ||
908 | del_timer(&adapter->command_timer); | 908 | del_timer(&adapter->command_timer); |
@@ -918,13 +918,13 @@ static int libertas_thread(void *data) | |||
918 | * HW spec from firmware and set basic parameters to | 918 | * HW spec from firmware and set basic parameters to |
919 | * firmware. | 919 | * firmware. |
920 | * | 920 | * |
921 | * @param priv A pointer to wlan_private structure | 921 | * @param priv A pointer to lbs_private structure |
922 | * @return 0 or -1 | 922 | * @return 0 or -1 |
923 | */ | 923 | */ |
924 | static int wlan_setup_firmware(wlan_private * priv) | 924 | static int lbs_setup_firmware(lbs_private *priv) |
925 | { | 925 | { |
926 | int ret = -1; | 926 | int ret = -1; |
927 | wlan_adapter *adapter = priv->adapter; | 927 | lbs_adapter *adapter = priv->adapter; |
928 | struct cmd_ds_mesh_access mesh_access; | 928 | struct cmd_ds_mesh_access mesh_access; |
929 | 929 | ||
930 | lbs_deb_enter(LBS_DEB_FW); | 930 | lbs_deb_enter(LBS_DEB_FW); |
@@ -934,7 +934,7 @@ static int wlan_setup_firmware(wlan_private * priv) | |||
934 | */ | 934 | */ |
935 | memset(adapter->current_addr, 0xff, ETH_ALEN); | 935 | memset(adapter->current_addr, 0xff, ETH_ALEN); |
936 | 936 | ||
937 | ret = libertas_prepare_and_send_command(priv, CMD_GET_HW_SPEC, | 937 | ret = lbs_prepare_and_send_command(priv, CMD_GET_HW_SPEC, |
938 | 0, CMD_OPTION_WAITFORRSP, 0, NULL); | 938 | 0, CMD_OPTION_WAITFORRSP, 0, NULL); |
939 | 939 | ||
940 | if (ret) { | 940 | if (ret) { |
@@ -942,10 +942,10 @@ static int wlan_setup_firmware(wlan_private * priv) | |||
942 | goto done; | 942 | goto done; |
943 | } | 943 | } |
944 | 944 | ||
945 | libertas_set_mac_packet_filter(priv); | 945 | lbs_set_mac_packet_filter(priv); |
946 | 946 | ||
947 | /* Get the supported Data rates */ | 947 | /* Get the supported Data rates */ |
948 | ret = libertas_prepare_and_send_command(priv, CMD_802_11_DATA_RATE, | 948 | ret = lbs_prepare_and_send_command(priv, CMD_802_11_DATA_RATE, |
949 | CMD_ACT_GET_TX_RATE, | 949 | CMD_ACT_GET_TX_RATE, |
950 | CMD_OPTION_WAITFORRSP, 0, NULL); | 950 | CMD_OPTION_WAITFORRSP, 0, NULL); |
951 | 951 | ||
@@ -958,7 +958,7 @@ static int wlan_setup_firmware(wlan_private * priv) | |||
958 | if (priv->mesh_dev) { | 958 | if (priv->mesh_dev) { |
959 | memset(&mesh_access, 0, sizeof(mesh_access)); | 959 | memset(&mesh_access, 0, sizeof(mesh_access)); |
960 | mesh_access.data[0] = cpu_to_le32(0); | 960 | mesh_access.data[0] = cpu_to_le32(0); |
961 | ret = libertas_prepare_and_send_command(priv, | 961 | ret = lbs_prepare_and_send_command(priv, |
962 | CMD_MESH_ACCESS, | 962 | CMD_MESH_ACCESS, |
963 | CMD_ACT_MESH_SET_AUTOSTART_ENABLED, | 963 | CMD_ACT_MESH_SET_AUTOSTART_ENABLED, |
964 | CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access); | 964 | CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access); |
@@ -970,7 +970,7 @@ static int wlan_setup_firmware(wlan_private * priv) | |||
970 | } | 970 | } |
971 | 971 | ||
972 | /* Set the boot2 version in firmware */ | 972 | /* Set the boot2 version in firmware */ |
973 | ret = libertas_prepare_and_send_command(priv, CMD_SET_BOOT2_VER, | 973 | ret = lbs_prepare_and_send_command(priv, CMD_SET_BOOT2_VER, |
974 | 0, CMD_OPTION_WAITFORRSP, 0, NULL); | 974 | 0, CMD_OPTION_WAITFORRSP, 0, NULL); |
975 | 975 | ||
976 | ret = 0; | 976 | ret = 0; |
@@ -985,8 +985,8 @@ done: | |||
985 | */ | 985 | */ |
986 | static void command_timer_fn(unsigned long data) | 986 | static void command_timer_fn(unsigned long data) |
987 | { | 987 | { |
988 | wlan_private *priv = (wlan_private *)data; | 988 | lbs_private *priv = (lbs_private *)data; |
989 | wlan_adapter *adapter = priv->adapter; | 989 | lbs_adapter *adapter = priv->adapter; |
990 | struct cmd_ctrl_node *ptempnode; | 990 | struct cmd_ctrl_node *ptempnode; |
991 | struct cmd_ds_command *cmd; | 991 | struct cmd_ds_command *cmd; |
992 | unsigned long flags; | 992 | unsigned long flags; |
@@ -1013,16 +1013,16 @@ static void command_timer_fn(unsigned long data) | |||
1013 | spin_unlock_irqrestore(&adapter->driver_lock, flags); | 1013 | spin_unlock_irqrestore(&adapter->driver_lock, flags); |
1014 | 1014 | ||
1015 | lbs_deb_fw("re-sending same command because of timeout\n"); | 1015 | lbs_deb_fw("re-sending same command because of timeout\n"); |
1016 | libertas_queue_cmd(adapter, ptempnode, 0); | 1016 | lbs_queue_cmd(adapter, ptempnode, 0); |
1017 | 1017 | ||
1018 | wake_up_interruptible(&priv->waitq); | 1018 | wake_up_interruptible(&priv->waitq); |
1019 | 1019 | ||
1020 | return; | 1020 | return; |
1021 | } | 1021 | } |
1022 | 1022 | ||
1023 | static int libertas_init_adapter(wlan_private * priv) | 1023 | static int lbs_init_adapter(lbs_private *priv) |
1024 | { | 1024 | { |
1025 | wlan_adapter *adapter = priv->adapter; | 1025 | lbs_adapter *adapter = priv->adapter; |
1026 | size_t bufsize; | 1026 | size_t bufsize; |
1027 | int i, ret = 0; | 1027 | int i, ret = 0; |
1028 | 1028 | ||
@@ -1043,17 +1043,17 @@ static int libertas_init_adapter(wlan_private * priv) | |||
1043 | &adapter->network_free_list); | 1043 | &adapter->network_free_list); |
1044 | } | 1044 | } |
1045 | 1045 | ||
1046 | adapter->libertas_ps_confirm_sleep.seqnum = cpu_to_le16(++adapter->seqnum); | 1046 | adapter->lbs_ps_confirm_sleep.seqnum = cpu_to_le16(++adapter->seqnum); |
1047 | adapter->libertas_ps_confirm_sleep.command = | 1047 | adapter->lbs_ps_confirm_sleep.command = |
1048 | cpu_to_le16(CMD_802_11_PS_MODE); | 1048 | cpu_to_le16(CMD_802_11_PS_MODE); |
1049 | adapter->libertas_ps_confirm_sleep.size = | 1049 | adapter->lbs_ps_confirm_sleep.size = |
1050 | cpu_to_le16(sizeof(struct PS_CMD_ConfirmSleep)); | 1050 | cpu_to_le16(sizeof(struct PS_CMD_ConfirmSleep)); |
1051 | adapter->libertas_ps_confirm_sleep.action = | 1051 | adapter->lbs_ps_confirm_sleep.action = |
1052 | cpu_to_le16(CMD_SUBCMD_SLEEP_CONFIRMED); | 1052 | cpu_to_le16(CMD_SUBCMD_SLEEP_CONFIRMED); |
1053 | 1053 | ||
1054 | memset(adapter->current_addr, 0xff, ETH_ALEN); | 1054 | memset(adapter->current_addr, 0xff, ETH_ALEN); |
1055 | 1055 | ||
1056 | adapter->connect_status = LIBERTAS_DISCONNECTED; | 1056 | adapter->connect_status = LBS_DISCONNECTED; |
1057 | adapter->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM; | 1057 | adapter->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM; |
1058 | adapter->mode = IW_MODE_INFRA; | 1058 | adapter->mode = IW_MODE_INFRA; |
1059 | adapter->curbssparams.channel = DEFAULT_AD_HOC_CHANNEL; | 1059 | adapter->curbssparams.channel = DEFAULT_AD_HOC_CHANNEL; |
@@ -1061,7 +1061,7 @@ static int libertas_init_adapter(wlan_private * priv) | |||
1061 | adapter->radioon = RADIO_ON; | 1061 | adapter->radioon = RADIO_ON; |
1062 | adapter->auto_rate = 1; | 1062 | adapter->auto_rate = 1; |
1063 | adapter->capability = WLAN_CAPABILITY_SHORT_PREAMBLE; | 1063 | adapter->capability = WLAN_CAPABILITY_SHORT_PREAMBLE; |
1064 | adapter->psmode = WLAN802_11POWERMODECAM; | 1064 | adapter->psmode = LBS802_11POWERMODECAM; |
1065 | adapter->psstate = PS_STATE_FULL_POWER; | 1065 | adapter->psstate = PS_STATE_FULL_POWER; |
1066 | 1066 | ||
1067 | mutex_init(&adapter->lock); | 1067 | mutex_init(&adapter->lock); |
@@ -1081,7 +1081,7 @@ static int libertas_init_adapter(wlan_private * priv) | |||
1081 | adapter->nr_cmd_pending = 0; | 1081 | adapter->nr_cmd_pending = 0; |
1082 | 1082 | ||
1083 | /* Allocate the command buffers */ | 1083 | /* Allocate the command buffers */ |
1084 | if (libertas_allocate_cmd_buffer(priv)) { | 1084 | if (lbs_allocate_cmd_buffer(priv)) { |
1085 | lbs_pr_err("Out of memory allocating command buffers\n"); | 1085 | lbs_pr_err("Out of memory allocating command buffers\n"); |
1086 | ret = -1; | 1086 | ret = -1; |
1087 | } | 1087 | } |
@@ -1090,9 +1090,9 @@ out: | |||
1090 | return ret; | 1090 | return ret; |
1091 | } | 1091 | } |
1092 | 1092 | ||
1093 | static void libertas_free_adapter(wlan_private * priv) | 1093 | static void lbs_free_adapter(lbs_private *priv) |
1094 | { | 1094 | { |
1095 | wlan_adapter *adapter = priv->adapter; | 1095 | lbs_adapter *adapter = priv->adapter; |
1096 | 1096 | ||
1097 | if (!adapter) { | 1097 | if (!adapter) { |
1098 | lbs_deb_fw("why double free adapter?\n"); | 1098 | lbs_deb_fw("why double free adapter?\n"); |
@@ -1100,7 +1100,7 @@ static void libertas_free_adapter(wlan_private * priv) | |||
1100 | } | 1100 | } |
1101 | 1101 | ||
1102 | lbs_deb_fw("free command buffer\n"); | 1102 | lbs_deb_fw("free command buffer\n"); |
1103 | libertas_free_cmd_buffer(priv); | 1103 | lbs_free_cmd_buffer(priv); |
1104 | 1104 | ||
1105 | lbs_deb_fw("free command_timer\n"); | 1105 | lbs_deb_fw("free command_timer\n"); |
1106 | del_timer(&adapter->command_timer); | 1106 | del_timer(&adapter->command_timer); |
@@ -1117,32 +1117,32 @@ static void libertas_free_adapter(wlan_private * priv) | |||
1117 | 1117 | ||
1118 | /** | 1118 | /** |
1119 | * @brief This function adds the card. it will probe the | 1119 | * @brief This function adds the card. it will probe the |
1120 | * card, allocate the wlan_priv and initialize the device. | 1120 | * card, allocate the lbs_priv and initialize the device. |
1121 | * | 1121 | * |
1122 | * @param card A pointer to card | 1122 | * @param card A pointer to card |
1123 | * @return A pointer to wlan_private structure | 1123 | * @return A pointer to lbs_private structure |
1124 | */ | 1124 | */ |
1125 | wlan_private *libertas_add_card(void *card, struct device *dmdev) | 1125 | lbs_private *lbs_add_card(void *card, struct device *dmdev) |
1126 | { | 1126 | { |
1127 | struct net_device *dev = NULL; | 1127 | struct net_device *dev = NULL; |
1128 | wlan_private *priv = NULL; | 1128 | lbs_private *priv = NULL; |
1129 | 1129 | ||
1130 | lbs_deb_enter(LBS_DEB_NET); | 1130 | lbs_deb_enter(LBS_DEB_NET); |
1131 | 1131 | ||
1132 | /* Allocate an Ethernet device and register it */ | 1132 | /* Allocate an Ethernet device and register it */ |
1133 | if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { | 1133 | if (!(dev = alloc_etherdev(sizeof(lbs_private)))) { |
1134 | lbs_pr_err("init ethX device failed\n"); | 1134 | lbs_pr_err("init ethX device failed\n"); |
1135 | goto done; | 1135 | goto done; |
1136 | } | 1136 | } |
1137 | priv = dev->priv; | 1137 | priv = dev->priv; |
1138 | 1138 | ||
1139 | /* allocate buffer for wlan_adapter */ | 1139 | /* allocate buffer for lbs_adapter */ |
1140 | if (!(priv->adapter = kzalloc(sizeof(wlan_adapter), GFP_KERNEL))) { | 1140 | if (!(priv->adapter = kzalloc(sizeof(lbs_adapter), GFP_KERNEL))) { |
1141 | lbs_pr_err("allocate buffer for wlan_adapter failed\n"); | 1141 | lbs_pr_err("allocate buffer for lbs_adapter failed\n"); |
1142 | goto err_kzalloc; | 1142 | goto err_kzalloc; |
1143 | } | 1143 | } |
1144 | 1144 | ||
1145 | if (libertas_init_adapter(priv)) { | 1145 | if (lbs_init_adapter(priv)) { |
1146 | lbs_pr_err("failed to initialize adapter structure.\n"); | 1146 | lbs_pr_err("failed to initialize adapter structure.\n"); |
1147 | goto err_init_adapter; | 1147 | goto err_init_adapter; |
1148 | } | 1148 | } |
@@ -1154,46 +1154,46 @@ wlan_private *libertas_add_card(void *card, struct device *dmdev) | |||
1154 | priv->hotplug_device = dmdev; | 1154 | priv->hotplug_device = dmdev; |
1155 | 1155 | ||
1156 | /* Setup the OS Interface to our functions */ | 1156 | /* Setup the OS Interface to our functions */ |
1157 | dev->open = libertas_open; | 1157 | dev->open = lbs_open; |
1158 | dev->hard_start_xmit = libertas_pre_start_xmit; | 1158 | dev->hard_start_xmit = lbs_pre_start_xmit; |
1159 | dev->stop = libertas_close; | 1159 | dev->stop = lbs_close; |
1160 | dev->set_mac_address = libertas_set_mac_address; | 1160 | dev->set_mac_address = lbs_set_mac_address; |
1161 | dev->tx_timeout = libertas_tx_timeout; | 1161 | dev->tx_timeout = lbs_tx_timeout; |
1162 | dev->get_stats = libertas_get_stats; | 1162 | dev->get_stats = lbs_get_stats; |
1163 | dev->watchdog_timeo = 5 * HZ; | 1163 | dev->watchdog_timeo = 5 * HZ; |
1164 | dev->ethtool_ops = &libertas_ethtool_ops; | 1164 | dev->ethtool_ops = &lbs_ethtool_ops; |
1165 | #ifdef WIRELESS_EXT | 1165 | #ifdef WIRELESS_EXT |
1166 | dev->wireless_handlers = (struct iw_handler_def *)&libertas_handler_def; | 1166 | dev->wireless_handlers = (struct iw_handler_def *)&lbs_handler_def; |
1167 | #endif | 1167 | #endif |
1168 | dev->flags |= IFF_BROADCAST | IFF_MULTICAST; | 1168 | dev->flags |= IFF_BROADCAST | IFF_MULTICAST; |
1169 | dev->set_multicast_list = libertas_set_multicast_list; | 1169 | dev->set_multicast_list = lbs_set_multicast_list; |
1170 | 1170 | ||
1171 | SET_NETDEV_DEV(dev, dmdev); | 1171 | SET_NETDEV_DEV(dev, dmdev); |
1172 | 1172 | ||
1173 | priv->rtap_net_dev = NULL; | 1173 | priv->rtap_net_dev = NULL; |
1174 | if (device_create_file(dmdev, &dev_attr_libertas_rtap)) | 1174 | if (device_create_file(dmdev, &dev_attr_lbs_rtap)) |
1175 | goto err_init_adapter; | 1175 | goto err_init_adapter; |
1176 | 1176 | ||
1177 | lbs_deb_thread("Starting main thread...\n"); | 1177 | lbs_deb_thread("Starting main thread...\n"); |
1178 | init_waitqueue_head(&priv->waitq); | 1178 | init_waitqueue_head(&priv->waitq); |
1179 | priv->main_thread = kthread_run(libertas_thread, dev, "libertas_main"); | 1179 | priv->main_thread = kthread_run(lbs_thread, dev, "lbs_main"); |
1180 | if (IS_ERR(priv->main_thread)) { | 1180 | if (IS_ERR(priv->main_thread)) { |
1181 | lbs_deb_thread("Error creating main thread.\n"); | 1181 | lbs_deb_thread("Error creating main thread.\n"); |
1182 | goto err_kthread_run; | 1182 | goto err_kthread_run; |
1183 | } | 1183 | } |
1184 | 1184 | ||
1185 | priv->work_thread = create_singlethread_workqueue("libertas_worker"); | 1185 | priv->work_thread = create_singlethread_workqueue("lbs_worker"); |
1186 | INIT_DELAYED_WORK(&priv->assoc_work, libertas_association_worker); | 1186 | INIT_DELAYED_WORK(&priv->assoc_work, lbs_association_worker); |
1187 | INIT_DELAYED_WORK(&priv->scan_work, libertas_scan_worker); | 1187 | INIT_DELAYED_WORK(&priv->scan_work, lbs_scan_worker); |
1188 | INIT_WORK(&priv->sync_channel, libertas_sync_channel); | 1188 | INIT_WORK(&priv->sync_channel, lbs_sync_channel); |
1189 | 1189 | ||
1190 | goto done; | 1190 | goto done; |
1191 | 1191 | ||
1192 | err_kthread_run: | 1192 | err_kthread_run: |
1193 | device_remove_file(dmdev, &dev_attr_libertas_rtap); | 1193 | device_remove_file(dmdev, &dev_attr_lbs_rtap); |
1194 | 1194 | ||
1195 | err_init_adapter: | 1195 | err_init_adapter: |
1196 | libertas_free_adapter(priv); | 1196 | lbs_free_adapter(priv); |
1197 | 1197 | ||
1198 | err_kzalloc: | 1198 | err_kzalloc: |
1199 | free_netdev(dev); | 1199 | free_netdev(dev); |
@@ -1203,29 +1203,29 @@ done: | |||
1203 | lbs_deb_leave_args(LBS_DEB_NET, "priv %p", priv); | 1203 | lbs_deb_leave_args(LBS_DEB_NET, "priv %p", priv); |
1204 | return priv; | 1204 | return priv; |
1205 | } | 1205 | } |
1206 | EXPORT_SYMBOL_GPL(libertas_add_card); | 1206 | EXPORT_SYMBOL_GPL(lbs_add_card); |
1207 | 1207 | ||
1208 | 1208 | ||
1209 | int libertas_remove_card(wlan_private *priv) | 1209 | int lbs_remove_card(lbs_private *priv) |
1210 | { | 1210 | { |
1211 | wlan_adapter *adapter = priv->adapter; | 1211 | lbs_adapter *adapter = priv->adapter; |
1212 | struct net_device *dev = priv->dev; | 1212 | struct net_device *dev = priv->dev; |
1213 | union iwreq_data wrqu; | 1213 | union iwreq_data wrqu; |
1214 | 1214 | ||
1215 | lbs_deb_enter(LBS_DEB_MAIN); | 1215 | lbs_deb_enter(LBS_DEB_MAIN); |
1216 | 1216 | ||
1217 | libertas_remove_rtap(priv); | 1217 | lbs_remove_rtap(priv); |
1218 | 1218 | ||
1219 | dev = priv->dev; | 1219 | dev = priv->dev; |
1220 | device_remove_file(priv->hotplug_device, &dev_attr_libertas_rtap); | 1220 | device_remove_file(priv->hotplug_device, &dev_attr_lbs_rtap); |
1221 | 1221 | ||
1222 | cancel_delayed_work(&priv->scan_work); | 1222 | cancel_delayed_work(&priv->scan_work); |
1223 | cancel_delayed_work(&priv->assoc_work); | 1223 | cancel_delayed_work(&priv->assoc_work); |
1224 | destroy_workqueue(priv->work_thread); | 1224 | destroy_workqueue(priv->work_thread); |
1225 | 1225 | ||
1226 | if (adapter->psmode == WLAN802_11POWERMODEMAX_PSP) { | 1226 | if (adapter->psmode == LBS802_11POWERMODEMAX_PSP) { |
1227 | adapter->psmode = WLAN802_11POWERMODECAM; | 1227 | adapter->psmode = LBS802_11POWERMODECAM; |
1228 | libertas_ps_wakeup(priv, CMD_OPTION_WAITFORRSP); | 1228 | lbs_ps_wakeup(priv, CMD_OPTION_WAITFORRSP); |
1229 | } | 1229 | } |
1230 | 1230 | ||
1231 | memset(wrqu.ap_addr.sa_data, 0xaa, ETH_ALEN); | 1231 | memset(wrqu.ap_addr.sa_data, 0xaa, ETH_ALEN); |
@@ -1236,7 +1236,7 @@ int libertas_remove_card(wlan_private *priv) | |||
1236 | adapter->surpriseremoved = 1; | 1236 | adapter->surpriseremoved = 1; |
1237 | kthread_stop(priv->main_thread); | 1237 | kthread_stop(priv->main_thread); |
1238 | 1238 | ||
1239 | libertas_free_adapter(priv); | 1239 | lbs_free_adapter(priv); |
1240 | 1240 | ||
1241 | priv->dev = NULL; | 1241 | priv->dev = NULL; |
1242 | free_netdev(dev); | 1242 | free_netdev(dev); |
@@ -1244,10 +1244,10 @@ int libertas_remove_card(wlan_private *priv) | |||
1244 | lbs_deb_leave(LBS_DEB_MAIN); | 1244 | lbs_deb_leave(LBS_DEB_MAIN); |
1245 | return 0; | 1245 | return 0; |
1246 | } | 1246 | } |
1247 | EXPORT_SYMBOL_GPL(libertas_remove_card); | 1247 | EXPORT_SYMBOL_GPL(lbs_remove_card); |
1248 | 1248 | ||
1249 | 1249 | ||
1250 | int libertas_start_card(wlan_private *priv) | 1250 | int lbs_start_card(lbs_private *priv) |
1251 | { | 1251 | { |
1252 | struct net_device *dev = priv->dev; | 1252 | struct net_device *dev = priv->dev; |
1253 | int ret = -1; | 1253 | int ret = -1; |
@@ -1255,19 +1255,19 @@ int libertas_start_card(wlan_private *priv) | |||
1255 | lbs_deb_enter(LBS_DEB_MAIN); | 1255 | lbs_deb_enter(LBS_DEB_MAIN); |
1256 | 1256 | ||
1257 | /* poke the firmware */ | 1257 | /* poke the firmware */ |
1258 | ret = wlan_setup_firmware(priv); | 1258 | ret = lbs_setup_firmware(priv); |
1259 | if (ret) | 1259 | if (ret) |
1260 | goto done; | 1260 | goto done; |
1261 | 1261 | ||
1262 | /* init 802.11d */ | 1262 | /* init 802.11d */ |
1263 | libertas_init_11d(priv); | 1263 | lbs_init_11d(priv); |
1264 | 1264 | ||
1265 | if (register_netdev(dev)) { | 1265 | if (register_netdev(dev)) { |
1266 | lbs_pr_err("cannot register ethX device\n"); | 1266 | lbs_pr_err("cannot register ethX device\n"); |
1267 | goto done; | 1267 | goto done; |
1268 | } | 1268 | } |
1269 | 1269 | ||
1270 | libertas_debugfs_init_one(priv, dev); | 1270 | lbs_debugfs_init_one(priv, dev); |
1271 | 1271 | ||
1272 | lbs_pr_info("%s: Marvell WLAN 802.11 adapter\n", dev->name); | 1272 | lbs_pr_info("%s: Marvell WLAN 802.11 adapter\n", dev->name); |
1273 | 1273 | ||
@@ -1277,10 +1277,10 @@ done: | |||
1277 | lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret); | 1277 | lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret); |
1278 | return ret; | 1278 | return ret; |
1279 | } | 1279 | } |
1280 | EXPORT_SYMBOL_GPL(libertas_start_card); | 1280 | EXPORT_SYMBOL_GPL(lbs_start_card); |
1281 | 1281 | ||
1282 | 1282 | ||
1283 | int libertas_stop_card(wlan_private *priv) | 1283 | int lbs_stop_card(lbs_private *priv) |
1284 | { | 1284 | { |
1285 | struct net_device *dev = priv->dev; | 1285 | struct net_device *dev = priv->dev; |
1286 | int ret = -1; | 1286 | int ret = -1; |
@@ -1292,7 +1292,7 @@ int libertas_stop_card(wlan_private *priv) | |||
1292 | netif_stop_queue(priv->dev); | 1292 | netif_stop_queue(priv->dev); |
1293 | netif_carrier_off(priv->dev); | 1293 | netif_carrier_off(priv->dev); |
1294 | 1294 | ||
1295 | libertas_debugfs_remove_one(priv); | 1295 | lbs_debugfs_remove_one(priv); |
1296 | 1296 | ||
1297 | /* Flush pending command nodes */ | 1297 | /* Flush pending command nodes */ |
1298 | spin_lock_irqsave(&priv->adapter->driver_lock, flags); | 1298 | spin_lock_irqsave(&priv->adapter->driver_lock, flags); |
@@ -1307,16 +1307,16 @@ int libertas_stop_card(wlan_private *priv) | |||
1307 | lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret); | 1307 | lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret); |
1308 | return ret; | 1308 | return ret; |
1309 | } | 1309 | } |
1310 | EXPORT_SYMBOL_GPL(libertas_stop_card); | 1310 | EXPORT_SYMBOL_GPL(lbs_stop_card); |
1311 | 1311 | ||
1312 | 1312 | ||
1313 | /** | 1313 | /** |
1314 | * @brief This function adds mshX interface | 1314 | * @brief This function adds mshX interface |
1315 | * | 1315 | * |
1316 | * @param priv A pointer to the wlan_private structure | 1316 | * @param priv A pointer to the lbs_private structure |
1317 | * @return 0 if successful, -X otherwise | 1317 | * @return 0 if successful, -X otherwise |
1318 | */ | 1318 | */ |
1319 | int libertas_add_mesh(wlan_private *priv, struct device *dev) | 1319 | int lbs_add_mesh(lbs_private *priv, struct device *dev) |
1320 | { | 1320 | { |
1321 | struct net_device *mesh_dev = NULL; | 1321 | struct net_device *mesh_dev = NULL; |
1322 | int ret = 0; | 1322 | int ret = 0; |
@@ -1332,12 +1332,12 @@ int libertas_add_mesh(wlan_private *priv, struct device *dev) | |||
1332 | mesh_dev->priv = priv; | 1332 | mesh_dev->priv = priv; |
1333 | priv->mesh_dev = mesh_dev; | 1333 | priv->mesh_dev = mesh_dev; |
1334 | 1334 | ||
1335 | mesh_dev->open = libertas_mesh_open; | 1335 | mesh_dev->open = lbs_mesh_open; |
1336 | mesh_dev->hard_start_xmit = libertas_mesh_pre_start_xmit; | 1336 | mesh_dev->hard_start_xmit = lbs_mesh_pre_start_xmit; |
1337 | mesh_dev->stop = libertas_mesh_close; | 1337 | mesh_dev->stop = lbs_mesh_close; |
1338 | mesh_dev->get_stats = libertas_get_stats; | 1338 | mesh_dev->get_stats = lbs_get_stats; |
1339 | mesh_dev->set_mac_address = libertas_set_mac_address; | 1339 | mesh_dev->set_mac_address = lbs_set_mac_address; |
1340 | mesh_dev->ethtool_ops = &libertas_ethtool_ops; | 1340 | mesh_dev->ethtool_ops = &lbs_ethtool_ops; |
1341 | memcpy(mesh_dev->dev_addr, priv->dev->dev_addr, | 1341 | memcpy(mesh_dev->dev_addr, priv->dev->dev_addr, |
1342 | sizeof(priv->dev->dev_addr)); | 1342 | sizeof(priv->dev->dev_addr)); |
1343 | 1343 | ||
@@ -1353,7 +1353,7 @@ int libertas_add_mesh(wlan_private *priv, struct device *dev) | |||
1353 | goto err_free; | 1353 | goto err_free; |
1354 | } | 1354 | } |
1355 | 1355 | ||
1356 | ret = sysfs_create_group(&(mesh_dev->dev.kobj), &libertas_mesh_attr_group); | 1356 | ret = sysfs_create_group(&(mesh_dev->dev.kobj), &lbs_mesh_attr_group); |
1357 | if (ret) | 1357 | if (ret) |
1358 | goto err_unregister; | 1358 | goto err_unregister; |
1359 | 1359 | ||
@@ -1371,10 +1371,10 @@ done: | |||
1371 | lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret); | 1371 | lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret); |
1372 | return ret; | 1372 | return ret; |
1373 | } | 1373 | } |
1374 | EXPORT_SYMBOL_GPL(libertas_add_mesh); | 1374 | EXPORT_SYMBOL_GPL(lbs_add_mesh); |
1375 | 1375 | ||
1376 | 1376 | ||
1377 | void libertas_remove_mesh(wlan_private *priv) | 1377 | void lbs_remove_mesh(lbs_private *priv) |
1378 | { | 1378 | { |
1379 | struct net_device *mesh_dev; | 1379 | struct net_device *mesh_dev; |
1380 | 1380 | ||
@@ -1388,7 +1388,7 @@ void libertas_remove_mesh(wlan_private *priv) | |||
1388 | netif_stop_queue(mesh_dev); | 1388 | netif_stop_queue(mesh_dev); |
1389 | netif_carrier_off(priv->mesh_dev); | 1389 | netif_carrier_off(priv->mesh_dev); |
1390 | 1390 | ||
1391 | sysfs_remove_group(&(mesh_dev->dev.kobj), &libertas_mesh_attr_group); | 1391 | sysfs_remove_group(&(mesh_dev->dev.kobj), &lbs_mesh_attr_group); |
1392 | unregister_netdev(mesh_dev); | 1392 | unregister_netdev(mesh_dev); |
1393 | 1393 | ||
1394 | priv->mesh_dev = NULL ; | 1394 | priv->mesh_dev = NULL ; |
@@ -1397,7 +1397,7 @@ void libertas_remove_mesh(wlan_private *priv) | |||
1397 | out: | 1397 | out: |
1398 | lbs_deb_leave(LBS_DEB_MAIN); | 1398 | lbs_deb_leave(LBS_DEB_MAIN); |
1399 | } | 1399 | } |
1400 | EXPORT_SYMBOL_GPL(libertas_remove_mesh); | 1400 | EXPORT_SYMBOL_GPL(lbs_remove_mesh); |
1401 | 1401 | ||
1402 | /** | 1402 | /** |
1403 | * @brief This function finds the CFP in | 1403 | * @brief This function finds the CFP in |
@@ -1408,7 +1408,7 @@ EXPORT_SYMBOL_GPL(libertas_remove_mesh); | |||
1408 | * @param cfp_no A pointer to CFP number | 1408 | * @param cfp_no A pointer to CFP number |
1409 | * @return A pointer to CFP | 1409 | * @return A pointer to CFP |
1410 | */ | 1410 | */ |
1411 | struct chan_freq_power *libertas_get_region_cfp_table(u8 region, u8 band, int *cfp_no) | 1411 | struct chan_freq_power *lbs_get_region_cfp_table(u8 region, u8 band, int *cfp_no) |
1412 | { | 1412 | { |
1413 | int i, end; | 1413 | int i, end; |
1414 | 1414 | ||
@@ -1430,9 +1430,9 @@ struct chan_freq_power *libertas_get_region_cfp_table(u8 region, u8 band, int *c | |||
1430 | return NULL; | 1430 | return NULL; |
1431 | } | 1431 | } |
1432 | 1432 | ||
1433 | int libertas_set_regiontable(wlan_private * priv, u8 region, u8 band) | 1433 | int lbs_set_regiontable(lbs_private *priv, u8 region, u8 band) |
1434 | { | 1434 | { |
1435 | wlan_adapter *adapter = priv->adapter; | 1435 | lbs_adapter *adapter = priv->adapter; |
1436 | int ret = 0; | 1436 | int ret = 0; |
1437 | int i = 0; | 1437 | int i = 0; |
1438 | 1438 | ||
@@ -1444,7 +1444,7 @@ int libertas_set_regiontable(wlan_private * priv, u8 region, u8 band) | |||
1444 | memset(adapter->region_channel, 0, sizeof(adapter->region_channel)); | 1444 | memset(adapter->region_channel, 0, sizeof(adapter->region_channel)); |
1445 | 1445 | ||
1446 | { | 1446 | { |
1447 | cfp = libertas_get_region_cfp_table(region, band, &cfp_no); | 1447 | cfp = lbs_get_region_cfp_table(region, band, &cfp_no); |
1448 | if (cfp != NULL) { | 1448 | if (cfp != NULL) { |
1449 | adapter->region_channel[i].nrcfp = cfp_no; | 1449 | adapter->region_channel[i].nrcfp = cfp_no; |
1450 | adapter->region_channel[i].CFP = cfp; | 1450 | adapter->region_channel[i].CFP = cfp; |
@@ -1472,13 +1472,13 @@ out: | |||
1472 | * @param dev A pointer to net_device structure | 1472 | * @param dev A pointer to net_device structure |
1473 | * @return n/a | 1473 | * @return n/a |
1474 | */ | 1474 | */ |
1475 | void libertas_interrupt(struct net_device *dev) | 1475 | void lbs_interrupt(struct net_device *dev) |
1476 | { | 1476 | { |
1477 | wlan_private *priv = dev->priv; | 1477 | lbs_private *priv = dev->priv; |
1478 | 1478 | ||
1479 | lbs_deb_enter(LBS_DEB_THREAD); | 1479 | lbs_deb_enter(LBS_DEB_THREAD); |
1480 | 1480 | ||
1481 | lbs_deb_thread("libertas_interrupt: intcounter=%d\n", | 1481 | lbs_deb_thread("lbs_interrupt: intcounter=%d\n", |
1482 | priv->adapter->intcounter); | 1482 | priv->adapter->intcounter); |
1483 | 1483 | ||
1484 | priv->adapter->intcounter++; | 1484 | priv->adapter->intcounter++; |
@@ -1494,35 +1494,35 @@ void libertas_interrupt(struct net_device *dev) | |||
1494 | 1494 | ||
1495 | lbs_deb_leave(LBS_DEB_THREAD); | 1495 | lbs_deb_leave(LBS_DEB_THREAD); |
1496 | } | 1496 | } |
1497 | EXPORT_SYMBOL_GPL(libertas_interrupt); | 1497 | EXPORT_SYMBOL_GPL(lbs_interrupt); |
1498 | 1498 | ||
1499 | int libertas_reset_device(wlan_private *priv) | 1499 | int lbs_reset_device(lbs_private *priv) |
1500 | { | 1500 | { |
1501 | int ret; | 1501 | int ret; |
1502 | 1502 | ||
1503 | lbs_deb_enter(LBS_DEB_MAIN); | 1503 | lbs_deb_enter(LBS_DEB_MAIN); |
1504 | ret = libertas_prepare_and_send_command(priv, CMD_802_11_RESET, | 1504 | ret = lbs_prepare_and_send_command(priv, CMD_802_11_RESET, |
1505 | CMD_ACT_HALT, 0, 0, NULL); | 1505 | CMD_ACT_HALT, 0, 0, NULL); |
1506 | msleep_interruptible(10); | 1506 | msleep_interruptible(10); |
1507 | 1507 | ||
1508 | lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret); | 1508 | lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret); |
1509 | return ret; | 1509 | return ret; |
1510 | } | 1510 | } |
1511 | EXPORT_SYMBOL_GPL(libertas_reset_device); | 1511 | EXPORT_SYMBOL_GPL(lbs_reset_device); |
1512 | 1512 | ||
1513 | static int libertas_init_module(void) | 1513 | static int lbs_init_module(void) |
1514 | { | 1514 | { |
1515 | lbs_deb_enter(LBS_DEB_MAIN); | 1515 | lbs_deb_enter(LBS_DEB_MAIN); |
1516 | libertas_debugfs_init(); | 1516 | lbs_debugfs_init(); |
1517 | lbs_deb_leave(LBS_DEB_MAIN); | 1517 | lbs_deb_leave(LBS_DEB_MAIN); |
1518 | return 0; | 1518 | return 0; |
1519 | } | 1519 | } |
1520 | 1520 | ||
1521 | static void libertas_exit_module(void) | 1521 | static void lbs_exit_module(void) |
1522 | { | 1522 | { |
1523 | lbs_deb_enter(LBS_DEB_MAIN); | 1523 | lbs_deb_enter(LBS_DEB_MAIN); |
1524 | 1524 | ||
1525 | libertas_debugfs_remove(); | 1525 | lbs_debugfs_remove(); |
1526 | 1526 | ||
1527 | lbs_deb_leave(LBS_DEB_MAIN); | 1527 | lbs_deb_leave(LBS_DEB_MAIN); |
1528 | } | 1528 | } |
@@ -1531,32 +1531,32 @@ static void libertas_exit_module(void) | |||
1531 | * rtap interface support fuctions | 1531 | * rtap interface support fuctions |
1532 | */ | 1532 | */ |
1533 | 1533 | ||
1534 | static int libertas_rtap_open(struct net_device *dev) | 1534 | static int lbs_rtap_open(struct net_device *dev) |
1535 | { | 1535 | { |
1536 | netif_carrier_off(dev); | 1536 | netif_carrier_off(dev); |
1537 | netif_stop_queue(dev); | 1537 | netif_stop_queue(dev); |
1538 | return 0; | 1538 | return 0; |
1539 | } | 1539 | } |
1540 | 1540 | ||
1541 | static int libertas_rtap_stop(struct net_device *dev) | 1541 | static int lbs_rtap_stop(struct net_device *dev) |
1542 | { | 1542 | { |
1543 | return 0; | 1543 | return 0; |
1544 | } | 1544 | } |
1545 | 1545 | ||
1546 | static int libertas_rtap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | 1546 | static int lbs_rtap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) |
1547 | { | 1547 | { |
1548 | netif_stop_queue(dev); | 1548 | netif_stop_queue(dev); |
1549 | return -EOPNOTSUPP; | 1549 | return -EOPNOTSUPP; |
1550 | } | 1550 | } |
1551 | 1551 | ||
1552 | static struct net_device_stats *libertas_rtap_get_stats(struct net_device *dev) | 1552 | static struct net_device_stats *lbs_rtap_get_stats(struct net_device *dev) |
1553 | { | 1553 | { |
1554 | wlan_private *priv = dev->priv; | 1554 | lbs_private *priv = dev->priv; |
1555 | return &priv->ieee->stats; | 1555 | return &priv->ieee->stats; |
1556 | } | 1556 | } |
1557 | 1557 | ||
1558 | 1558 | ||
1559 | void libertas_remove_rtap(wlan_private *priv) | 1559 | void lbs_remove_rtap(lbs_private *priv) |
1560 | { | 1560 | { |
1561 | if (priv->rtap_net_dev == NULL) | 1561 | if (priv->rtap_net_dev == NULL) |
1562 | return; | 1562 | return; |
@@ -1565,7 +1565,7 @@ void libertas_remove_rtap(wlan_private *priv) | |||
1565 | priv->rtap_net_dev = NULL; | 1565 | priv->rtap_net_dev = NULL; |
1566 | } | 1566 | } |
1567 | 1567 | ||
1568 | int libertas_add_rtap(wlan_private *priv) | 1568 | int lbs_add_rtap(lbs_private *priv) |
1569 | { | 1569 | { |
1570 | int rc = 0; | 1570 | int rc = 0; |
1571 | 1571 | ||
@@ -1582,11 +1582,11 @@ int libertas_add_rtap(wlan_private *priv) | |||
1582 | strcpy(priv->rtap_net_dev->name, "rtap%d"); | 1582 | strcpy(priv->rtap_net_dev->name, "rtap%d"); |
1583 | 1583 | ||
1584 | priv->rtap_net_dev->type = ARPHRD_IEEE80211_RADIOTAP; | 1584 | priv->rtap_net_dev->type = ARPHRD_IEEE80211_RADIOTAP; |
1585 | priv->rtap_net_dev->open = libertas_rtap_open; | 1585 | priv->rtap_net_dev->open = lbs_rtap_open; |
1586 | priv->rtap_net_dev->stop = libertas_rtap_stop; | 1586 | priv->rtap_net_dev->stop = lbs_rtap_stop; |
1587 | priv->rtap_net_dev->get_stats = libertas_rtap_get_stats; | 1587 | priv->rtap_net_dev->get_stats = lbs_rtap_get_stats; |
1588 | priv->rtap_net_dev->hard_start_xmit = libertas_rtap_hard_start_xmit; | 1588 | priv->rtap_net_dev->hard_start_xmit = lbs_rtap_hard_start_xmit; |
1589 | priv->rtap_net_dev->set_multicast_list = libertas_set_multicast_list; | 1589 | priv->rtap_net_dev->set_multicast_list = lbs_set_multicast_list; |
1590 | priv->rtap_net_dev->priv = priv; | 1590 | priv->rtap_net_dev->priv = priv; |
1591 | 1591 | ||
1592 | priv->ieee->iw_mode = IW_MODE_MONITOR; | 1592 | priv->ieee->iw_mode = IW_MODE_MONITOR; |
@@ -1602,8 +1602,8 @@ int libertas_add_rtap(wlan_private *priv) | |||
1602 | } | 1602 | } |
1603 | 1603 | ||
1604 | 1604 | ||
1605 | module_init(libertas_init_module); | 1605 | module_init(lbs_init_module); |
1606 | module_exit(libertas_exit_module); | 1606 | module_exit(lbs_exit_module); |
1607 | 1607 | ||
1608 | MODULE_DESCRIPTION("Libertas WLAN Driver Library"); | 1608 | MODULE_DESCRIPTION("Libertas WLAN Driver Library"); |
1609 | MODULE_AUTHOR("Marvell International Ltd."); | 1609 | MODULE_AUTHOR("Marvell International Ltd."); |