aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/assoc.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-08-02 11:31:18 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:49:43 -0400
commit0aef64d75851c9f3545d0793f26486ed862306d8 (patch)
tree5cf333e35691636ce1dc728c749679359677cb66 /drivers/net/wireless/libertas/assoc.c
parentb44898eb2c917cd397a0d8654f1c249dd3cdc67e (diff)
[PATCH] libertas: re-uppercase command defines and other constants
For readability. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/assoc.c')
-rw-r--r--drivers/net/wireless/libertas/assoc.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c
index 36586db3e1f7..5fdc96f289b8 100644
--- a/drivers/net/wireless/libertas/assoc.c
+++ b/drivers/net/wireless/libertas/assoc.c
@@ -175,14 +175,14 @@ static int assoc_helper_mode(wlan_private *priv,
175 175
176 if (assoc_req->mode == IW_MODE_INFRA) { 176 if (assoc_req->mode == IW_MODE_INFRA) {
177 if (adapter->psstate != PS_STATE_FULL_POWER) 177 if (adapter->psstate != PS_STATE_FULL_POWER)
178 libertas_ps_wakeup(priv, cmd_option_waitforrsp); 178 libertas_ps_wakeup(priv, CMD_OPTION_WAITFORRSP);
179 adapter->psmode = wlan802_11powermodecam; 179 adapter->psmode = WLAN802_11POWERMODECAM;
180 } 180 }
181 181
182 adapter->mode = assoc_req->mode; 182 adapter->mode = assoc_req->mode;
183 ret = libertas_prepare_and_send_command(priv, 183 ret = libertas_prepare_and_send_command(priv,
184 cmd_802_11_snmp_mib, 184 CMD_802_11_SNMP_MIB,
185 0, cmd_option_waitforrsp, 185 0, CMD_OPTION_WAITFORRSP,
186 OID_802_11_INFRASTRUCTURE_MODE, 186 OID_802_11_INFRASTRUCTURE_MODE,
187 /* Shoot me now */ (void *) (size_t) assoc_req->mode); 187 /* Shoot me now */ (void *) (size_t) assoc_req->mode);
188 188
@@ -195,9 +195,9 @@ done:
195static int update_channel(wlan_private * priv) 195static int update_channel(wlan_private * priv)
196{ 196{
197 /* the channel in f/w could be out of sync, get the current channel */ 197 /* the channel in f/w could be out of sync, get the current channel */
198 return libertas_prepare_and_send_command(priv, cmd_802_11_rf_channel, 198 return libertas_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL,
199 cmd_opt_802_11_rf_channel_get, 199 CMD_OPT_802_11_RF_CHANNEL_GET,
200 cmd_option_waitforrsp, 0, NULL); 200 CMD_OPTION_WAITFORRSP, 0, NULL);
201} 201}
202 202
203void libertas_sync_channel(struct work_struct *work) 203void libertas_sync_channel(struct work_struct *work)
@@ -227,9 +227,9 @@ static int assoc_helper_channel(wlan_private *priv,
227 lbs_deb_assoc("ASSOC: channel: %d -> %d\n", 227 lbs_deb_assoc("ASSOC: channel: %d -> %d\n",
228 adapter->curbssparams.channel, assoc_req->channel); 228 adapter->curbssparams.channel, assoc_req->channel);
229 229
230 ret = libertas_prepare_and_send_command(priv, cmd_802_11_rf_channel, 230 ret = libertas_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL,
231 cmd_opt_802_11_rf_channel_set, 231 CMD_OPT_802_11_RF_CHANNEL_SET,
232 cmd_option_waitforrsp, 0, &assoc_req->channel); 232 CMD_OPTION_WAITFORRSP, 0, &assoc_req->channel);
233 if (ret < 0) { 233 if (ret < 0) {
234 lbs_deb_assoc("ASSOC: channel: error setting channel."); 234 lbs_deb_assoc("ASSOC: channel: error setting channel.");
235 } 235 }
@@ -278,15 +278,15 @@ static int assoc_helper_wep_keys(wlan_private *priv,
278 || assoc_req->wep_keys[2].len 278 || assoc_req->wep_keys[2].len
279 || assoc_req->wep_keys[3].len) { 279 || assoc_req->wep_keys[3].len) {
280 ret = libertas_prepare_and_send_command(priv, 280 ret = libertas_prepare_and_send_command(priv,
281 cmd_802_11_set_wep, 281 CMD_802_11_SET_WEP,
282 cmd_act_add, 282 CMD_ACT_ADD,
283 cmd_option_waitforrsp, 283 CMD_OPTION_WAITFORRSP,
284 0, assoc_req); 284 0, assoc_req);
285 } else { 285 } else {
286 ret = libertas_prepare_and_send_command(priv, 286 ret = libertas_prepare_and_send_command(priv,
287 cmd_802_11_set_wep, 287 CMD_802_11_SET_WEP,
288 cmd_act_remove, 288 CMD_ACT_REMOVE,
289 cmd_option_waitforrsp, 289 CMD_OPTION_WAITFORRSP,
290 0, NULL); 290 0, NULL);
291 } 291 }
292 292
@@ -295,9 +295,9 @@ static int assoc_helper_wep_keys(wlan_private *priv,
295 295
296 /* enable/disable the MAC's WEP packet filter */ 296 /* enable/disable the MAC's WEP packet filter */
297 if (assoc_req->secinfo.wep_enabled) 297 if (assoc_req->secinfo.wep_enabled)
298 adapter->currentpacketfilter |= cmd_act_mac_wep_enable; 298 adapter->currentpacketfilter |= CMD_ACT_MAC_WEP_ENABLE;
299 else 299 else
300 adapter->currentpacketfilter &= ~cmd_act_mac_wep_enable; 300 adapter->currentpacketfilter &= ~CMD_ACT_MAC_WEP_ENABLE;
301 ret = libertas_set_mac_packet_filter(priv); 301 ret = libertas_set_mac_packet_filter(priv);
302 if (ret) 302 if (ret)
303 goto out; 303 goto out;
@@ -342,9 +342,9 @@ static int assoc_helper_secinfo(wlan_private *priv,
342 342
343 /* Get RSN enabled/disabled */ 343 /* Get RSN enabled/disabled */
344 ret = libertas_prepare_and_send_command(priv, 344 ret = libertas_prepare_and_send_command(priv,
345 cmd_802_11_enable_rsn, 345 CMD_802_11_ENABLE_RSN,
346 cmd_act_set, 346 CMD_ACT_GET,
347 cmd_option_waitforrsp, 347 CMD_OPTION_WAITFORRSP,
348 0, &rsn); 348 0, &rsn);
349 if (ret) { 349 if (ret) {
350 lbs_deb_assoc("Failed to get RSN status: %d", ret); 350 lbs_deb_assoc("Failed to get RSN status: %d", ret);
@@ -359,9 +359,9 @@ static int assoc_helper_secinfo(wlan_private *priv,
359 /* Set RSN enabled/disabled */ 359 /* Set RSN enabled/disabled */
360 rsn = do_wpa; 360 rsn = do_wpa;
361 ret = libertas_prepare_and_send_command(priv, 361 ret = libertas_prepare_and_send_command(priv,
362 cmd_802_11_enable_rsn, 362 CMD_802_11_ENABLE_RSN,
363 cmd_act_set, 363 CMD_ACT_SET,
364 cmd_option_waitforrsp, 364 CMD_OPTION_WAITFORRSP,
365 0, &rsn); 365 0, &rsn);
366 366
367out: 367out:
@@ -378,9 +378,9 @@ static int assoc_helper_wpa_keys(wlan_private *priv,
378 lbs_deb_enter(LBS_DEB_ASSOC); 378 lbs_deb_enter(LBS_DEB_ASSOC);
379 379
380 ret = libertas_prepare_and_send_command(priv, 380 ret = libertas_prepare_and_send_command(priv,
381 cmd_802_11_key_material, 381 CMD_802_11_KEY_MATERIAL,
382 cmd_act_set, 382 CMD_ACT_SET,
383 cmd_option_waitforrsp, 383 CMD_OPTION_WAITFORRSP,
384 0, assoc_req); 384 0, assoc_req);
385 385
386 lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret); 386 lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret);
@@ -412,7 +412,7 @@ static int assoc_helper_wpa_ie(wlan_private *priv,
412static int should_deauth_infrastructure(wlan_adapter *adapter, 412static int should_deauth_infrastructure(wlan_adapter *adapter,
413 struct assoc_request * assoc_req) 413 struct assoc_request * assoc_req)
414{ 414{
415 if (adapter->connect_status != libertas_connected) 415 if (adapter->connect_status != LIBERTAS_CONNECTED)
416 return 0; 416 return 0;
417 417
418 if (test_bit(ASSOC_FLAG_SSID, &assoc_req->flags)) { 418 if (test_bit(ASSOC_FLAG_SSID, &assoc_req->flags)) {
@@ -453,7 +453,7 @@ static int should_deauth_infrastructure(wlan_adapter *adapter,
453static int should_stop_adhoc(wlan_adapter *adapter, 453static int should_stop_adhoc(wlan_adapter *adapter,
454 struct assoc_request * assoc_req) 454 struct assoc_request * assoc_req)
455{ 455{
456 if (adapter->connect_status != libertas_connected) 456 if (adapter->connect_status != LIBERTAS_CONNECTED)
457 return 0; 457 return 0;
458 458
459 if (libertas_ssid_cmp(adapter->curbssparams.ssid, 459 if (libertas_ssid_cmp(adapter->curbssparams.ssid,
@@ -623,7 +623,7 @@ void libertas_association_worker(struct work_struct *work)
623 success = 0; 623 success = 0;
624 } 624 }
625 625
626 if (adapter->connect_status != libertas_connected) { 626 if (adapter->connect_status != LIBERTAS_CONNECTED) {
627 lbs_deb_assoc("ASSOC: assoication attempt unsuccessful, " 627 lbs_deb_assoc("ASSOC: assoication attempt unsuccessful, "
628 "not connected.\n"); 628 "not connected.\n");
629 success = 0; 629 success = 0;
@@ -636,12 +636,12 @@ void libertas_association_worker(struct work_struct *work)
636 adapter->curbssparams.ssid_len), 636 adapter->curbssparams.ssid_len),
637 MAC_ARG(adapter->curbssparams.bssid)); 637 MAC_ARG(adapter->curbssparams.bssid));
638 libertas_prepare_and_send_command(priv, 638 libertas_prepare_and_send_command(priv,
639 cmd_802_11_rssi, 639 CMD_802_11_RSSI,
640 0, cmd_option_waitforrsp, 0, NULL); 640 0, CMD_OPTION_WAITFORRSP, 0, NULL);
641 641
642 libertas_prepare_and_send_command(priv, 642 libertas_prepare_and_send_command(priv,
643 cmd_802_11_get_log, 643 CMD_802_11_GET_LOG,
644 0, cmd_option_waitforrsp, 0, NULL); 644 0, CMD_OPTION_WAITFORRSP, 0, NULL);
645 } else { 645 } else {
646 ret = -1; 646 ret = -1;
647 } 647 }