aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cmdresp.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/cmdresp.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/cmdresp.c')
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c140
1 files changed, 70 insertions, 70 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index 89bd43c2efa3..4c15071984b9 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -28,7 +28,7 @@ void libertas_mac_event_disconnected(wlan_private * priv)
28 wlan_adapter *adapter = priv->adapter; 28 wlan_adapter *adapter = priv->adapter;
29 union iwreq_data wrqu; 29 union iwreq_data wrqu;
30 30
31 if (adapter->connect_status != libertas_connected) 31 if (adapter->connect_status != LIBERTAS_CONNECTED)
32 return; 32 return;
33 33
34 lbs_deb_cmd("Handles disconnect event.\n"); 34 lbs_deb_cmd("Handles disconnect event.\n");
@@ -69,7 +69,7 @@ void libertas_mac_event_disconnected(wlan_private * priv)
69 escape_essid(adapter->prev_ssid, adapter->prev_ssid_len), 69 escape_essid(adapter->prev_ssid, adapter->prev_ssid_len),
70 adapter->prev_ssid_len); 70 adapter->prev_ssid_len);
71 71
72 adapter->connect_status = libertas_disconnected; 72 adapter->connect_status = LIBERTAS_DISCONNECTED;
73 73
74 /* Save previous SSID and BSSID for possible reassociation */ 74 /* Save previous SSID and BSSID for possible reassociation */
75 memcpy(&adapter->prev_ssid, &adapter->curbssparams.ssid, 75 memcpy(&adapter->prev_ssid, &adapter->curbssparams.ssid,
@@ -124,7 +124,7 @@ static int wlan_ret_reg_access(wlan_private * priv,
124 lbs_deb_enter(LBS_DEB_CMD); 124 lbs_deb_enter(LBS_DEB_CMD);
125 125
126 switch (type) { 126 switch (type) {
127 case cmd_ret_mac_reg_access: 127 case CMD_RET_MAC_REG_ACCESS:
128 { 128 {
129 struct cmd_ds_mac_reg_access *reg = &resp->params.macreg; 129 struct cmd_ds_mac_reg_access *reg = &resp->params.macreg;
130 130
@@ -133,7 +133,7 @@ static int wlan_ret_reg_access(wlan_private * priv,
133 break; 133 break;
134 } 134 }
135 135
136 case cmd_ret_bbp_reg_access: 136 case CMD_RET_BBP_REG_ACCESS:
137 { 137 {
138 struct cmd_ds_bbp_reg_access *reg = &resp->params.bbpreg; 138 struct cmd_ds_bbp_reg_access *reg = &resp->params.bbpreg;
139 139
@@ -142,7 +142,7 @@ static int wlan_ret_reg_access(wlan_private * priv,
142 break; 142 break;
143 } 143 }
144 144
145 case cmd_ret_rf_reg_access: 145 case CMD_RET_RF_REG_ACCESS:
146 { 146 {
147 struct cmd_ds_rf_reg_access *reg = &resp->params.rfreg; 147 struct cmd_ds_rf_reg_access *reg = &resp->params.rfreg;
148 148
@@ -274,21 +274,21 @@ static int wlan_ret_802_11_snmp_mib(wlan_private * priv,
274 querytype); 274 querytype);
275 lbs_deb_cmd("SNMP_RESP: Buf size = %x\n", le16_to_cpu(smib->bufsize)); 275 lbs_deb_cmd("SNMP_RESP: Buf size = %x\n", le16_to_cpu(smib->bufsize));
276 276
277 if (querytype == cmd_act_get) { 277 if (querytype == CMD_ACT_GET) {
278 switch (oid) { 278 switch (oid) {
279 case fragthresh_i: 279 case FRAGTHRESH_I:
280 priv->adapter->fragthsd = 280 priv->adapter->fragthsd =
281 le16_to_cpu(*((__le16 *)(smib->value))); 281 le16_to_cpu(*((__le16 *)(smib->value)));
282 lbs_deb_cmd("SNMP_RESP: fragthsd =%u\n", 282 lbs_deb_cmd("SNMP_RESP: fragthsd =%u\n",
283 priv->adapter->fragthsd); 283 priv->adapter->fragthsd);
284 break; 284 break;
285 case rtsthresh_i: 285 case RTSTHRESH_I:
286 priv->adapter->rtsthsd = 286 priv->adapter->rtsthsd =
287 le16_to_cpu(*((__le16 *)(smib->value))); 287 le16_to_cpu(*((__le16 *)(smib->value)));
288 lbs_deb_cmd("SNMP_RESP: rtsthsd =%u\n", 288 lbs_deb_cmd("SNMP_RESP: rtsthsd =%u\n",
289 priv->adapter->rtsthsd); 289 priv->adapter->rtsthsd);
290 break; 290 break;
291 case short_retrylim_i: 291 case SHORT_RETRYLIM_I:
292 priv->adapter->txretrycount = 292 priv->adapter->txretrycount =
293 le16_to_cpu(*((__le16 *)(smib->value))); 293 le16_to_cpu(*((__le16 *)(smib->value)));
294 lbs_deb_cmd("SNMP_RESP: txretrycount =%u\n", 294 lbs_deb_cmd("SNMP_RESP: txretrycount =%u\n",
@@ -314,7 +314,7 @@ static int wlan_ret_802_11_key_material(wlan_private * priv,
314 lbs_deb_enter(LBS_DEB_CMD); 314 lbs_deb_enter(LBS_DEB_CMD);
315 315
316 /* Copy the returned key to driver private data */ 316 /* Copy the returned key to driver private data */
317 if (action == cmd_act_get) { 317 if (action == CMD_ACT_GET) {
318 u8 * buf_ptr = (u8 *) &pkeymaterial->keyParamSet; 318 u8 * buf_ptr = (u8 *) &pkeymaterial->keyParamSet;
319 u8 * resp_end = (u8 *) (resp + le16_to_cpu(resp->size)); 319 u8 * resp_end = (u8 *) (resp + le16_to_cpu(resp->size));
320 320
@@ -396,10 +396,10 @@ static int wlan_ret_802_11_rf_antenna(wlan_private * priv,
396 wlan_adapter *adapter = priv->adapter; 396 wlan_adapter *adapter = priv->adapter;
397 u16 action = le16_to_cpu(pAntenna->action); 397 u16 action = le16_to_cpu(pAntenna->action);
398 398
399 if (action == cmd_act_get_rx) 399 if (action == CMD_ACT_GET_rx)
400 adapter->rxantennamode = le16_to_cpu(pAntenna->antennamode); 400 adapter->rxantennamode = le16_to_cpu(pAntenna->antennamode);
401 401
402 if (action == cmd_act_get_tx) 402 if (action == CMD_ACT_GET_tx)
403 adapter->txantennamode = le16_to_cpu(pAntenna->antennamode); 403 adapter->txantennamode = le16_to_cpu(pAntenna->antennamode);
404 404
405 lbs_deb_cmd("RF_ANT_RESP: action = 0x%x, mode = 0x%04x\n", 405 lbs_deb_cmd("RF_ANT_RESP: action = 0x%x, mode = 0x%04x\n",
@@ -416,7 +416,7 @@ static int wlan_ret_802_11_rate_adapt_rateset(wlan_private * priv,
416 416
417 lbs_deb_enter(LBS_DEB_CMD); 417 lbs_deb_enter(LBS_DEB_CMD);
418 418
419 if (rates->action == cmd_act_get) { 419 if (rates->action == CMD_ACT_GET) {
420 adapter->enablehwauto = le16_to_cpu(rates->enablehwauto); 420 adapter->enablehwauto = le16_to_cpu(rates->enablehwauto);
421 adapter->ratebitmap = le16_to_cpu(rates->bitmap); 421 adapter->ratebitmap = le16_to_cpu(rates->bitmap);
422 } 422 }
@@ -438,7 +438,7 @@ static int wlan_ret_802_11_data_rate(wlan_private * priv,
438 (u8 *) pdatarate, sizeof(struct cmd_ds_802_11_data_rate)); 438 (u8 *) pdatarate, sizeof(struct cmd_ds_802_11_data_rate));
439 439
440 dot11datarate = pdatarate->datarate[0]; 440 dot11datarate = pdatarate->datarate[0];
441 if (pdatarate->action == cpu_to_le16(cmd_act_get_tx_rate)) { 441 if (pdatarate->action == cpu_to_le16(CMD_ACT_GET_tx_rate)) {
442 memcpy(adapter->libertas_supported_rates, pdatarate->datarate, 442 memcpy(adapter->libertas_supported_rates, pdatarate->datarate,
443 sizeof(adapter->libertas_supported_rates)); 443 sizeof(adapter->libertas_supported_rates));
444 } 444 }
@@ -458,7 +458,7 @@ static int wlan_ret_802_11_rf_channel(wlan_private * priv,
458 458
459 lbs_deb_enter(LBS_DEB_CMD); 459 lbs_deb_enter(LBS_DEB_CMD);
460 460
461 if (action == cmd_opt_802_11_rf_channel_get 461 if (action == CMD_OPT_802_11_RF_CHANNEL_GET
462 && adapter->curbssparams.channel != newchannel) { 462 && adapter->curbssparams.channel != newchannel) {
463 lbs_deb_cmd("channel Switch: %d to %d\n", 463 lbs_deb_cmd("channel Switch: %d to %d\n",
464 adapter->curbssparams.channel, newchannel); 464 adapter->curbssparams.channel, newchannel);
@@ -547,7 +547,7 @@ static int libertas_ret_802_11_enable_rsn(wlan_private * priv,
547 547
548 lbs_deb_enter(LBS_DEB_CMD); 548 lbs_deb_enter(LBS_DEB_CMD);
549 549
550 if (enable_rsn->action == cpu_to_le16(cmd_act_get)) { 550 if (enable_rsn->action == cpu_to_le16(CMD_ACT_GET)) {
551 if (pdata_buf) 551 if (pdata_buf)
552 *pdata_buf = (u32) le16_to_cpu(enable_rsn->enable); 552 *pdata_buf = (u32) le16_to_cpu(enable_rsn->enable);
553 } 553 }
@@ -565,134 +565,134 @@ static inline int handle_cmd_response(u16 respcmd,
565 wlan_adapter *adapter = priv->adapter; 565 wlan_adapter *adapter = priv->adapter;
566 566
567 switch (respcmd) { 567 switch (respcmd) {
568 case cmd_ret_mac_reg_access: 568 case CMD_RET_MAC_REG_ACCESS:
569 case cmd_ret_bbp_reg_access: 569 case CMD_RET_BBP_REG_ACCESS:
570 case cmd_ret_rf_reg_access: 570 case CMD_RET_RF_REG_ACCESS:
571 ret = wlan_ret_reg_access(priv, respcmd, resp); 571 ret = wlan_ret_reg_access(priv, respcmd, resp);
572 break; 572 break;
573 573
574 case cmd_ret_hw_spec_info: 574 case CMD_RET_HW_SPEC_INFO:
575 ret = wlan_ret_get_hw_spec(priv, resp); 575 ret = wlan_ret_get_hw_spec(priv, resp);
576 break; 576 break;
577 577
578 case cmd_ret_802_11_scan: 578 case CMD_RET_802_11_SCAN:
579 ret = libertas_ret_80211_scan(priv, resp); 579 ret = libertas_ret_80211_scan(priv, resp);
580 break; 580 break;
581 581
582 case cmd_ret_802_11_get_log: 582 case CMD_RET_802_11_GET_LOG:
583 ret = wlan_ret_get_log(priv, resp); 583 ret = wlan_ret_get_log(priv, resp);
584 break; 584 break;
585 585
586 case cmd_ret_802_11_associate: 586 case CMD_RET_802_11_ASSOCIATE:
587 case cmd_ret_802_11_reassociate: 587 case CMD_RET_802_11_REASSOCIATE:
588 ret = libertas_ret_80211_associate(priv, resp); 588 ret = libertas_ret_80211_associate(priv, resp);
589 break; 589 break;
590 590
591 case cmd_ret_802_11_disassociate: 591 case CMD_RET_802_11_DISASSOCIATE:
592 case cmd_ret_802_11_deauthenticate: 592 case CMD_RET_802_11_DEAUTHENTICATE:
593 ret = libertas_ret_80211_disassociate(priv, resp); 593 ret = libertas_ret_80211_disassociate(priv, resp);
594 break; 594 break;
595 595
596 case cmd_ret_802_11_ad_hoc_start: 596 case CMD_RET_802_11_AD_HOC_START:
597 case cmd_ret_802_11_ad_hoc_join: 597 case CMD_RET_802_11_AD_HOC_JOIN:
598 ret = libertas_ret_80211_ad_hoc_start(priv, resp); 598 ret = libertas_ret_80211_ad_hoc_start(priv, resp);
599 break; 599 break;
600 600
601 case cmd_ret_802_11_stat: 601 case CMD_RET_802_11_STAT:
602 ret = wlan_ret_802_11_stat(priv, resp); 602 ret = wlan_ret_802_11_stat(priv, resp);
603 break; 603 break;
604 604
605 case cmd_ret_802_11_snmp_mib: 605 case CMD_RET_802_11_SNMP_MIB:
606 ret = wlan_ret_802_11_snmp_mib(priv, resp); 606 ret = wlan_ret_802_11_snmp_mib(priv, resp);
607 break; 607 break;
608 608
609 case cmd_ret_802_11_rf_tx_power: 609 case CMD_RET_802_11_RF_TX_POWER:
610 ret = wlan_ret_802_11_rf_tx_power(priv, resp); 610 ret = wlan_ret_802_11_rf_tx_power(priv, resp);
611 break; 611 break;
612 612
613 case cmd_ret_802_11_set_afc: 613 case CMD_RET_802_11_SET_AFC:
614 case cmd_ret_802_11_get_afc: 614 case CMD_RET_802_11_GET_AFC:
615 spin_lock_irqsave(&adapter->driver_lock, flags); 615 spin_lock_irqsave(&adapter->driver_lock, flags);
616 memmove(adapter->cur_cmd->pdata_buf, &resp->params.afc, 616 memmove(adapter->cur_cmd->pdata_buf, &resp->params.afc,
617 sizeof(struct cmd_ds_802_11_afc)); 617 sizeof(struct cmd_ds_802_11_afc));
618 spin_unlock_irqrestore(&adapter->driver_lock, flags); 618 spin_unlock_irqrestore(&adapter->driver_lock, flags);
619 619
620 break; 620 break;
621 case cmd_ret_802_11_rf_antenna: 621 case CMD_RET_802_11_RF_ANTENNA:
622 ret = wlan_ret_802_11_rf_antenna(priv, resp); 622 ret = wlan_ret_802_11_rf_antenna(priv, resp);
623 break; 623 break;
624 624
625 case cmd_ret_mac_multicast_adr: 625 case CMD_RET_MAC_MULTICAST_ADR:
626 case cmd_ret_mac_control: 626 case CMD_RET_MAC_CONTROL:
627 case cmd_ret_802_11_set_wep: 627 case CMD_RET_802_11_SET_WEP:
628 case cmd_ret_802_11_reset: 628 case CMD_RET_802_11_RESET:
629 case cmd_ret_802_11_authenticate: 629 case CMD_RET_802_11_AUTHENTICATE:
630 case cmd_ret_802_11_radio_control: 630 case CMD_RET_802_11_RADIO_CONTROL:
631 case cmd_ret_802_11_beacon_stop: 631 case CMD_RET_802_11_BEACON_STOP:
632 break; 632 break;
633 633
634 case cmd_ret_802_11_enable_rsn: 634 case CMD_RET_802_11_ENABLE_RSN:
635 ret = libertas_ret_802_11_enable_rsn(priv, resp); 635 ret = libertas_ret_802_11_enable_rsn(priv, resp);
636 break; 636 break;
637 637
638 case cmd_ret_802_11_data_rate: 638 case CMD_RET_802_11_DATA_RATE:
639 ret = wlan_ret_802_11_data_rate(priv, resp); 639 ret = wlan_ret_802_11_data_rate(priv, resp);
640 break; 640 break;
641 case cmd_ret_802_11_rate_adapt_rateset: 641 case CMD_RET_802_11_RATE_ADAPT_RATESET:
642 ret = wlan_ret_802_11_rate_adapt_rateset(priv, resp); 642 ret = wlan_ret_802_11_rate_adapt_rateset(priv, resp);
643 break; 643 break;
644 case cmd_ret_802_11_rf_channel: 644 case CMD_RET_802_11_RF_CHANNEL:
645 ret = wlan_ret_802_11_rf_channel(priv, resp); 645 ret = wlan_ret_802_11_rf_channel(priv, resp);
646 break; 646 break;
647 647
648 case cmd_ret_802_11_rssi: 648 case CMD_RET_802_11_RSSI:
649 ret = wlan_ret_802_11_rssi(priv, resp); 649 ret = wlan_ret_802_11_rssi(priv, resp);
650 break; 650 break;
651 651
652 case cmd_ret_802_11_mac_address: 652 case CMD_RET_802_11_MAC_ADDRESS:
653 ret = wlan_ret_802_11_mac_address(priv, resp); 653 ret = wlan_ret_802_11_mac_address(priv, resp);
654 break; 654 break;
655 655
656 case cmd_ret_802_11_ad_hoc_stop: 656 case CMD_RET_802_11_AD_HOC_STOP:
657 ret = libertas_ret_80211_ad_hoc_stop(priv, resp); 657 ret = libertas_ret_80211_ad_hoc_stop(priv, resp);
658 break; 658 break;
659 659
660 case cmd_ret_802_11_key_material: 660 case CMD_RET_802_11_KEY_MATERIAL:
661 lbs_deb_cmd("CMD_RESP: KEY_MATERIAL command response\n"); 661 lbs_deb_cmd("CMD_RESP: KEY_MATERIAL command response\n");
662 ret = wlan_ret_802_11_key_material(priv, resp); 662 ret = wlan_ret_802_11_key_material(priv, resp);
663 break; 663 break;
664 664
665 case cmd_ret_802_11_eeprom_access: 665 case CMD_RET_802_11_EEPROM_ACCESS:
666 ret = wlan_ret_802_11_eeprom_access(priv, resp); 666 ret = wlan_ret_802_11_eeprom_access(priv, resp);
667 break; 667 break;
668 668
669 case cmd_ret_802_11d_domain_info: 669 case CMD_RET_802_11D_DOMAIN_INFO:
670 ret = libertas_ret_802_11d_domain_info(priv, resp); 670 ret = libertas_ret_802_11d_domain_info(priv, resp);
671 break; 671 break;
672 672
673 case cmd_ret_802_11_sleep_params: 673 case CMD_RET_802_11_SLEEP_PARAMS:
674 ret = wlan_ret_802_11_sleep_params(priv, resp); 674 ret = wlan_ret_802_11_sleep_params(priv, resp);
675 break; 675 break;
676 case cmd_ret_802_11_inactivity_timeout: 676 case CMD_RET_802_11_INACTIVITY_TIMEOUT:
677 spin_lock_irqsave(&adapter->driver_lock, flags); 677 spin_lock_irqsave(&adapter->driver_lock, flags);
678 *((u16 *) adapter->cur_cmd->pdata_buf) = 678 *((u16 *) adapter->cur_cmd->pdata_buf) =
679 le16_to_cpu(resp->params.inactivity_timeout.timeout); 679 le16_to_cpu(resp->params.inactivity_timeout.timeout);
680 spin_unlock_irqrestore(&adapter->driver_lock, flags); 680 spin_unlock_irqrestore(&adapter->driver_lock, flags);
681 break; 681 break;
682 682
683 case cmd_ret_802_11_tpc_cfg: 683 case CMD_RET_802_11_TPC_CFG:
684 spin_lock_irqsave(&adapter->driver_lock, flags); 684 spin_lock_irqsave(&adapter->driver_lock, flags);
685 memmove(adapter->cur_cmd->pdata_buf, &resp->params.tpccfg, 685 memmove(adapter->cur_cmd->pdata_buf, &resp->params.tpccfg,
686 sizeof(struct cmd_ds_802_11_tpc_cfg)); 686 sizeof(struct cmd_ds_802_11_tpc_cfg));
687 spin_unlock_irqrestore(&adapter->driver_lock, flags); 687 spin_unlock_irqrestore(&adapter->driver_lock, flags);
688 break; 688 break;
689 case cmd_ret_802_11_led_gpio_ctrl: 689 case CMD_RET_802_11_LED_GPIO_CTRL:
690 spin_lock_irqsave(&adapter->driver_lock, flags); 690 spin_lock_irqsave(&adapter->driver_lock, flags);
691 memmove(adapter->cur_cmd->pdata_buf, &resp->params.ledgpio, 691 memmove(adapter->cur_cmd->pdata_buf, &resp->params.ledgpio,
692 sizeof(struct cmd_ds_802_11_led_ctrl)); 692 sizeof(struct cmd_ds_802_11_led_ctrl));
693 spin_unlock_irqrestore(&adapter->driver_lock, flags); 693 spin_unlock_irqrestore(&adapter->driver_lock, flags);
694 break; 694 break;
695 case cmd_ret_802_11_pwr_cfg: 695 case CMD_RET_802_11_PWR_CFG:
696 spin_lock_irqsave(&adapter->driver_lock, flags); 696 spin_lock_irqsave(&adapter->driver_lock, flags);
697 memmove(adapter->cur_cmd->pdata_buf, &resp->params.pwrcfg, 697 memmove(adapter->cur_cmd->pdata_buf, &resp->params.pwrcfg,
698 sizeof(struct cmd_ds_802_11_pwr_cfg)); 698 sizeof(struct cmd_ds_802_11_pwr_cfg));
@@ -700,32 +700,32 @@ static inline int handle_cmd_response(u16 respcmd,
700 700
701 break; 701 break;
702 702
703 case cmd_ret_get_tsf: 703 case CMD_RET_GET_TSF:
704 spin_lock_irqsave(&adapter->driver_lock, flags); 704 spin_lock_irqsave(&adapter->driver_lock, flags);
705 memcpy(priv->adapter->cur_cmd->pdata_buf, 705 memcpy(priv->adapter->cur_cmd->pdata_buf,
706 &resp->params.gettsf.tsfvalue, sizeof(u64)); 706 &resp->params.gettsf.tsfvalue, sizeof(u64));
707 spin_unlock_irqrestore(&adapter->driver_lock, flags); 707 spin_unlock_irqrestore(&adapter->driver_lock, flags);
708 break; 708 break;
709 case cmd_ret_bt_access: 709 case CMD_RET_BT_ACCESS:
710 spin_lock_irqsave(&adapter->driver_lock, flags); 710 spin_lock_irqsave(&adapter->driver_lock, flags);
711 if (adapter->cur_cmd->pdata_buf) 711 if (adapter->cur_cmd->pdata_buf)
712 memcpy(adapter->cur_cmd->pdata_buf, 712 memcpy(adapter->cur_cmd->pdata_buf,
713 &resp->params.bt.addr1, 2 * ETH_ALEN); 713 &resp->params.bt.addr1, 2 * ETH_ALEN);
714 spin_unlock_irqrestore(&adapter->driver_lock, flags); 714 spin_unlock_irqrestore(&adapter->driver_lock, flags);
715 break; 715 break;
716 case cmd_ret_fwt_access: 716 case CMD_RET_FWT_ACCESS:
717 spin_lock_irqsave(&adapter->driver_lock, flags); 717 spin_lock_irqsave(&adapter->driver_lock, flags);
718 if (adapter->cur_cmd->pdata_buf) 718 if (adapter->cur_cmd->pdata_buf)
719 memcpy(adapter->cur_cmd->pdata_buf, &resp->params.fwt, 719 memcpy(adapter->cur_cmd->pdata_buf, &resp->params.fwt,
720 sizeof(resp->params.fwt)); 720 sizeof(resp->params.fwt));
721 spin_unlock_irqrestore(&adapter->driver_lock, flags); 721 spin_unlock_irqrestore(&adapter->driver_lock, flags);
722 break; 722 break;
723 case cmd_ret_mesh_access: 723 case CMD_RET_MESH_ACCESS:
724 if (adapter->cur_cmd->pdata_buf) 724 if (adapter->cur_cmd->pdata_buf)
725 memcpy(adapter->cur_cmd->pdata_buf, &resp->params.mesh, 725 memcpy(adapter->cur_cmd->pdata_buf, &resp->params.mesh,
726 sizeof(resp->params.mesh)); 726 sizeof(resp->params.mesh));
727 break; 727 break;
728 case cmd_rte_802_11_tx_rate_query: 728 case CMD_RTE_802_11_TX_RATE_QUERY:
729 priv->adapter->txrate = resp->params.txrate.txrate; 729 priv->adapter->txrate = resp->params.txrate.txrate;
730 break; 730 break;
731 default: 731 default:
@@ -787,7 +787,7 @@ int libertas_process_rx_command(wlan_private * priv)
787 /* Store the response code to cur_cmd_retcode. */ 787 /* Store the response code to cur_cmd_retcode. */
788 adapter->cur_cmd_retcode = result;; 788 adapter->cur_cmd_retcode = result;;
789 789
790 if (respcmd == cmd_ret_802_11_ps_mode) { 790 if (respcmd == CMD_RET_802_11_PS_MODE) {
791 struct cmd_ds_802_11_ps_mode *psmode = &resp->params.psmode; 791 struct cmd_ds_802_11_ps_mode *psmode = &resp->params.psmode;
792 u16 action = le16_to_cpu(psmode->action); 792 u16 action = le16_to_cpu(psmode->action);
793 793
@@ -804,14 +804,14 @@ int libertas_process_rx_command(wlan_private * priv)
804 * libertas_execute_next_command(). 804 * libertas_execute_next_command().
805 */ 805 */
806 if (adapter->mode == IW_MODE_ADHOC && 806 if (adapter->mode == IW_MODE_ADHOC &&
807 action == cmd_subcmd_enter_ps) 807 action == CMD_SUBCMD_ENTER_PS)
808 adapter->psmode = wlan802_11powermodecam; 808 adapter->psmode = WLAN802_11POWERMODECAM;
809 } else if (action == cmd_subcmd_enter_ps) { 809 } else if (action == CMD_SUBCMD_ENTER_PS) {
810 adapter->needtowakeup = 0; 810 adapter->needtowakeup = 0;
811 adapter->psstate = PS_STATE_AWAKE; 811 adapter->psstate = PS_STATE_AWAKE;
812 812
813 lbs_deb_cmd("CMD_RESP: Enter_PS command response\n"); 813 lbs_deb_cmd("CMD_RESP: Enter_PS command response\n");
814 if (adapter->connect_status != libertas_connected) { 814 if (adapter->connect_status != LIBERTAS_CONNECTED) {
815 /* 815 /*
816 * When Deauth Event received before Enter_PS command 816 * When Deauth Event received before Enter_PS command
817 * response, We need to wake up the firmware. 817 * response, We need to wake up the firmware.
@@ -825,7 +825,7 @@ int libertas_process_rx_command(wlan_private * priv)
825 mutex_lock(&adapter->lock); 825 mutex_lock(&adapter->lock);
826 spin_lock_irqsave(&adapter->driver_lock, flags); 826 spin_lock_irqsave(&adapter->driver_lock, flags);
827 } 827 }
828 } else if (action == cmd_subcmd_exit_ps) { 828 } else if (action == CMD_SUBCMD_EXIT_PS) {
829 adapter->needtowakeup = 0; 829 adapter->needtowakeup = 0;
830 adapter->psstate = PS_STATE_FULL_POWER; 830 adapter->psstate = PS_STATE_FULL_POWER;
831 lbs_deb_cmd("CMD_RESP: Exit_PS command response\n"); 831 lbs_deb_cmd("CMD_RESP: Exit_PS command response\n");
@@ -857,8 +857,8 @@ int libertas_process_rx_command(wlan_private * priv)
857 * Handling errors here 857 * Handling errors here
858 */ 858 */
859 switch (respcmd) { 859 switch (respcmd) {
860 case cmd_ret_hw_spec_info: 860 case CMD_RET_HW_SPEC_INFO:
861 case cmd_ret_802_11_reset: 861 case CMD_RET_802_11_RESET:
862 lbs_deb_cmd("CMD_RESP: Reset command failed\n"); 862 lbs_deb_cmd("CMD_RESP: Reset command failed\n");
863 break; 863 break;
864 864
@@ -1003,7 +1003,7 @@ int libertas_process_event(wlan_private * priv)
1003 1003
1004 case MACREG_INT_CODE_MESH_AUTO_STARTED: 1004 case MACREG_INT_CODE_MESH_AUTO_STARTED:
1005 lbs_pr_alert( "EVENT: MESH_AUTO_STARTED\n"); 1005 lbs_pr_alert( "EVENT: MESH_AUTO_STARTED\n");
1006 adapter->connect_status = libertas_connected ; 1006 adapter->connect_status = LIBERTAS_CONNECTED ;
1007 if (priv->mesh_open == 1) { 1007 if (priv->mesh_open == 1) {
1008 netif_wake_queue(priv->mesh_dev) ; 1008 netif_wake_queue(priv->mesh_dev) ;
1009 netif_carrier_on(priv->mesh_dev) ; 1009 netif_carrier_on(priv->mesh_dev) ;