aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2011-08-30 09:26:35 -0400
committerStanislaw Gruszka <sgruszka@redhat.com>2011-11-15 07:12:21 -0500
commit4d69c7521a90cba945b4720672b4511b1e541189 (patch)
tree4ea1c32726e8d97e30d40ab5aa474f18e1e63082
parentdb7746f78cab25ee39dd20f61d9b2e6b5993d8fa (diff)
iwlegacy: rename REPLY_ to N_ or C_
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
-rw-r--r--drivers/net/wireless/iwlegacy/3945-mac.c62
-rw-r--r--drivers/net/wireless/iwlegacy/3945.c24
-rw-r--r--drivers/net/wireless/iwlegacy/4965-calib.c12
-rw-r--r--drivers/net/wireless/iwlegacy/4965-mac.c96
-rw-r--r--drivers/net/wireless/iwlegacy/4965-rs.c4
-rw-r--r--drivers/net/wireless/iwlegacy/4965.c24
-rw-r--r--drivers/net/wireless/iwlegacy/4965.h4
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-commands.h260
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-core.c6
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-debugfs.c2
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-dev.h8
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-hcmd.c86
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-power.c2
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-prph.h2
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-scan.c18
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-sta.c20
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-tx.c4
17 files changed, 317 insertions, 317 deletions
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index 2ff807515212..65cab84661ef 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -348,7 +348,7 @@ static int il3945_send_beacon_cmd(struct il_priv *il)
348 348
349 frame_size = il3945_hw_get_beacon_cmd(il, frame, rate); 349 frame_size = il3945_hw_get_beacon_cmd(il, frame, rate);
350 350
351 rc = il_send_cmd_pdu(il, REPLY_TX_BEACON, frame_size, 351 rc = il_send_cmd_pdu(il, C_TX_BEACON, frame_size,
352 &frame->u.cmd[0]); 352 &frame->u.cmd[0]);
353 353
354 il3945_free_frame(il, frame); 354 il3945_free_frame(il, frame);
@@ -406,7 +406,7 @@ static void il3945_build_tx_cmd_hwcrypto(struct il_priv *il,
406} 406}
407 407
408/* 408/*
409 * handle build REPLY_TX command notification. 409 * handle build C_TX command notification.
410 */ 410 */
411static void il3945_build_tx_cmd_basic(struct il_priv *il, 411static void il3945_build_tx_cmd_basic(struct il_priv *il,
412 struct il_device_cmd *cmd, 412 struct il_device_cmd *cmd,
@@ -460,7 +460,7 @@ static void il3945_build_tx_cmd_basic(struct il_priv *il,
460} 460}
461 461
462/* 462/*
463 * start REPLY_TX command process 463 * start C_TX command process
464 */ 464 */
465static int il3945_tx_skb(struct il_priv *il, struct sk_buff *skb) 465static int il3945_tx_skb(struct il_priv *il, struct sk_buff *skb)
466{ 466{
@@ -560,7 +560,7 @@ static int il3945_tx_skb(struct il_priv *il, struct sk_buff *skb)
560 * after Tx, uCode's Tx response will return this value so driver can 560 * after Tx, uCode's Tx response will return this value so driver can
561 * locate the frame within the tx queue and do post-tx processing. 561 * locate the frame within the tx queue and do post-tx processing.
562 */ 562 */
563 out_cmd->hdr.cmd = REPLY_TX; 563 out_cmd->hdr.cmd = C_TX;
564 out_cmd->hdr.sequence = cpu_to_le16((u16)(QUEUE_TO_SEQ(txq_id) | 564 out_cmd->hdr.sequence = cpu_to_le16((u16)(QUEUE_TO_SEQ(txq_id) |
565 IDX_TO_SEQ(q->write_ptr))); 565 IDX_TO_SEQ(q->write_ptr)));
566 566
@@ -672,7 +672,7 @@ static int il3945_get_measurement(struct il_priv *il,
672 struct il_spectrum_cmd spectrum; 672 struct il_spectrum_cmd spectrum;
673 struct il_rx_pkt *pkt; 673 struct il_rx_pkt *pkt;
674 struct il_host_cmd cmd = { 674 struct il_host_cmd cmd = {
675 .id = REPLY_SPECTRUM_MEASUREMENT_CMD, 675 .id = C_SPECTRUM_MEASUREMENT,
676 .data = (void *)&spectrum, 676 .data = (void *)&spectrum,
677 .flags = CMD_WANT_SKB, 677 .flags = CMD_WANT_SKB,
678 }; 678 };
@@ -717,7 +717,7 @@ static int il3945_get_measurement(struct il_priv *il,
717 717
718 pkt = (struct il_rx_pkt *)cmd.reply_page; 718 pkt = (struct il_rx_pkt *)cmd.reply_page;
719 if (pkt->hdr.flags & IL_CMD_FAILED_MSK) { 719 if (pkt->hdr.flags & IL_CMD_FAILED_MSK) {
720 IL_ERR("Bad return from REPLY_RX_ON_ASSOC command\n"); 720 IL_ERR("Bad return from N_RX_ON_ASSOC command\n");
721 rc = -EIO; 721 rc = -EIO;
722 } 722 }
723 723
@@ -786,7 +786,7 @@ static void il3945_rx_reply_add_sta(struct il_priv *il,
786 struct il_rx_pkt *pkt = rxb_addr(rxb); 786 struct il_rx_pkt *pkt = rxb_addr(rxb);
787#endif 787#endif
788 788
789 D_RX("Received REPLY_ADD_STA: 0x%02X\n", pkt->u.status); 789 D_RX("Received C_ADD_STA: 0x%02X\n", pkt->u.status);
790} 790}
791 791
792static void il3945_rx_beacon_notif(struct il_priv *il, 792static void il3945_rx_beacon_notif(struct il_priv *il,
@@ -853,27 +853,27 @@ static void il3945_rx_card_state_notif(struct il_priv *il,
853 */ 853 */
854static void il3945_setup_rx_handlers(struct il_priv *il) 854static void il3945_setup_rx_handlers(struct il_priv *il)
855{ 855{
856 il->rx_handlers[REPLY_ALIVE] = il3945_rx_reply_alive; 856 il->rx_handlers[N_ALIVE] = il3945_rx_reply_alive;
857 il->rx_handlers[REPLY_ADD_STA] = il3945_rx_reply_add_sta; 857 il->rx_handlers[C_ADD_STA] = il3945_rx_reply_add_sta;
858 il->rx_handlers[REPLY_ERROR] = il_rx_reply_error; 858 il->rx_handlers[N_ERROR] = il_rx_reply_error;
859 il->rx_handlers[CHANNEL_SWITCH_NOTIFICATION] = il_rx_csa; 859 il->rx_handlers[N_CHANNEL_SWITCH] = il_rx_csa;
860 il->rx_handlers[SPECTRUM_MEASURE_NOTIFICATION] = 860 il->rx_handlers[N_SPECTRUM_MEASUREMENT] =
861 il_rx_spectrum_measure_notif; 861 il_rx_spectrum_measure_notif;
862 il->rx_handlers[PM_SLEEP_NOTIFICATION] = il_rx_pm_sleep_notif; 862 il->rx_handlers[N_PM_SLEEP] = il_rx_pm_sleep_notif;
863 il->rx_handlers[PM_DEBUG_STATISTIC_NOTIFIC] = 863 il->rx_handlers[N_PM_DEBUG_STATS] =
864 il_rx_pm_debug_stats_notif; 864 il_rx_pm_debug_stats_notif;
865 il->rx_handlers[BEACON_NOTIFICATION] = il3945_rx_beacon_notif; 865 il->rx_handlers[N_BEACON] = il3945_rx_beacon_notif;
866 866
867 /* 867 /*
868 * The same handler is used for both the REPLY to a discrete 868 * The same handler is used for both the REPLY to a discrete
869 * stats request from the host as well as for the periodic 869 * stats request from the host as well as for the periodic
870 * stats notifications (after received beacons) from the uCode. 870 * stats notifications (after received beacons) from the uCode.
871 */ 871 */
872 il->rx_handlers[REPLY_STATS_CMD] = il3945_reply_stats; 872 il->rx_handlers[C_STATS] = il3945_reply_stats;
873 il->rx_handlers[STATS_NOTIFICATION] = il3945_hw_rx_stats; 873 il->rx_handlers[N_STATS] = il3945_hw_rx_stats;
874 874
875 il_setup_rx_scan_handlers(il); 875 il_setup_rx_scan_handlers(il);
876 il->rx_handlers[CARD_STATE_NOTIFICATION] = il3945_rx_card_state_notif; 876 il->rx_handlers[N_CARD_STATE] = il3945_rx_card_state_notif;
877 877
878 /* Set up hardware specific Rx handlers */ 878 /* Set up hardware specific Rx handlers */
879 il3945_hw_rx_handler_setup(il); 879 il3945_hw_rx_handler_setup(il);
@@ -1253,8 +1253,8 @@ static void il3945_rx_handle(struct il_priv *il)
1253 * Ucode should set SEQ_RX_FRAME bit if ucode-originated, 1253 * Ucode should set SEQ_RX_FRAME bit if ucode-originated,
1254 * but apparently a few don't get set; catch them here. */ 1254 * but apparently a few don't get set; catch them here. */
1255 reclaim = !(pkt->hdr.sequence & SEQ_RX_FRAME) && 1255 reclaim = !(pkt->hdr.sequence & SEQ_RX_FRAME) &&
1256 pkt->hdr.cmd != STATS_NOTIFICATION && 1256 pkt->hdr.cmd != N_STATS &&
1257 pkt->hdr.cmd != REPLY_TX; 1257 pkt->hdr.cmd != C_TX;
1258 1258
1259 /* Based on type of command response or notification, 1259 /* Based on type of command response or notification,
1260 * handle those that need handling via function in 1260 * handle those that need handling via function in
@@ -2137,9 +2137,9 @@ static int il3945_set_ucode_ptrs(struct il_priv *il)
2137} 2137}
2138 2138
2139/** 2139/**
2140 * il3945_init_alive_start - Called after REPLY_ALIVE notification received 2140 * il3945_init_alive_start - Called after N_ALIVE notification received
2141 * 2141 *
2142 * Called after REPLY_ALIVE notification received from "initialize" uCode. 2142 * Called after N_ALIVE notification received from "initialize" uCode.
2143 * 2143 *
2144 * Tell "initialize" uCode to go ahead and load the runtime uCode. 2144 * Tell "initialize" uCode to go ahead and load the runtime uCode.
2145 */ 2145 */
@@ -2180,7 +2180,7 @@ static void il3945_init_alive_start(struct il_priv *il)
2180} 2180}
2181 2181
2182/** 2182/**
2183 * il3945_alive_start - called after REPLY_ALIVE notification received 2183 * il3945_alive_start - called after N_ALIVE notification received
2184 * from protocol/runtime uCode (initialization uCode's 2184 * from protocol/runtime uCode (initialization uCode's
2185 * Alive gets handled by il3945_init_alive_start()). 2185 * Alive gets handled by il3945_init_alive_start()).
2186 */ 2186 */
@@ -2553,7 +2553,7 @@ static void il3945_rfkill_poll(struct work_struct *data)
2553int il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif) 2553int il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
2554{ 2554{
2555 struct il_host_cmd cmd = { 2555 struct il_host_cmd cmd = {
2556 .id = REPLY_SCAN_CMD, 2556 .id = C_SCAN,
2557 .len = sizeof(struct il3945_scan_cmd), 2557 .len = sizeof(struct il3945_scan_cmd),
2558 .flags = CMD_SIZE_HUGE, 2558 .flags = CMD_SIZE_HUGE,
2559 }; 2559 };
@@ -2767,7 +2767,7 @@ void il3945_post_associate(struct il_priv *il)
2767 2767
2768 rc = il_send_rxon_timing(il, ctx); 2768 rc = il_send_rxon_timing(il, ctx);
2769 if (rc) 2769 if (rc)
2770 IL_WARN("REPLY_RXON_TIMING failed - " 2770 IL_WARN("C_RXON_TIMING failed - "
2771 "Attempting to continue.\n"); 2771 "Attempting to continue.\n");
2772 2772
2773 ctx->staging.filter_flags |= RXON_FILTER_ASSOC_MSK; 2773 ctx->staging.filter_flags |= RXON_FILTER_ASSOC_MSK;
@@ -2931,7 +2931,7 @@ void il3945_config_ap(struct il_priv *il)
2931 /* RXON Timing */ 2931 /* RXON Timing */
2932 rc = il_send_rxon_timing(il, ctx); 2932 rc = il_send_rxon_timing(il, ctx);
2933 if (rc) 2933 if (rc)
2934 IL_WARN("REPLY_RXON_TIMING failed - " 2934 IL_WARN("C_RXON_TIMING failed - "
2935 "Attempting to continue.\n"); 2935 "Attempting to continue.\n");
2936 2936
2937 ctx->staging.assoc_id = 0; 2937 ctx->staging.assoc_id = 0;
@@ -3657,12 +3657,12 @@ static int il3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *en
3657 3657
3658 il->ctx.ctxid = 0; 3658 il->ctx.ctxid = 0;
3659 3659
3660 il->ctx.rxon_cmd = REPLY_RXON; 3660 il->ctx.rxon_cmd = C_RXON;
3661 il->ctx.rxon_timing_cmd = REPLY_RXON_TIMING; 3661 il->ctx.rxon_timing_cmd = C_RXON_TIMING;
3662 il->ctx.rxon_assoc_cmd = REPLY_RXON_ASSOC; 3662 il->ctx.rxon_assoc_cmd = C_RXON_ASSOC;
3663 il->ctx.qos_cmd = REPLY_QOS_PARAM; 3663 il->ctx.qos_cmd = C_QOS_PARAM;
3664 il->ctx.ap_sta_id = IL_AP_ID; 3664 il->ctx.ap_sta_id = IL_AP_ID;
3665 il->ctx.wep_key_cmd = REPLY_WEPKEY; 3665 il->ctx.wep_key_cmd = C_WEPKEY;
3666 il->ctx.interface_modes = 3666 il->ctx.interface_modes =
3667 BIT(NL80211_IFTYPE_STATION) | 3667 BIT(NL80211_IFTYPE_STATION) |
3668 BIT(NL80211_IFTYPE_ADHOC); 3668 BIT(NL80211_IFTYPE_ADHOC);
diff --git a/drivers/net/wireless/iwlegacy/3945.c b/drivers/net/wireless/iwlegacy/3945.c
index 82534a20ee8e..ba250f7e8fb3 100644
--- a/drivers/net/wireless/iwlegacy/3945.c
+++ b/drivers/net/wireless/iwlegacy/3945.c
@@ -53,7 +53,7 @@ static int il3945_send_led_cmd(struct il_priv *il,
53 struct il_led_cmd *led_cmd) 53 struct il_led_cmd *led_cmd)
54{ 54{
55 struct il_host_cmd cmd = { 55 struct il_host_cmd cmd = {
56 .id = REPLY_LEDS_CMD, 56 .id = C_LEDS,
57 .len = sizeof(struct il_led_cmd), 57 .len = sizeof(struct il_led_cmd),
58 .data = led_cmd, 58 .data = led_cmd,
59 .flags = CMD_ASYNC, 59 .flags = CMD_ASYNC,
@@ -1444,7 +1444,7 @@ static int il3945_send_tx_power(struct il_priv *il)
1444 txpower.power[i].rate); 1444 txpower.power[i].rate);
1445 } 1445 }
1446 1446
1447 return il_send_cmd_pdu(il, REPLY_TX_PWR_TBL_CMD, 1447 return il_send_cmd_pdu(il, C_TX_PWR_TBL,
1448 sizeof(struct il3945_txpowertable_cmd), 1448 sizeof(struct il3945_txpowertable_cmd),
1449 &txpower); 1449 &txpower);
1450 1450
@@ -1673,7 +1673,7 @@ static int il3945_send_rxon_assoc(struct il_priv *il,
1673 struct il_rx_pkt *pkt; 1673 struct il_rx_pkt *pkt;
1674 struct il3945_rxon_assoc_cmd rxon_assoc; 1674 struct il3945_rxon_assoc_cmd rxon_assoc;
1675 struct il_host_cmd cmd = { 1675 struct il_host_cmd cmd = {
1676 .id = REPLY_RXON_ASSOC, 1676 .id = C_RXON_ASSOC,
1677 .len = sizeof(rxon_assoc), 1677 .len = sizeof(rxon_assoc),
1678 .flags = CMD_WANT_SKB, 1678 .flags = CMD_WANT_SKB,
1679 .data = &rxon_assoc, 1679 .data = &rxon_assoc,
@@ -1701,7 +1701,7 @@ static int il3945_send_rxon_assoc(struct il_priv *il,
1701 1701
1702 pkt = (struct il_rx_pkt *)cmd.reply_page; 1702 pkt = (struct il_rx_pkt *)cmd.reply_page;
1703 if (pkt->hdr.flags & IL_CMD_FAILED_MSK) { 1703 if (pkt->hdr.flags & IL_CMD_FAILED_MSK) {
1704 IL_ERR("Bad return from REPLY_RXON_ASSOC command\n"); 1704 IL_ERR("Bad return from C_RXON_ASSOC command\n");
1705 rc = -EIO; 1705 rc = -EIO;
1706 } 1706 }
1707 1707
@@ -1782,7 +1782,7 @@ int il3945_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx)
1782 */ 1782 */
1783 active_rxon->reserved4 = 0; 1783 active_rxon->reserved4 = 0;
1784 active_rxon->reserved5 = 0; 1784 active_rxon->reserved5 = 0;
1785 rc = il_send_cmd_pdu(il, REPLY_RXON, 1785 rc = il_send_cmd_pdu(il, C_RXON,
1786 sizeof(struct il3945_rxon_cmd), 1786 sizeof(struct il3945_rxon_cmd),
1787 &il->ctx.active); 1787 &il->ctx.active);
1788 1788
@@ -1818,7 +1818,7 @@ int il3945_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx)
1818 il_set_rxon_hwcrypto(il, ctx, !il3945_mod_params.sw_crypto); 1818 il_set_rxon_hwcrypto(il, ctx, !il3945_mod_params.sw_crypto);
1819 1819
1820 /* Apply the new configuration */ 1820 /* Apply the new configuration */
1821 rc = il_send_cmd_pdu(il, REPLY_RXON, 1821 rc = il_send_cmd_pdu(il, C_RXON,
1822 sizeof(struct il3945_rxon_cmd), 1822 sizeof(struct il3945_rxon_cmd),
1823 staging_rxon); 1823 staging_rxon);
1824 if (rc) { 1824 if (rc) {
@@ -2237,9 +2237,9 @@ int il3945_hw_tx_queue_init(struct il_priv *il, struct il_tx_queue *txq)
2237static u16 il3945_get_hcmd_size(u8 cmd_id, u16 len) 2237static u16 il3945_get_hcmd_size(u8 cmd_id, u16 len)
2238{ 2238{
2239 switch (cmd_id) { 2239 switch (cmd_id) {
2240 case REPLY_RXON: 2240 case C_RXON:
2241 return sizeof(struct il3945_rxon_cmd); 2241 return sizeof(struct il3945_rxon_cmd);
2242 case POWER_TBL_CMD: 2242 case C_POWER_TBL:
2243 return sizeof(struct il3945_powertable_cmd); 2243 return sizeof(struct il3945_powertable_cmd);
2244 default: 2244 default:
2245 return len; 2245 return len;
@@ -2383,14 +2383,14 @@ int il3945_init_hw_rate_table(struct il_priv *il)
2383 2383
2384 /* Update the rate scaling for control frame Tx */ 2384 /* Update the rate scaling for control frame Tx */
2385 rate_cmd.table_id = 0; 2385 rate_cmd.table_id = 0;
2386 rc = il_send_cmd_pdu(il, REPLY_RATE_SCALE, sizeof(rate_cmd), 2386 rc = il_send_cmd_pdu(il, C_RATE_SCALE, sizeof(rate_cmd),
2387 &rate_cmd); 2387 &rate_cmd);
2388 if (rc) 2388 if (rc)
2389 return rc; 2389 return rc;
2390 2390
2391 /* Update the rate scaling for data frame Tx */ 2391 /* Update the rate scaling for data frame Tx */
2392 rate_cmd.table_id = 1; 2392 rate_cmd.table_id = 1;
2393 return il_send_cmd_pdu(il, REPLY_RATE_SCALE, sizeof(rate_cmd), 2393 return il_send_cmd_pdu(il, C_RATE_SCALE, sizeof(rate_cmd),
2394 &rate_cmd); 2394 &rate_cmd);
2395} 2395}
2396 2396
@@ -2464,8 +2464,8 @@ unsigned int il3945_hw_get_beacon_cmd(struct il_priv *il,
2464 2464
2465void il3945_hw_rx_handler_setup(struct il_priv *il) 2465void il3945_hw_rx_handler_setup(struct il_priv *il)
2466{ 2466{
2467 il->rx_handlers[REPLY_TX] = il3945_rx_reply_tx; 2467 il->rx_handlers[C_TX] = il3945_rx_reply_tx;
2468 il->rx_handlers[REPLY_3945_RX] = il3945_rx_reply_rx; 2468 il->rx_handlers[N_3945_RX] = il3945_rx_reply_rx;
2469} 2469}
2470 2470
2471void il3945_hw_setup_deferred_work(struct il_priv *il) 2471void il3945_hw_setup_deferred_work(struct il_priv *il)
diff --git a/drivers/net/wireless/iwlegacy/4965-calib.c b/drivers/net/wireless/iwlegacy/4965-calib.c
index cd61050160ac..c5dcc528e5ff 100644
--- a/drivers/net/wireless/iwlegacy/4965-calib.c
+++ b/drivers/net/wireless/iwlegacy/4965-calib.c
@@ -410,13 +410,13 @@ static void il4965_prepare_legacy_sensitivity_tbl(struct il_priv *il,
410 data->nrg_th_cck); 410 data->nrg_th_cck);
411} 411}
412 412
413/* Prepare a SENSITIVITY_CMD, send to uCode if values have changed */ 413/* Prepare a C_SENSITIVITY, send to uCode if values have changed */
414static int il4965_sensitivity_write(struct il_priv *il) 414static int il4965_sensitivity_write(struct il_priv *il)
415{ 415{
416 struct il_sensitivity_cmd cmd; 416 struct il_sensitivity_cmd cmd;
417 struct il_sensitivity_data *data = NULL; 417 struct il_sensitivity_data *data = NULL;
418 struct il_host_cmd cmd_out = { 418 struct il_host_cmd cmd_out = {
419 .id = SENSITIVITY_CMD, 419 .id = C_SENSITIVITY,
420 .len = sizeof(struct il_sensitivity_cmd), 420 .len = sizeof(struct il_sensitivity_cmd),
421 .flags = CMD_ASYNC, 421 .flags = CMD_ASYNC,
422 .data = &cmd, 422 .data = &cmd,
@@ -429,12 +429,12 @@ static int il4965_sensitivity_write(struct il_priv *il)
429 il4965_prepare_legacy_sensitivity_tbl(il, data, &cmd.table[0]); 429 il4965_prepare_legacy_sensitivity_tbl(il, data, &cmd.table[0]);
430 430
431 /* Update uCode's "work" table, and copy it to DSP */ 431 /* Update uCode's "work" table, and copy it to DSP */
432 cmd.control = SENSITIVITY_CMD_CONTROL_WORK_TBL; 432 cmd.control = C_SENSITIVITY_CONTROL_WORK_TBL;
433 433
434 /* Don't send command to uCode if nothing has changed */ 434 /* Don't send command to uCode if nothing has changed */
435 if (!memcmp(&cmd.table[0], &(il->sensitivity_tbl[0]), 435 if (!memcmp(&cmd.table[0], &(il->sensitivity_tbl[0]),
436 sizeof(u16)*HD_TBL_SIZE)) { 436 sizeof(u16)*HD_TBL_SIZE)) {
437 D_CALIB("No change in SENSITIVITY_CMD\n"); 437 D_CALIB("No change in C_SENSITIVITY\n");
438 return 0; 438 return 0;
439 } 439 }
440 440
@@ -776,11 +776,11 @@ static void il4965_gain_computation(struct il_priv *il,
776 cmd.diff_gain_a = data->delta_gain_code[0]; 776 cmd.diff_gain_a = data->delta_gain_code[0];
777 cmd.diff_gain_b = data->delta_gain_code[1]; 777 cmd.diff_gain_b = data->delta_gain_code[1];
778 cmd.diff_gain_c = data->delta_gain_code[2]; 778 cmd.diff_gain_c = data->delta_gain_code[2];
779 ret = il_send_cmd_pdu(il, REPLY_PHY_CALIBRATION_CMD, 779 ret = il_send_cmd_pdu(il, C_PHY_CALIBRATION,
780 sizeof(cmd), &cmd); 780 sizeof(cmd), &cmd);
781 if (ret) 781 if (ret)
782 D_CALIB("fail sending cmd " 782 D_CALIB("fail sending cmd "
783 "REPLY_PHY_CALIBRATION_CMD\n"); 783 "C_PHY_CALIBRATION\n");
784 784
785 /* TODO we might want recalculate 785 /* TODO we might want recalculate
786 * rx_chain in rxon cmd */ 786 * rx_chain in rxon cmd */
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index c3f8137642c3..098d86397d91 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -608,8 +608,8 @@ static void il4965_pass_packet_to_mac80211(struct il_priv *il,
608 rxb->page = NULL; 608 rxb->page = NULL;
609} 609}
610 610
611/* Called for REPLY_RX (legacy ABG frames), or 611/* Called for N_RX (legacy ABG frames), or
612 * REPLY_RX_MPDU_CMD (HT high-throughput N frames). */ 612 * N_RX_MPDU (HT high-throughput N frames). */
613void il4965_rx_reply_rx(struct il_priv *il, 613void il4965_rx_reply_rx(struct il_priv *il,
614 struct il_rx_buf *rxb) 614 struct il_rx_buf *rxb)
615{ 615{
@@ -624,15 +624,15 @@ void il4965_rx_reply_rx(struct il_priv *il,
624 u32 rate_n_flags; 624 u32 rate_n_flags;
625 625
626 /** 626 /**
627 * REPLY_RX and REPLY_RX_MPDU_CMD are handled differently. 627 * N_RX and N_RX_MPDU are handled differently.
628 * REPLY_RX: physical layer info is in this buffer 628 * N_RX: physical layer info is in this buffer
629 * REPLY_RX_MPDU_CMD: physical layer info was sent in separate 629 * N_RX_MPDU: physical layer info was sent in separate
630 * command and cached in il->last_phy_res 630 * command and cached in il->last_phy_res
631 * 631 *
632 * Here we set up local variables depending on which command is 632 * Here we set up local variables depending on which command is
633 * received. 633 * received.
634 */ 634 */
635 if (pkt->hdr.cmd == REPLY_RX) { 635 if (pkt->hdr.cmd == N_RX) {
636 phy_res = (struct il_rx_phy_res *)pkt->u.raw; 636 phy_res = (struct il_rx_phy_res *)pkt->u.raw;
637 header = (struct ieee80211_hdr *)(pkt->u.raw + sizeof(*phy_res) 637 header = (struct ieee80211_hdr *)(pkt->u.raw + sizeof(*phy_res)
638 + phy_res->cfg_phy_cnt); 638 + phy_res->cfg_phy_cnt);
@@ -728,8 +728,8 @@ void il4965_rx_reply_rx(struct il_priv *il,
728 rxb, &rx_status); 728 rxb, &rx_status);
729} 729}
730 730
731/* Cache phy data (Rx signal strength, etc) for HT frame (REPLY_RX_PHY_CMD). 731/* Cache phy data (Rx signal strength, etc) for HT frame (N_RX_PHY).
732 * This will be used later in il_rx_reply_rx() for REPLY_RX_MPDU_CMD. */ 732 * This will be used later in il_rx_reply_rx() for N_RX_MPDU. */
733void il4965_rx_reply_rx_phy(struct il_priv *il, 733void il4965_rx_reply_rx_phy(struct il_priv *il,
734 struct il_rx_buf *rxb) 734 struct il_rx_buf *rxb)
735{ 735{
@@ -827,7 +827,7 @@ static inline u32 il4965_ant_idx_to_flags(u8 ant_idx)
827int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif) 827int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
828{ 828{
829 struct il_host_cmd cmd = { 829 struct il_host_cmd cmd = {
830 .id = REPLY_SCAN_CMD, 830 .id = C_SCAN,
831 .len = sizeof(struct il_scan_cmd), 831 .len = sizeof(struct il_scan_cmd),
832 .flags = CMD_SIZE_HUGE, 832 .flags = CMD_SIZE_HUGE,
833 }; 833 };
@@ -1388,7 +1388,7 @@ void il4965_rx_stats(struct il_priv *il,
1388 msecs_to_jiffies(REG_RECALIB_PERIOD * 1000)); 1388 msecs_to_jiffies(REG_RECALIB_PERIOD * 1000));
1389 1389
1390 if (unlikely(!test_bit(S_SCANNING, &il->status)) && 1390 if (unlikely(!test_bit(S_SCANNING, &il->status)) &&
1391 (pkt->hdr.cmd == STATS_NOTIFICATION)) { 1391 (pkt->hdr.cmd == N_STATS)) {
1392 il4965_rx_calc_noise(il); 1392 il4965_rx_calc_noise(il);
1393 queue_work(il->workqueue, &il->run_time_calib_work); 1393 queue_work(il->workqueue, &il->run_time_calib_work);
1394 } 1394 }
@@ -1473,7 +1473,7 @@ il4965_get_fifo_from_tid(struct il_rxon_context *ctx, u16 tid)
1473} 1473}
1474 1474
1475/* 1475/*
1476 * handle build REPLY_TX command notification. 1476 * handle build C_TX command notification.
1477 */ 1477 */
1478static void il4965_tx_cmd_build_basic(struct il_priv *il, 1478static void il4965_tx_cmd_build_basic(struct il_priv *il,
1479 struct sk_buff *skb, 1479 struct sk_buff *skb,
@@ -1640,7 +1640,7 @@ static void il4965_tx_cmd_build_hwcrypto(struct il_priv *il,
1640} 1640}
1641 1641
1642/* 1642/*
1643 * start REPLY_TX command process 1643 * start C_TX command process
1644 */ 1644 */
1645int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb) 1645int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
1646{ 1646{
@@ -1797,7 +1797,7 @@ int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
1797 * after Tx, uCode's Tx response will return this value so driver can 1797 * after Tx, uCode's Tx response will return this value so driver can
1798 * locate the frame within the tx queue and do post-tx processing. 1798 * locate the frame within the tx queue and do post-tx processing.
1799 */ 1799 */
1800 out_cmd->hdr.cmd = REPLY_TX; 1800 out_cmd->hdr.cmd = C_TX;
1801 out_cmd->hdr.sequence = cpu_to_le16((u16)(QUEUE_TO_SEQ(txq_id) | 1801 out_cmd->hdr.sequence = cpu_to_le16((u16)(QUEUE_TO_SEQ(txq_id) |
1802 IDX_TO_SEQ(q->write_ptr))); 1802 IDX_TO_SEQ(q->write_ptr)));
1803 1803
@@ -2616,7 +2616,7 @@ void il4965_hwrate_to_tx_control(struct il_priv *il, u32 rate_n_flags,
2616} 2616}
2617 2617
2618/** 2618/**
2619 * il4965_rx_reply_compressed_ba - Handler for REPLY_COMPRESSED_BA 2619 * il4965_rx_reply_compressed_ba - Handler for N_COMPRESSED_BA
2620 * 2620 *
2621 * Handles block-acknowledge notification from device, which reports success 2621 * Handles block-acknowledge notification from device, which reports success
2622 * of frames sent via aggregation. 2622 * of frames sent via aggregation.
@@ -2668,7 +2668,7 @@ void il4965_rx_reply_compressed_ba(struct il_priv *il,
2668 2668
2669 spin_lock_irqsave(&il->sta_lock, flags); 2669 spin_lock_irqsave(&il->sta_lock, flags);
2670 2670
2671 D_TX_REPLY("REPLY_COMPRESSED_BA [%d] Received from %pM, " 2671 D_TX_REPLY("N_COMPRESSED_BA [%d] Received from %pM, "
2672 "sta_id = %d\n", 2672 "sta_id = %d\n",
2673 agg->wait_for_ba, 2673 agg->wait_for_ba,
2674 (u8 *) &ba_resp->sta_addr_lo32, 2674 (u8 *) &ba_resp->sta_addr_lo32,
@@ -2917,7 +2917,7 @@ int il4965_remove_default_wep_key(struct il_priv *il,
2917 memset(&ctx->wep_keys[keyconf->keyidx], 0, sizeof(ctx->wep_keys[0])); 2917 memset(&ctx->wep_keys[keyconf->keyidx], 0, sizeof(ctx->wep_keys[0]));
2918 if (il_is_rfkill(il)) { 2918 if (il_is_rfkill(il)) {
2919 D_WEP( 2919 D_WEP(
2920 "Not sending REPLY_WEPKEY command due to RFKILL.\n"); 2920 "Not sending C_WEPKEY command due to RFKILL.\n");
2921 /* but keys in device are clear anyway so return success */ 2921 /* but keys in device are clear anyway so return success */
2922 return 0; 2922 return 0;
2923 } 2923 }
@@ -3201,7 +3201,7 @@ int il4965_remove_dynamic_key(struct il_priv *il,
3201 3201
3202 if (il_is_rfkill(il)) { 3202 if (il_is_rfkill(il)) {
3203 D_WEP( 3203 D_WEP(
3204 "Not sending REPLY_ADD_STA command because RFKILL enabled.\n"); 3204 "Not sending C_ADD_STA command because RFKILL enabled.\n");
3205 spin_unlock_irqrestore(&il->sta_lock, flags); 3205 spin_unlock_irqrestore(&il->sta_lock, flags);
3206 return 0; 3206 return 0;
3207 } 3207 }
@@ -3598,7 +3598,7 @@ int il4965_send_beacon_cmd(struct il_priv *il)
3598 return -EINVAL; 3598 return -EINVAL;
3599 } 3599 }
3600 3600
3601 rc = il_send_cmd_pdu(il, REPLY_TX_BEACON, frame_size, 3601 rc = il_send_cmd_pdu(il, C_TX_BEACON, frame_size,
3602 &frame->u.cmd[0]); 3602 &frame->u.cmd[0]);
3603 3603
3604 il4965_free_frame(il, frame); 3604 il4965_free_frame(il, frame);
@@ -3801,7 +3801,7 @@ static void il4965_rx_reply_alive(struct il_priv *il,
3801 * This callback is provided in order to send a stats request. 3801 * This callback is provided in order to send a stats request.
3802 * 3802 *
3803 * This timer function is continually reset to execute within 3803 * This timer function is continually reset to execute within
3804 * REG_RECALIB_PERIOD seconds since the last STATS_NOTIFICATION 3804 * REG_RECALIB_PERIOD seconds since the last N_STATS
3805 * was received. We need to ensure we receive the stats in order 3805 * was received. We need to ensure we receive the stats in order
3806 * to update the temperature used for calibrating the TXPOWER. 3806 * to update the temperature used for calibrating the TXPOWER.
3807 */ 3807 */
@@ -3921,37 +3921,37 @@ static void il4965_rx_card_state_notif(struct il_priv *il,
3921 */ 3921 */
3922static void il4965_setup_rx_handlers(struct il_priv *il) 3922static void il4965_setup_rx_handlers(struct il_priv *il)
3923{ 3923{
3924 il->rx_handlers[REPLY_ALIVE] = il4965_rx_reply_alive; 3924 il->rx_handlers[N_ALIVE] = il4965_rx_reply_alive;
3925 il->rx_handlers[REPLY_ERROR] = il_rx_reply_error; 3925 il->rx_handlers[N_ERROR] = il_rx_reply_error;
3926 il->rx_handlers[CHANNEL_SWITCH_NOTIFICATION] = il_rx_csa; 3926 il->rx_handlers[N_CHANNEL_SWITCH] = il_rx_csa;
3927 il->rx_handlers[SPECTRUM_MEASURE_NOTIFICATION] = 3927 il->rx_handlers[N_SPECTRUM_MEASUREMENT] =
3928 il_rx_spectrum_measure_notif; 3928 il_rx_spectrum_measure_notif;
3929 il->rx_handlers[PM_SLEEP_NOTIFICATION] = il_rx_pm_sleep_notif; 3929 il->rx_handlers[N_PM_SLEEP] = il_rx_pm_sleep_notif;
3930 il->rx_handlers[PM_DEBUG_STATISTIC_NOTIFIC] = 3930 il->rx_handlers[N_PM_DEBUG_STATS] =
3931 il_rx_pm_debug_stats_notif; 3931 il_rx_pm_debug_stats_notif;
3932 il->rx_handlers[BEACON_NOTIFICATION] = il4965_rx_beacon_notif; 3932 il->rx_handlers[N_BEACON] = il4965_rx_beacon_notif;
3933 3933
3934 /* 3934 /*
3935 * The same handler is used for both the REPLY to a discrete 3935 * The same handler is used for both the REPLY to a discrete
3936 * stats request from the host as well as for the periodic 3936 * stats request from the host as well as for the periodic
3937 * stats notifications (after received beacons) from the uCode. 3937 * stats notifications (after received beacons) from the uCode.
3938 */ 3938 */
3939 il->rx_handlers[REPLY_STATS_CMD] = il4965_reply_stats; 3939 il->rx_handlers[C_STATS] = il4965_reply_stats;
3940 il->rx_handlers[STATS_NOTIFICATION] = il4965_rx_stats; 3940 il->rx_handlers[N_STATS] = il4965_rx_stats;
3941 3941
3942 il_setup_rx_scan_handlers(il); 3942 il_setup_rx_scan_handlers(il);
3943 3943
3944 /* status change handler */ 3944 /* status change handler */
3945 il->rx_handlers[CARD_STATE_NOTIFICATION] = 3945 il->rx_handlers[N_CARD_STATE] =
3946 il4965_rx_card_state_notif; 3946 il4965_rx_card_state_notif;
3947 3947
3948 il->rx_handlers[MISSED_BEACONS_NOTIFICATION] = 3948 il->rx_handlers[N_MISSED_BEACONS] =
3949 il4965_rx_missed_beacon_notif; 3949 il4965_rx_missed_beacon_notif;
3950 /* Rx handlers */ 3950 /* Rx handlers */
3951 il->rx_handlers[REPLY_RX_PHY_CMD] = il4965_rx_reply_rx_phy; 3951 il->rx_handlers[N_RX_PHY] = il4965_rx_reply_rx_phy;
3952 il->rx_handlers[REPLY_RX_MPDU_CMD] = il4965_rx_reply_rx; 3952 il->rx_handlers[N_RX_MPDU] = il4965_rx_reply_rx;
3953 /* block ack */ 3953 /* block ack */
3954 il->rx_handlers[REPLY_COMPRESSED_BA] = il4965_rx_reply_compressed_ba; 3954 il->rx_handlers[N_COMPRESSED_BA] = il4965_rx_reply_compressed_ba;
3955 /* Set up hardware specific Rx handlers */ 3955 /* Set up hardware specific Rx handlers */
3956 il->cfg->ops->lib->rx_handler_setup(il); 3956 il->cfg->ops->lib->rx_handler_setup(il);
3957} 3957}
@@ -4019,12 +4019,12 @@ void il4965_rx_handle(struct il_priv *il)
4019 * Ucode should set SEQ_RX_FRAME bit if ucode-originated, 4019 * Ucode should set SEQ_RX_FRAME bit if ucode-originated,
4020 * but apparently a few don't get set; catch them here. */ 4020 * but apparently a few don't get set; catch them here. */
4021 reclaim = !(pkt->hdr.sequence & SEQ_RX_FRAME) && 4021 reclaim = !(pkt->hdr.sequence & SEQ_RX_FRAME) &&
4022 (pkt->hdr.cmd != REPLY_RX_PHY_CMD) && 4022 (pkt->hdr.cmd != N_RX_PHY) &&
4023 (pkt->hdr.cmd != REPLY_RX) && 4023 (pkt->hdr.cmd != N_RX) &&
4024 (pkt->hdr.cmd != REPLY_RX_MPDU_CMD) && 4024 (pkt->hdr.cmd != N_RX_MPDU) &&
4025 (pkt->hdr.cmd != REPLY_COMPRESSED_BA) && 4025 (pkt->hdr.cmd != N_COMPRESSED_BA) &&
4026 (pkt->hdr.cmd != STATS_NOTIFICATION) && 4026 (pkt->hdr.cmd != N_STATS) &&
4027 (pkt->hdr.cmd != REPLY_TX); 4027 (pkt->hdr.cmd != C_TX);
4028 4028
4029 /* Based on type of command response or notification, 4029 /* Based on type of command response or notification,
4030 * handle those that need handling via function in 4030 * handle those that need handling via function in
@@ -4923,12 +4923,12 @@ static void il4965_rf_kill_ct_config(struct il_priv *il)
4923 cmd.critical_temperature_R = 4923 cmd.critical_temperature_R =
4924 cpu_to_le32(il->hw_params.ct_kill_threshold); 4924 cpu_to_le32(il->hw_params.ct_kill_threshold);
4925 4925
4926 ret = il_send_cmd_pdu(il, REPLY_CT_KILL_CONFIG_CMD, 4926 ret = il_send_cmd_pdu(il, C_CT_KILL_CONFIG,
4927 sizeof(cmd), &cmd); 4927 sizeof(cmd), &cmd);
4928 if (ret) 4928 if (ret)
4929 IL_ERR("REPLY_CT_KILL_CONFIG_CMD failed\n"); 4929 IL_ERR("C_CT_KILL_CONFIG failed\n");
4930 else 4930 else
4931 D_INFO("REPLY_CT_KILL_CONFIG_CMD " 4931 D_INFO("C_CT_KILL_CONFIG "
4932 "succeeded, " 4932 "succeeded, "
4933 "critical temperature is %d\n", 4933 "critical temperature is %d\n",
4934 il->hw_params.ct_kill_threshold); 4934 il->hw_params.ct_kill_threshold);
@@ -5042,7 +5042,7 @@ static int il4965_alive_notify(struct il_priv *il)
5042} 5042}
5043 5043
5044/** 5044/**
5045 * il4965_alive_start - called after REPLY_ALIVE notification received 5045 * il4965_alive_start - called after N_ALIVE notification received
5046 * from protocol/runtime uCode (initialization uCode's 5046 * from protocol/runtime uCode (initialization uCode's
5047 * Alive gets handled by il_init_alive_start()). 5047 * Alive gets handled by il_init_alive_start()).
5048 */ 5048 */
@@ -6200,12 +6200,12 @@ il4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
6200 6200
6201 il->ctx.always_active = true; 6201 il->ctx.always_active = true;
6202 il->ctx.is_active = true; 6202 il->ctx.is_active = true;
6203 il->ctx.rxon_cmd = REPLY_RXON; 6203 il->ctx.rxon_cmd = C_RXON;
6204 il->ctx.rxon_timing_cmd = REPLY_RXON_TIMING; 6204 il->ctx.rxon_timing_cmd = C_RXON_TIMING;
6205 il->ctx.rxon_assoc_cmd = REPLY_RXON_ASSOC; 6205 il->ctx.rxon_assoc_cmd = C_RXON_ASSOC;
6206 il->ctx.qos_cmd = REPLY_QOS_PARAM; 6206 il->ctx.qos_cmd = C_QOS_PARAM;
6207 il->ctx.ap_sta_id = IL_AP_ID; 6207 il->ctx.ap_sta_id = IL_AP_ID;
6208 il->ctx.wep_key_cmd = REPLY_WEPKEY; 6208 il->ctx.wep_key_cmd = C_WEPKEY;
6209 il->ctx.ac_to_fifo = il4965_bss_ac_to_fifo; 6209 il->ctx.ac_to_fifo = il4965_bss_ac_to_fifo;
6210 il->ctx.ac_to_queue = il4965_bss_ac_to_queue; 6210 il->ctx.ac_to_queue = il4965_bss_ac_to_queue;
6211 il->ctx.exclusive_interface_modes = 6211 il->ctx.exclusive_interface_modes =
diff --git a/drivers/net/wireless/iwlegacy/4965-rs.c b/drivers/net/wireless/iwlegacy/4965-rs.c
index c4bf4aafad9d..4809a9d4b977 100644
--- a/drivers/net/wireless/iwlegacy/4965-rs.c
+++ b/drivers/net/wireless/iwlegacy/4965-rs.c
@@ -2172,8 +2172,8 @@ out:
2172 * if the driver's iwl-4965-rs rate scaling algorithm is used, instead of 2172 * if the driver's iwl-4965-rs rate scaling algorithm is used, instead of
2173 * rc80211_simple. 2173 * rc80211_simple.
2174 * 2174 *
2175 * NOTE: Run REPLY_ADD_STA command to set up station table entry, before 2175 * NOTE: Run C_ADD_STA command to set up station table entry, before
2176 * calling this function (which runs REPLY_TX_LINK_QUALITY_CMD, 2176 * calling this function (which runs C_TX_LINK_QUALITY_CMD,
2177 * which requires station table entry to exist). 2177 * which requires station table entry to exist).
2178 */ 2178 */
2179static void il4965_rs_initialize_lq(struct il_priv *il, 2179static void il4965_rs_initialize_lq(struct il_priv *il,
diff --git a/drivers/net/wireless/iwlegacy/4965.c b/drivers/net/wireless/iwlegacy/4965.c
index 361a1ca39896..3b101c142171 100644
--- a/drivers/net/wireless/iwlegacy/4965.c
+++ b/drivers/net/wireless/iwlegacy/4965.c
@@ -249,7 +249,7 @@ static int
249il4965_send_led_cmd(struct il_priv *il, struct il_led_cmd *led_cmd) 249il4965_send_led_cmd(struct il_priv *il, struct il_led_cmd *led_cmd)
250{ 250{
251 struct il_host_cmd cmd = { 251 struct il_host_cmd cmd = {
252 .id = REPLY_LEDS_CMD, 252 .id = C_LEDS,
253 .len = sizeof(struct il_led_cmd), 253 .len = sizeof(struct il_led_cmd),
254 .data = led_cmd, 254 .data = led_cmd,
255 .flags = CMD_ASYNC, 255 .flags = CMD_ASYNC,
@@ -465,9 +465,9 @@ static int il4965_set_ucode_ptrs(struct il_priv *il)
465} 465}
466 466
467/** 467/**
468 * il4965_init_alive_start - Called after REPLY_ALIVE notification received 468 * il4965_init_alive_start - Called after N_ALIVE notification received
469 * 469 *
470 * Called after REPLY_ALIVE notification received from "initialize" uCode. 470 * Called after N_ALIVE notification received from "initialize" uCode.
471 * 471 *
472 * The 4965 "initialize" ALIVE reply contains calibration data for: 472 * The 4965 "initialize" ALIVE reply contains calibration data for:
473 * Voltage, temperature, and MIMO tx gain correction, now stored in il 473 * Voltage, temperature, and MIMO tx gain correction, now stored in il
@@ -567,10 +567,10 @@ static void il4965_chain_noise_reset(struct il_priv *il)
567 cmd.diff_gain_a = 0; 567 cmd.diff_gain_a = 0;
568 cmd.diff_gain_b = 0; 568 cmd.diff_gain_b = 0;
569 cmd.diff_gain_c = 0; 569 cmd.diff_gain_c = 0;
570 if (il_send_cmd_pdu(il, REPLY_PHY_CALIBRATION_CMD, 570 if (il_send_cmd_pdu(il, C_PHY_CALIBRATION,
571 sizeof(cmd), &cmd)) 571 sizeof(cmd), &cmd))
572 IL_ERR( 572 IL_ERR(
573 "Could not send REPLY_PHY_CALIBRATION_CMD\n"); 573 "Could not send C_PHY_CALIBRATION\n");
574 data->state = IL_CHAIN_NOISE_ACCUMULATE; 574 data->state = IL_CHAIN_NOISE_ACCUMULATE;
575 D_CALIB("Run chain_noise_calibrate\n"); 575 D_CALIB("Run chain_noise_calibrate\n");
576 } 576 }
@@ -1370,7 +1370,7 @@ static int il4965_send_tx_power(struct il_priv *il)
1370 goto out; 1370 goto out;
1371 1371
1372 ret = il_send_cmd_pdu(il, 1372 ret = il_send_cmd_pdu(il,
1373 REPLY_TX_PWR_TBL_CMD, sizeof(cmd), &cmd); 1373 C_TX_PWR_TBL, sizeof(cmd), &cmd);
1374 1374
1375out: 1375out:
1376 return ret; 1376 return ret;
@@ -1408,7 +1408,7 @@ static int il4965_send_rxon_assoc(struct il_priv *il,
1408 ctx->staging.ofdm_ht_dual_stream_basic_rates; 1408 ctx->staging.ofdm_ht_dual_stream_basic_rates;
1409 rxon_assoc.rx_chain_select_flags = ctx->staging.rx_chain; 1409 rxon_assoc.rx_chain_select_flags = ctx->staging.rx_chain;
1410 1410
1411 ret = il_send_cmd_pdu_async(il, REPLY_RXON_ASSOC, 1411 ret = il_send_cmd_pdu_async(il, C_RXON_ASSOC,
1412 sizeof(rxon_assoc), &rxon_assoc, NULL); 1412 sizeof(rxon_assoc), &rxon_assoc, NULL);
1413 1413
1414 return ret; 1414 return ret;
@@ -1632,7 +1632,7 @@ static int il4965_hw_channel_switch(struct il_priv *il,
1632 } 1632 }
1633 1633
1634 return il_send_cmd_pdu(il, 1634 return il_send_cmd_pdu(il,
1635 REPLY_CHANNEL_SWITCH, sizeof(cmd), &cmd); 1635 C_CHANNEL_SWITCH, sizeof(cmd), &cmd);
1636} 1636}
1637 1637
1638/** 1638/**
@@ -1795,7 +1795,7 @@ static void il4965_temperature_calib(struct il_priv *il)
1795static u16 il4965_get_hcmd_size(u8 cmd_id, u16 len) 1795static u16 il4965_get_hcmd_size(u8 cmd_id, u16 len)
1796{ 1796{
1797 switch (cmd_id) { 1797 switch (cmd_id) {
1798 case REPLY_RXON: 1798 case C_RXON:
1799 return (u16) sizeof(struct il4965_rxon_cmd); 1799 return (u16) sizeof(struct il4965_rxon_cmd);
1800 default: 1800 default:
1801 return len; 1801 return len;
@@ -2145,10 +2145,10 @@ static void il4965_rx_beacon_notif(struct il_priv *il,
2145static void il4965_rx_handler_setup(struct il_priv *il) 2145static void il4965_rx_handler_setup(struct il_priv *il)
2146{ 2146{
2147 /* Legacy Rx frames */ 2147 /* Legacy Rx frames */
2148 il->rx_handlers[REPLY_RX] = il4965_rx_reply_rx; 2148 il->rx_handlers[N_RX] = il4965_rx_reply_rx;
2149 /* Tx response */ 2149 /* Tx response */
2150 il->rx_handlers[REPLY_TX] = il4965_rx_reply_tx; 2150 il->rx_handlers[C_TX] = il4965_rx_reply_tx;
2151 il->rx_handlers[BEACON_NOTIFICATION] = il4965_rx_beacon_notif; 2151 il->rx_handlers[N_BEACON] = il4965_rx_beacon_notif;
2152} 2152}
2153 2153
2154static struct il_hcmd_ops il4965_hcmd = { 2154static struct il_hcmd_ops il4965_hcmd = {
diff --git a/drivers/net/wireless/iwlegacy/4965.h b/drivers/net/wireless/iwlegacy/4965.h
index 85c3a49d7e14..94cf7e7da7f9 100644
--- a/drivers/net/wireless/iwlegacy/4965.h
+++ b/drivers/net/wireless/iwlegacy/4965.h
@@ -278,8 +278,8 @@ static inline int il4965_hw_valid_rtc_data_addr(u32 addr)
278 * uCode provides all 4 values to the driver via the "initialize alive" 278 * uCode provides all 4 values to the driver via the "initialize alive"
279 * notification (see struct il4965_init_alive_resp). After the runtime uCode 279 * notification (see struct il4965_init_alive_resp). After the runtime uCode
280 * image loads, uCode updates the R4 value via stats notifications 280 * image loads, uCode updates the R4 value via stats notifications
281 * (see STATS_NOTIFICATION), which occur after each received beacon 281 * (see N_STATS), which occur after each received beacon
282 * when associated, or can be requested via REPLY_STATS_CMD. 282 * when associated, or can be requested via C_STATS.
283 * 283 *
284 * NOTE: uCode provides the R4 value as a 23-bit signed value. Driver 284 * NOTE: uCode provides the R4 value as a 23-bit signed value. Driver
285 * must sign-extend to 32 bits before applying formula below. 285 * must sign-extend to 32 bits before applying formula below.
diff --git a/drivers/net/wireless/iwlegacy/iwl-commands.h b/drivers/net/wireless/iwlegacy/iwl-commands.h
index 1a6ca36b4c78..8df4d252168b 100644
--- a/drivers/net/wireless/iwlegacy/iwl-commands.h
+++ b/drivers/net/wireless/iwlegacy/iwl-commands.h
@@ -84,76 +84,76 @@ struct il_priv;
84#define IL_MAX_RATES (IL_CCK_RATES + IL_OFDM_RATES) 84#define IL_MAX_RATES (IL_CCK_RATES + IL_OFDM_RATES)
85 85
86enum { 86enum {
87 REPLY_ALIVE = 0x1, 87 N_ALIVE = 0x1,
88 REPLY_ERROR = 0x2, 88 N_ERROR = 0x2,
89 89
90 /* RXON and QOS commands */ 90 /* RXON and QOS commands */
91 REPLY_RXON = 0x10, 91 C_RXON = 0x10,
92 REPLY_RXON_ASSOC = 0x11, 92 C_RXON_ASSOC = 0x11,
93 REPLY_QOS_PARAM = 0x13, 93 C_QOS_PARAM = 0x13,
94 REPLY_RXON_TIMING = 0x14, 94 C_RXON_TIMING = 0x14,
95 95
96 /* Multi-Station support */ 96 /* Multi-Station support */
97 REPLY_ADD_STA = 0x18, 97 C_ADD_STA = 0x18,
98 REPLY_REMOVE_STA = 0x19, 98 C_REM_STA = 0x19,
99 99
100 /* Security */ 100 /* Security */
101 REPLY_WEPKEY = 0x20, 101 C_WEPKEY = 0x20,
102 102
103 /* RX, TX, LEDs */ 103 /* RX, TX, LEDs */
104 REPLY_3945_RX = 0x1b, /* 3945 only */ 104 N_3945_RX = 0x1b, /* 3945 only */
105 REPLY_TX = 0x1c, 105 C_TX = 0x1c,
106 REPLY_RATE_SCALE = 0x47, /* 3945 only */ 106 C_RATE_SCALE = 0x47, /* 3945 only */
107 REPLY_LEDS_CMD = 0x48, 107 C_LEDS = 0x48,
108 REPLY_TX_LINK_QUALITY_CMD = 0x4e, /* for 4965 and up */ 108 C_TX_LINK_QUALITY_CMD = 0x4e, /* for 4965 */
109 109
110 /* 802.11h related */ 110 /* 802.11h related */
111 REPLY_CHANNEL_SWITCH = 0x72, 111 C_CHANNEL_SWITCH = 0x72,
112 CHANNEL_SWITCH_NOTIFICATION = 0x73, 112 N_CHANNEL_SWITCH = 0x73,
113 REPLY_SPECTRUM_MEASUREMENT_CMD = 0x74, 113 C_SPECTRUM_MEASUREMENT = 0x74,
114 SPECTRUM_MEASURE_NOTIFICATION = 0x75, 114 N_SPECTRUM_MEASUREMENT = 0x75,
115 115
116 /* Power Management */ 116 /* Power Management */
117 POWER_TBL_CMD = 0x77, 117 C_POWER_TBL = 0x77,
118 PM_SLEEP_NOTIFICATION = 0x7A, 118 N_PM_SLEEP = 0x7A,
119 PM_DEBUG_STATISTIC_NOTIFIC = 0x7B, 119 N_PM_DEBUG_STATS = 0x7B,
120 120
121 /* Scan commands and notifications */ 121 /* Scan commands and notifications */
122 REPLY_SCAN_CMD = 0x80, 122 C_SCAN = 0x80,
123 REPLY_SCAN_ABORT_CMD = 0x81, 123 C_SCAN_ABORT = 0x81,
124 SCAN_START_NOTIFICATION = 0x82, 124 N_SCAN_START = 0x82,
125 SCAN_RESULTS_NOTIFICATION = 0x83, 125 N_SCAN_RESULTS = 0x83,
126 SCAN_COMPLETE_NOTIFICATION = 0x84, 126 N_SCAN_COMPLETE = 0x84,
127 127
128 /* IBSS/AP commands */ 128 /* IBSS/AP commands */
129 BEACON_NOTIFICATION = 0x90, 129 N_BEACON = 0x90,
130 REPLY_TX_BEACON = 0x91, 130 C_TX_BEACON= 0x91,
131 131
132 /* Miscellaneous commands */ 132 /* Miscellaneous commands */
133 REPLY_TX_PWR_TBL_CMD = 0x97, 133 C_TX_PWR_TBL = 0x97,
134 134
135 /* Bluetooth device coexistence config command */ 135 /* Bluetooth device coexistence config command */
136 REPLY_BT_CONFIG = 0x9b, 136 C_BT_CONFIG = 0x9b,
137 137
138 /* Statistics */ 138 /* Statistics */
139 REPLY_STATS_CMD = 0x9c, 139 C_STATS = 0x9c,
140 STATS_NOTIFICATION = 0x9d, 140 N_STATS = 0x9d,
141 141
142 /* RF-KILL commands and notifications */ 142 /* RF-KILL commands and notifications */
143 CARD_STATE_NOTIFICATION = 0xa1, 143 N_CARD_STATE = 0xa1,
144 144
145 /* Missed beacons notification */ 145 /* Missed beacons notification */
146 MISSED_BEACONS_NOTIFICATION = 0xa2, 146 N_MISSED_BEACONS = 0xa2,
147 147
148 REPLY_CT_KILL_CONFIG_CMD = 0xa4, 148 C_CT_KILL_CONFIG = 0xa4,
149 SENSITIVITY_CMD = 0xa8, 149 C_SENSITIVITY = 0xa8,
150 REPLY_PHY_CALIBRATION_CMD = 0xb0, 150 C_PHY_CALIBRATION = 0xb0,
151 REPLY_RX_PHY_CMD = 0xc0, 151 N_RX_PHY = 0xc0,
152 REPLY_RX_MPDU_CMD = 0xc1, 152 N_RX_MPDU = 0xc1,
153 REPLY_RX = 0xc3, 153 N_RX = 0xc3,
154 REPLY_COMPRESSED_BA = 0xc5, 154 N_COMPRESSED_BA = 0xc5,
155 155
156 REPLY_MAX = 0xff 156 IL_CN_MAX = 0xff
157}; 157};
158 158
159/****************************************************************************** 159/******************************************************************************
@@ -180,7 +180,7 @@ enum {
180 * driver, and each response/notification received from uCode. 180 * driver, and each response/notification received from uCode.
181 */ 181 */
182struct il_cmd_header { 182struct il_cmd_header {
183 u8 cmd; /* Command ID: REPLY_RXON, etc. */ 183 u8 cmd; /* Command ID: C_RXON, etc. */
184 u8 flags; /* 0:5 reserved, 6 abort, 7 internal */ 184 u8 flags; /* 0:5 reserved, 6 abort, 7 internal */
185 /* 185 /*
186 * The driver sets up the sequence number to values of its choosing. 186 * The driver sets up the sequence number to values of its choosing.
@@ -192,7 +192,7 @@ struct il_cmd_header {
192 * There is one exception: uCode sets bit 15 when it originates 192 * There is one exception: uCode sets bit 15 when it originates
193 * the response/notification, i.e. when the response/notification 193 * the response/notification, i.e. when the response/notification
194 * is not a direct response to a command sent by the driver. For 194 * is not a direct response to a command sent by the driver. For
195 * example, uCode issues REPLY_3945_RX when it sends a received frame 195 * example, uCode issues N_3945_RX when it sends a received frame
196 * to the driver; it is not a direct response to any driver command. 196 * to the driver; it is not a direct response to any driver command.
197 * 197 *
198 * The Linux driver uses the following format: 198 * The Linux driver uses the following format:
@@ -214,7 +214,7 @@ struct il_cmd_header {
214/** 214/**
215 * struct il3945_tx_power 215 * struct il3945_tx_power
216 * 216 *
217 * Used in REPLY_TX_PWR_TBL_CMD, REPLY_SCAN_CMD, REPLY_CHANNEL_SWITCH 217 * Used in C_TX_PWR_TBL, C_SCAN, C_CHANNEL_SWITCH
218 * 218 *
219 * Each entry contains two values: 219 * Each entry contains two values:
220 * 1) DSP gain (or sometimes called DSP attenuation). This is a fine-grained 220 * 1) DSP gain (or sometimes called DSP attenuation). This is a fine-grained
@@ -233,7 +233,7 @@ struct il3945_tx_power {
233/** 233/**
234 * struct il3945_power_per_rate 234 * struct il3945_power_per_rate
235 * 235 *
236 * Used in REPLY_TX_PWR_TBL_CMD, REPLY_CHANNEL_SWITCH 236 * Used in C_TX_PWR_TBL, C_CHANNEL_SWITCH
237 */ 237 */
238struct il3945_power_per_rate { 238struct il3945_power_per_rate {
239 u8 rate; /* plcp */ 239 u8 rate; /* plcp */
@@ -245,10 +245,10 @@ struct il3945_power_per_rate {
245 * iwl4965 rate_n_flags bit fields 245 * iwl4965 rate_n_flags bit fields
246 * 246 *
247 * rate_n_flags format is used in following iwl4965 commands: 247 * rate_n_flags format is used in following iwl4965 commands:
248 * REPLY_RX (response only) 248 * N_RX (response only)
249 * REPLY_RX_MPDU (response only) 249 * N_RX_MPDU (response only)
250 * REPLY_TX (both command and response) 250 * C_TX (both command and response)
251 * REPLY_TX_LINK_QUALITY_CMD 251 * C_TX_LINK_QUALITY_CMD
252 * 252 *
253 * High-throughput (HT) rate format for bits 7:0 (bit 8 must be "1"): 253 * High-throughput (HT) rate format for bits 7:0 (bit 8 must be "1"):
254 * 2-0: 0) 6 Mbps 254 * 2-0: 0) 6 Mbps
@@ -336,7 +336,7 @@ struct il3945_power_per_rate {
336/** 336/**
337 * union il4965_tx_power_dual_stream 337 * union il4965_tx_power_dual_stream
338 * 338 *
339 * Host format used for REPLY_TX_PWR_TBL_CMD, REPLY_CHANNEL_SWITCH 339 * Host format used for C_TX_PWR_TBL, C_CHANNEL_SWITCH
340 * Use __le32 version (struct tx_power_dual_stream) when building command. 340 * Use __le32 version (struct tx_power_dual_stream) when building command.
341 * 341 *
342 * Driver provides radio gain and DSP attenuation settings to device in pairs, 342 * Driver provides radio gain and DSP attenuation settings to device in pairs,
@@ -360,7 +360,7 @@ union il4965_tx_power_dual_stream {
360/** 360/**
361 * struct tx_power_dual_stream 361 * struct tx_power_dual_stream
362 * 362 *
363 * Table entries in REPLY_TX_PWR_TBL_CMD, REPLY_CHANNEL_SWITCH 363 * Table entries in C_TX_PWR_TBL, C_CHANNEL_SWITCH
364 * 364 *
365 * Same format as il_tx_power_dual_stream, but __le32 365 * Same format as il_tx_power_dual_stream, but __le32
366 */ 366 */
@@ -371,7 +371,7 @@ struct tx_power_dual_stream {
371/** 371/**
372 * struct il4965_tx_power_db 372 * struct il4965_tx_power_db
373 * 373 *
374 * Entire table within REPLY_TX_PWR_TBL_CMD, REPLY_CHANNEL_SWITCH 374 * Entire table within C_TX_PWR_TBL, C_CHANNEL_SWITCH
375 */ 375 */
376struct il4965_tx_power_db { 376struct il4965_tx_power_db {
377 struct tx_power_dual_stream power_tbl[POWER_TBL_NUM_ENTRIES]; 377 struct tx_power_dual_stream power_tbl[POWER_TBL_NUM_ENTRIES];
@@ -387,7 +387,7 @@ struct il4965_tx_power_db {
387#define INITIALIZE_SUBTYPE (9) 387#define INITIALIZE_SUBTYPE (9)
388 388
389/* 389/*
390 * ("Initialize") REPLY_ALIVE = 0x1 (response only, not a command) 390 * ("Initialize") N_ALIVE = 0x1 (response only, not a command)
391 * 391 *
392 * uCode issues this "initialize alive" notification once the initialization 392 * uCode issues this "initialize alive" notification once the initialization
393 * uCode image has completed its work, and is ready to load the runtime image. 393 * uCode image has completed its work, and is ready to load the runtime image.
@@ -435,7 +435,7 @@ struct il_init_alive_resp {
435 435
436 436
437/** 437/**
438 * REPLY_ALIVE = 0x1 (response only, not a command) 438 * N_ALIVE = 0x1 (response only, not a command)
439 * 439 *
440 * uCode issues this "alive" notification once the runtime image is ready 440 * uCode issues this "alive" notification once the runtime image is ready
441 * to receive commands from the driver. This is the *second* "alive" 441 * to receive commands from the driver. This is the *second* "alive"
@@ -526,7 +526,7 @@ struct il_alive_resp {
526} __packed; 526} __packed;
527 527
528/* 528/*
529 * REPLY_ERROR = 0x2 (response only, not a command) 529 * N_ERROR = 0x2 (response only, not a command)
530 */ 530 */
531struct il_error_resp { 531struct il_error_resp {
532 __le32 error_type; 532 __le32 error_type;
@@ -640,7 +640,7 @@ enum {
640#define RXON_FILTER_BCON_AWARE_MSK cpu_to_le32(1 << 6) 640#define RXON_FILTER_BCON_AWARE_MSK cpu_to_le32(1 << 6)
641 641
642/** 642/**
643 * REPLY_RXON = 0x10 (command, has simple generic response) 643 * C_RXON = 0x10 (command, has simple generic response)
644 * 644 *
645 * RXON tunes the radio tuner to a service channel, and sets up a number 645 * RXON tunes the radio tuner to a service channel, and sets up a number
646 * of parameters that are used primarily for Rx, but also for Tx operations. 646 * of parameters that are used primarily for Rx, but also for Tx operations.
@@ -653,7 +653,7 @@ enum {
653 * channel. 653 * channel.
654 * 654 *
655 * NOTE: All RXONs wipe clean the internal txpower table. Driver must 655 * NOTE: All RXONs wipe clean the internal txpower table. Driver must
656 * issue a new REPLY_TX_PWR_TBL_CMD after each REPLY_RXON (0x10), 656 * issue a new C_TX_PWR_TBL after each C_RXON (0x10),
657 * regardless of whether RXON_FILTER_ASSOC_MSK is set. 657 * regardless of whether RXON_FILTER_ASSOC_MSK is set.
658 */ 658 */
659 659
@@ -723,7 +723,7 @@ struct il_rxon_cmd {
723 723
724 724
725/* 725/*
726 * REPLY_RXON_ASSOC = 0x11 (command, has simple generic response) 726 * C_RXON_ASSOC = 0x11 (command, has simple generic response)
727 */ 727 */
728struct il3945_rxon_assoc_cmd { 728struct il3945_rxon_assoc_cmd {
729 __le32 flags; 729 __le32 flags;
@@ -749,7 +749,7 @@ struct il4965_rxon_assoc_cmd {
749#define IL39_MAX_UCODE_BEACON_INTERVAL 1 /* 1024 */ 749#define IL39_MAX_UCODE_BEACON_INTERVAL 1 /* 1024 */
750 750
751/* 751/*
752 * REPLY_RXON_TIMING = 0x14 (command, has simple generic response) 752 * C_RXON_TIMING = 0x14 (command, has simple generic response)
753 */ 753 */
754struct il_rxon_time_cmd { 754struct il_rxon_time_cmd {
755 __le64 timestamp; 755 __le64 timestamp;
@@ -762,7 +762,7 @@ struct il_rxon_time_cmd {
762} __packed; 762} __packed;
763 763
764/* 764/*
765 * REPLY_CHANNEL_SWITCH = 0x72 (command, has simple generic response) 765 * C_CHANNEL_SWITCH = 0x72 (command, has simple generic response)
766 */ 766 */
767struct il3945_channel_switch_cmd { 767struct il3945_channel_switch_cmd {
768 u8 band; 768 u8 band;
@@ -785,7 +785,7 @@ struct il4965_channel_switch_cmd {
785} __packed; 785} __packed;
786 786
787/* 787/*
788 * CHANNEL_SWITCH_NOTIFICATION = 0x73 (notification only, not a command) 788 * N_CHANNEL_SWITCH = 0x73 (notification only, not a command)
789 */ 789 */
790struct il_csa_notification { 790struct il_csa_notification {
791 __le16 band; 791 __le16 band;
@@ -800,7 +800,7 @@ struct il_csa_notification {
800 *****************************************************************************/ 800 *****************************************************************************/
801 801
802/** 802/**
803 * struct il_ac_qos -- QOS timing params for REPLY_QOS_PARAM 803 * struct il_ac_qos -- QOS timing params for C_QOS_PARAM
804 * One for each of 4 EDCA access categories in struct il_qosparam_cmd 804 * One for each of 4 EDCA access categories in struct il_qosparam_cmd
805 * 805 *
806 * @cw_min: Contention win, start value in numbers of slots. 806 * @cw_min: Contention win, start value in numbers of slots.
@@ -832,7 +832,7 @@ struct il_ac_qos {
832#define AC_NUM 4 832#define AC_NUM 4
833 833
834/* 834/*
835 * REPLY_QOS_PARAM = 0x13 (command, has simple generic response) 835 * C_QOS_PARAM = 0x13 (command, has simple generic response)
836 * 836 *
837 * This command sets up timings for each of the 4 prioritized EDCA Tx FIFOs 837 * This command sets up timings for each of the 4 prioritized EDCA Tx FIFOs
838 * 0: Background, 1: Best Effort, 2: Video, 3: Voice. 838 * 0: Background, 1: Best Effort, 2: Video, 3: Voice.
@@ -936,15 +936,15 @@ struct sta_id_modify {
936} __packed; 936} __packed;
937 937
938/* 938/*
939 * REPLY_ADD_STA = 0x18 (command) 939 * C_ADD_STA = 0x18 (command)
940 * 940 *
941 * The device contains an internal table of per-station information, 941 * The device contains an internal table of per-station information,
942 * with info on security keys, aggregation parameters, and Tx rates for 942 * with info on security keys, aggregation parameters, and Tx rates for
943 * initial Tx attempt and any retries (4965 devices uses 943 * initial Tx attempt and any retries (4965 devices uses
944 * REPLY_TX_LINK_QUALITY_CMD, 944 * C_TX_LINK_QUALITY_CMD,
945 * 3945 uses REPLY_RATE_SCALE to set up rate tables). 945 * 3945 uses C_RATE_SCALE to set up rate tables).
946 * 946 *
947 * REPLY_ADD_STA sets up the table entry for one station, either creating 947 * C_ADD_STA sets up the table entry for one station, either creating
948 * a new entry, or modifying a pre-existing one. 948 * a new entry, or modifying a pre-existing one.
949 * 949 *
950 * NOTE: RXON command (without "associated" bit set) wipes the station table 950 * NOTE: RXON command (without "associated" bit set) wipes the station table
@@ -1071,7 +1071,7 @@ struct il_addsta_cmd {
1071#define ADD_STA_NO_BLOCK_ACK_RESOURCE 0x4 1071#define ADD_STA_NO_BLOCK_ACK_RESOURCE 0x4
1072#define ADD_STA_MODIFY_NON_EXIST_STA 0x8 1072#define ADD_STA_MODIFY_NON_EXIST_STA 0x8
1073/* 1073/*
1074 * REPLY_ADD_STA = 0x18 (response) 1074 * C_ADD_STA = 0x18 (response)
1075 */ 1075 */
1076struct il_add_sta_resp { 1076struct il_add_sta_resp {
1077 u8 status; /* ADD_STA_* */ 1077 u8 status; /* ADD_STA_* */
@@ -1079,14 +1079,14 @@ struct il_add_sta_resp {
1079 1079
1080#define REM_STA_SUCCESS_MSK 0x1 1080#define REM_STA_SUCCESS_MSK 0x1
1081/* 1081/*
1082 * REPLY_REM_STA = 0x19 (response) 1082 * C_REM_STA = 0x19 (response)
1083 */ 1083 */
1084struct il_rem_sta_resp { 1084struct il_rem_sta_resp {
1085 u8 status; 1085 u8 status;
1086} __packed; 1086} __packed;
1087 1087
1088/* 1088/*
1089 * REPLY_REM_STA = 0x19 (command) 1089 * C_REM_STA = 0x19 (command)
1090 */ 1090 */
1091struct il_rem_sta_cmd { 1091struct il_rem_sta_cmd {
1092 u8 num_sta; /* number of removed stations */ 1092 u8 num_sta; /* number of removed stations */
@@ -1195,7 +1195,7 @@ struct il3945_rx_frame_end {
1195} __packed; 1195} __packed;
1196 1196
1197/* 1197/*
1198 * REPLY_3945_RX = 0x1b (response only, not a command) 1198 * N_3945_RX = 0x1b (response only, not a command)
1199 * 1199 *
1200 * NOTE: DO NOT dereference from casts to this structure 1200 * NOTE: DO NOT dereference from casts to this structure
1201 * It is provided only for calculating minimum data set size. 1201 * It is provided only for calculating minimum data set size.
@@ -1226,7 +1226,7 @@ struct il4965_rx_non_cfg_phy {
1226 1226
1227 1227
1228/* 1228/*
1229 * REPLY_RX = 0xc3 (response only, not a command) 1229 * N_RX = 0xc3 (response only, not a command)
1230 * Used only for legacy (non 11n) frames. 1230 * Used only for legacy (non 11n) frames.
1231 */ 1231 */
1232struct il_rx_phy_res { 1232struct il_rx_phy_res {
@@ -1254,7 +1254,7 @@ struct il_rx_mpdu_res_start {
1254 * (5) 1254 * (5)
1255 * Tx Commands & Responses: 1255 * Tx Commands & Responses:
1256 * 1256 *
1257 * Driver must place each REPLY_TX command into one of the prioritized Tx 1257 * Driver must place each C_TX command into one of the prioritized Tx
1258 * queues in host DRAM, shared between driver and device (see comments for 1258 * queues in host DRAM, shared between driver and device (see comments for
1259 * SCD registers and Tx/Rx Queues). When the device's Tx scheduler and uCode 1259 * SCD registers and Tx/Rx Queues). When the device's Tx scheduler and uCode
1260 * are preparing to transmit, the device pulls the Tx command over the PCI 1260 * are preparing to transmit, the device pulls the Tx command over the PCI
@@ -1264,18 +1264,18 @@ struct il_rx_mpdu_res_start {
1264 * uCode handles all timing and protocol related to control frames 1264 * uCode handles all timing and protocol related to control frames
1265 * (RTS/CTS/ACK), based on flags in the Tx command. uCode and Tx scheduler 1265 * (RTS/CTS/ACK), based on flags in the Tx command. uCode and Tx scheduler
1266 * handle reception of block-acks; uCode updates the host driver via 1266 * handle reception of block-acks; uCode updates the host driver via
1267 * REPLY_COMPRESSED_BA. 1267 * N_COMPRESSED_BA.
1268 * 1268 *
1269 * uCode handles retrying Tx when an ACK is expected but not received. 1269 * uCode handles retrying Tx when an ACK is expected but not received.
1270 * This includes trying lower data rates than the one requested in the Tx 1270 * This includes trying lower data rates than the one requested in the Tx
1271 * command, as set up by the REPLY_RATE_SCALE (for 3945) or 1271 * command, as set up by the C_RATE_SCALE (for 3945) or
1272 * REPLY_TX_LINK_QUALITY_CMD (4965). 1272 * C_TX_LINK_QUALITY_CMD (4965).
1273 * 1273 *
1274 * Driver sets up transmit power for various rates via REPLY_TX_PWR_TBL_CMD. 1274 * Driver sets up transmit power for various rates via C_TX_PWR_TBL.
1275 * This command must be executed after every RXON command, before Tx can occur. 1275 * This command must be executed after every RXON command, before Tx can occur.
1276 *****************************************************************************/ 1276 *****************************************************************************/
1277 1277
1278/* REPLY_TX Tx flags field */ 1278/* C_TX Tx flags field */
1279 1279
1280/* 1280/*
1281 * 1: Use Request-To-Send protocol before this frame. 1281 * 1: Use Request-To-Send protocol before this frame.
@@ -1296,7 +1296,7 @@ struct il_rx_mpdu_res_start {
1296#define TX_CMD_FLG_ACK_MSK cpu_to_le32(1 << 3) 1296#define TX_CMD_FLG_ACK_MSK cpu_to_le32(1 << 3)
1297 1297
1298/* For 4965 devices: 1298/* For 4965 devices:
1299 * 1: Use rate scale table (see REPLY_TX_LINK_QUALITY_CMD). 1299 * 1: Use rate scale table (see C_TX_LINK_QUALITY_CMD).
1300 * Tx command's initial_rate_idx indicates first rate to try; 1300 * Tx command's initial_rate_idx indicates first rate to try;
1301 * uCode walks through table for additional Tx attempts. 1301 * uCode walks through table for additional Tx attempts.
1302 * 0: Use Tx rate/MCS from Tx command's rate_n_flags field. 1302 * 0: Use Tx rate/MCS from Tx command's rate_n_flags field.
@@ -1322,7 +1322,7 @@ struct il_rx_mpdu_res_start {
1322/* 1: uCode overrides sequence control field in MAC header. 1322/* 1: uCode overrides sequence control field in MAC header.
1323 * 0: Driver provides sequence control field in MAC header. 1323 * 0: Driver provides sequence control field in MAC header.
1324 * Set this for management frames, non-QOS data frames, non-unicast frames, 1324 * Set this for management frames, non-QOS data frames, non-unicast frames,
1325 * and also in Tx command embedded in REPLY_SCAN_CMD for active scans. */ 1325 * and also in Tx command embedded in C_SCAN for active scans. */
1326#define TX_CMD_FLG_SEQ_CTL_MSK cpu_to_le32(1 << 13) 1326#define TX_CMD_FLG_SEQ_CTL_MSK cpu_to_le32(1 << 13)
1327 1327
1328/* 1: This frame is non-last MPDU; more fragments are coming. 1328/* 1: This frame is non-last MPDU; more fragments are coming.
@@ -1369,7 +1369,7 @@ struct il_rx_mpdu_res_start {
1369#define TKIP_ICV_LEN 4 1369#define TKIP_ICV_LEN 4
1370 1370
1371/* 1371/*
1372 * REPLY_TX = 0x1c (command) 1372 * C_TX = 0x1c (command)
1373 */ 1373 */
1374 1374
1375struct il3945_tx_cmd { 1375struct il3945_tx_cmd {
@@ -1434,7 +1434,7 @@ struct il3945_tx_cmd {
1434} __packed; 1434} __packed;
1435 1435
1436/* 1436/*
1437 * REPLY_TX = 0x1c (response) 1437 * C_TX = 0x1c (response)
1438 */ 1438 */
1439struct il3945_tx_resp { 1439struct il3945_tx_resp {
1440 u8 failure_rts; 1440 u8 failure_rts;
@@ -1493,7 +1493,7 @@ struct il_tx_cmd {
1493 u8 sec_ctl; /* TX_CMD_SEC_* */ 1493 u8 sec_ctl; /* TX_CMD_SEC_* */
1494 1494
1495 /* 1495 /*
1496 * Index into rate table (see REPLY_TX_LINK_QUALITY_CMD) for initial 1496 * Index into rate table (see C_TX_LINK_QUALITY_CMD) for initial
1497 * Tx attempt, if TX_CMD_FLG_STA_RATE_MSK is set. Normally "0" for 1497 * Tx attempt, if TX_CMD_FLG_STA_RATE_MSK is set. Normally "0" for
1498 * data frames, this field may be used to selectively reduce initial 1498 * data frames, this field may be used to selectively reduce initial
1499 * rate (via non-0 value) for special frames (e.g. management), while 1499 * rate (via non-0 value) for special frames (e.g. management), while
@@ -1671,7 +1671,7 @@ enum {
1671#define AGG_TX_STATE_SEQ_NUM_MSK 0xffff0000 1671#define AGG_TX_STATE_SEQ_NUM_MSK 0xffff0000
1672 1672
1673/* 1673/*
1674 * REPLY_TX = 0x1c (response) 1674 * C_TX = 0x1c (response)
1675 * 1675 *
1676 * This response may be in one of two slightly different formats, indicated 1676 * This response may be in one of two slightly different formats, indicated
1677 * by the frame_count field: 1677 * by the frame_count field:
@@ -1735,7 +1735,7 @@ struct il4965_tx_resp {
1735} __packed; 1735} __packed;
1736 1736
1737/* 1737/*
1738 * REPLY_COMPRESSED_BA = 0xc5 (response only, not a command) 1738 * N_COMPRESSED_BA = 0xc5 (response only, not a command)
1739 * 1739 *
1740 * Reports Block-Acknowledge from recipient station 1740 * Reports Block-Acknowledge from recipient station
1741 */ 1741 */
@@ -1754,7 +1754,7 @@ struct il_compressed_ba_resp {
1754} __packed; 1754} __packed;
1755 1755
1756/* 1756/*
1757 * REPLY_TX_PWR_TBL_CMD = 0x97 (command, has simple generic response) 1757 * C_TX_PWR_TBL = 0x97 (command, has simple generic response)
1758 * 1758 *
1759 * See details under "TXPOWER" in 4965.h. 1759 * See details under "TXPOWER" in 4965.h.
1760 */ 1760 */
@@ -1777,7 +1777,7 @@ struct il4965_txpowertable_cmd {
1777/** 1777/**
1778 * struct il3945_rate_scaling_cmd - Rate Scaling Command & Response 1778 * struct il3945_rate_scaling_cmd - Rate Scaling Command & Response
1779 * 1779 *
1780 * REPLY_RATE_SCALE = 0x47 (command, has simple generic response) 1780 * C_RATE_SCALE = 0x47 (command, has simple generic response)
1781 * 1781 *
1782 * NOTE: The table of rates passed to the uCode via the 1782 * NOTE: The table of rates passed to the uCode via the
1783 * RATE_SCALE command sets up the corresponding order of 1783 * RATE_SCALE command sets up the corresponding order of
@@ -1786,7 +1786,7 @@ struct il4965_txpowertable_cmd {
1786 * 1786 *
1787 * For example, if you set 9MB (PLCP 0x0f) as the first 1787 * For example, if you set 9MB (PLCP 0x0f) as the first
1788 * rate in the rate table, the bit mask for that rate 1788 * rate in the rate table, the bit mask for that rate
1789 * when passed through ofdm_basic_rates on the REPLY_RXON 1789 * when passed through ofdm_basic_rates on the C_RXON
1790 * command would be bit 0 (1 << 0) 1790 * command would be bit 0 (1 << 0)
1791 */ 1791 */
1792struct il3945_rate_scaling_info { 1792struct il3945_rate_scaling_info {
@@ -1820,7 +1820,7 @@ struct il3945_rate_scaling_cmd {
1820/** 1820/**
1821 * struct il_link_qual_general_params 1821 * struct il_link_qual_general_params
1822 * 1822 *
1823 * Used in REPLY_TX_LINK_QUALITY_CMD 1823 * Used in C_TX_LINK_QUALITY_CMD
1824 */ 1824 */
1825struct il_link_qual_general_params { 1825struct il_link_qual_general_params {
1826 u8 flags; 1826 u8 flags;
@@ -1863,7 +1863,7 @@ struct il_link_qual_general_params {
1863/** 1863/**
1864 * struct il_link_qual_agg_params 1864 * struct il_link_qual_agg_params
1865 * 1865 *
1866 * Used in REPLY_TX_LINK_QUALITY_CMD 1866 * Used in C_TX_LINK_QUALITY_CMD
1867 */ 1867 */
1868struct il_link_qual_agg_params { 1868struct il_link_qual_agg_params {
1869 1869
@@ -1892,9 +1892,9 @@ struct il_link_qual_agg_params {
1892} __packed; 1892} __packed;
1893 1893
1894/* 1894/*
1895 * REPLY_TX_LINK_QUALITY_CMD = 0x4e (command, has simple generic response) 1895 * C_TX_LINK_QUALITY_CMD = 0x4e (command, has simple generic response)
1896 * 1896 *
1897 * For 4965 devices only; 3945 uses REPLY_RATE_SCALE. 1897 * For 4965 devices only; 3945 uses C_RATE_SCALE.
1898 * 1898 *
1899 * Each station in the 4965 device's internal station table has its own table 1899 * Each station in the 4965 device's internal station table has its own table
1900 * of 16 1900 * of 16
@@ -1903,7 +1903,7 @@ struct il_link_qual_agg_params {
1903 * one station. 1903 * one station.
1904 * 1904 *
1905 * NOTE: Station must already be in 4965 device's station table. 1905 * NOTE: Station must already be in 4965 device's station table.
1906 * Use REPLY_ADD_STA. 1906 * Use C_ADD_STA.
1907 * 1907 *
1908 * The rate scaling procedures described below work well. Of course, other 1908 * The rate scaling procedures described below work well. Of course, other
1909 * procedures are possible, and may work better for particular environments. 1909 * procedures are possible, and may work better for particular environments.
@@ -2117,7 +2117,7 @@ struct il_link_quality_cmd {
2117#define BT_MAX_KILL_DEF (0x5) 2117#define BT_MAX_KILL_DEF (0x5)
2118 2118
2119/* 2119/*
2120 * REPLY_BT_CONFIG = 0x9b (command, has simple generic response) 2120 * C_BT_CONFIG = 0x9b (command, has simple generic response)
2121 * 2121 *
2122 * 3945 and 4965 devices support hardware handshake with Bluetooth device on 2122 * 3945 and 4965 devices support hardware handshake with Bluetooth device on
2123 * same platform. Bluetooth device alerts wireless device when it will Tx; 2123 * same platform. Bluetooth device alerts wireless device when it will Tx;
@@ -2159,7 +2159,7 @@ struct il_measure_channel {
2159} __packed; 2159} __packed;
2160 2160
2161/* 2161/*
2162 * REPLY_SPECTRUM_MEASUREMENT_CMD = 0x74 (command) 2162 * C_SPECTRUM_MEASUREMENT = 0x74 (command)
2163 */ 2163 */
2164struct il_spectrum_cmd { 2164struct il_spectrum_cmd {
2165 __le16 len; /* number of bytes starting from token */ 2165 __le16 len; /* number of bytes starting from token */
@@ -2178,7 +2178,7 @@ struct il_spectrum_cmd {
2178} __packed; 2178} __packed;
2179 2179
2180/* 2180/*
2181 * REPLY_SPECTRUM_MEASUREMENT_CMD = 0x74 (response) 2181 * C_SPECTRUM_MEASUREMENT = 0x74 (response)
2182 */ 2182 */
2183struct il_spectrum_resp { 2183struct il_spectrum_resp {
2184 u8 token; 2184 u8 token;
@@ -2228,7 +2228,7 @@ enum il_measure_type {
2228}; 2228};
2229 2229
2230/* 2230/*
2231 * SPECTRUM_MEASURE_NOTIFICATION = 0x75 (notification only, not a command) 2231 * N_SPECTRUM_MEASUREMENT = 0x75 (notification only, not a command)
2232 */ 2232 */
2233struct il_spectrum_notification { 2233struct il_spectrum_notification {
2234 u8 id; /* measurement id -- 0 or 1 */ 2234 u8 id; /* measurement id -- 0 or 1 */
@@ -2263,7 +2263,7 @@ struct il_spectrum_notification {
2263 * struct il_powertable_cmd - Power Table Command 2263 * struct il_powertable_cmd - Power Table Command
2264 * @flags: See below: 2264 * @flags: See below:
2265 * 2265 *
2266 * POWER_TBL_CMD = 0x77 (command, has simple generic response) 2266 * C_POWER_TBL = 0x77 (command, has simple generic response)
2267 * 2267 *
2268 * PM allow: 2268 * PM allow:
2269 * bit 0 - '0' Driver not allow power management 2269 * bit 0 - '0' Driver not allow power management
@@ -2318,7 +2318,7 @@ struct il_powertable_cmd {
2318} __packed; 2318} __packed;
2319 2319
2320/* 2320/*
2321 * PM_SLEEP_NOTIFICATION = 0x7A (notification only, not a command) 2321 * N_PM_SLEEP = 0x7A (notification only, not a command)
2322 * all devices identical. 2322 * all devices identical.
2323 */ 2323 */
2324struct il_sleep_notification { 2324struct il_sleep_notification {
@@ -2346,7 +2346,7 @@ enum {
2346}; 2346};
2347 2347
2348/* 2348/*
2349 * CARD_STATE_NOTIFICATION = 0xa1 (notification only, not a command) 2349 * N_CARD_STATE = 0xa1 (notification only, not a command)
2350 */ 2350 */
2351struct il_card_state_notif { 2351struct il_card_state_notif {
2352 __le32 flags; 2352 __le32 flags;
@@ -2373,7 +2373,7 @@ struct il_ct_kill_config {
2373#define SCAN_CHANNEL_TYPE_ACTIVE cpu_to_le32(1) 2373#define SCAN_CHANNEL_TYPE_ACTIVE cpu_to_le32(1)
2374 2374
2375/** 2375/**
2376 * struct il_scan_channel - entry in REPLY_SCAN_CMD channel table 2376 * struct il_scan_channel - entry in C_SCAN channel table
2377 * 2377 *
2378 * One for each channel in the scan list. 2378 * One for each channel in the scan list.
2379 * Each channel can independently select: 2379 * Each channel can independently select:
@@ -2431,7 +2431,7 @@ struct il_scan_channel {
2431/** 2431/**
2432 * struct il_ssid_ie - directed scan network information element 2432 * struct il_ssid_ie - directed scan network information element
2433 * 2433 *
2434 * Up to 20 of these may appear in REPLY_SCAN_CMD (Note: Only 4 are in 2434 * Up to 20 of these may appear in C_SCAN (Note: Only 4 are in
2435 * 3945 SCAN api), selected by "type" bit field in struct il_scan_channel; 2435 * 3945 SCAN api), selected by "type" bit field in struct il_scan_channel;
2436 * each channel may select different ssids from among the 20 (4) entries. 2436 * each channel may select different ssids from among the 20 (4) entries.
2437 * SSID IEs get transmitted in reverse order of entry. 2437 * SSID IEs get transmitted in reverse order of entry.
@@ -2452,7 +2452,7 @@ struct il_ssid_ie {
2452#define IL_MAX_CMD_SIZE 4096 2452#define IL_MAX_CMD_SIZE 4096
2453 2453
2454/* 2454/*
2455 * REPLY_SCAN_CMD = 0x80 (command) 2455 * C_SCAN = 0x80 (command)
2456 * 2456 *
2457 * The hardware scan command is very powerful; the driver can set it up to 2457 * The hardware scan command is very powerful; the driver can set it up to
2458 * maintain (relatively) normal network traffic while doing a scan in the 2458 * maintain (relatively) normal network traffic while doing a scan in the
@@ -2542,7 +2542,7 @@ struct il3945_scan_cmd {
2542 * 2542 *
2543 * NOTE: Only one band of channels can be scanned per pass. You 2543 * NOTE: Only one band of channels can be scanned per pass. You
2544 * must not mix 2.4GHz channels and 5.2GHz channels, and you must wait 2544 * must not mix 2.4GHz channels and 5.2GHz channels, and you must wait
2545 * for one scan to complete (i.e. receive SCAN_COMPLETE_NOTIFICATION) 2545 * for one scan to complete (i.e. receive N_SCAN_COMPLETE)
2546 * before requesting another scan. 2546 * before requesting another scan.
2547 */ 2547 */
2548 u8 data[0]; 2548 u8 data[0];
@@ -2586,7 +2586,7 @@ struct il_scan_cmd {
2586 * 2586 *
2587 * NOTE: Only one band of channels can be scanned per pass. You 2587 * NOTE: Only one band of channels can be scanned per pass. You
2588 * must not mix 2.4GHz channels and 5.2GHz channels, and you must wait 2588 * must not mix 2.4GHz channels and 5.2GHz channels, and you must wait
2589 * for one scan to complete (i.e. receive SCAN_COMPLETE_NOTIFICATION) 2589 * for one scan to complete (i.e. receive N_SCAN_COMPLETE)
2590 * before requesting another scan. 2590 * before requesting another scan.
2591 */ 2591 */
2592 u8 data[0]; 2592 u8 data[0];
@@ -2598,14 +2598,14 @@ struct il_scan_cmd {
2598#define ABORT_STATUS 0x2 2598#define ABORT_STATUS 0x2
2599 2599
2600/* 2600/*
2601 * REPLY_SCAN_CMD = 0x80 (response) 2601 * C_SCAN = 0x80 (response)
2602 */ 2602 */
2603struct il_scanreq_notification { 2603struct il_scanreq_notification {
2604 __le32 status; /* 1: okay, 2: cannot fulfill request */ 2604 __le32 status; /* 1: okay, 2: cannot fulfill request */
2605} __packed; 2605} __packed;
2606 2606
2607/* 2607/*
2608 * SCAN_START_NOTIFICATION = 0x82 (notification only, not a command) 2608 * N_SCAN_START = 0x82 (notification only, not a command)
2609 */ 2609 */
2610struct il_scanstart_notification { 2610struct il_scanstart_notification {
2611 __le32 tsf_low; 2611 __le32 tsf_low;
@@ -2628,7 +2628,7 @@ struct il_scanstart_notification {
2628 2628
2629#define NUMBER_OF_STATS 1 /* first __le32 is good CRC */ 2629#define NUMBER_OF_STATS 1 /* first __le32 is good CRC */
2630/* 2630/*
2631 * SCAN_RESULTS_NOTIFICATION = 0x83 (notification only, not a command) 2631 * N_SCAN_RESULTS = 0x83 (notification only, not a command)
2632 */ 2632 */
2633struct il_scanresults_notification { 2633struct il_scanresults_notification {
2634 u8 channel; 2634 u8 channel;
@@ -2641,7 +2641,7 @@ struct il_scanresults_notification {
2641} __packed; 2641} __packed;
2642 2642
2643/* 2643/*
2644 * SCAN_COMPLETE_NOTIFICATION = 0x84 (notification only, not a command) 2644 * N_SCAN_COMPLETE = 0x84 (notification only, not a command)
2645 */ 2645 */
2646struct il_scancomplete_notification { 2646struct il_scancomplete_notification {
2647 u8 scanned_channels; 2647 u8 scanned_channels;
@@ -2664,7 +2664,7 @@ enum il_ibss_manager {
2664}; 2664};
2665 2665
2666/* 2666/*
2667 * BEACON_NOTIFICATION = 0x90 (notification only, not a command) 2667 * N_BEACON = 0x90 (notification only, not a command)
2668 */ 2668 */
2669 2669
2670struct il3945_beacon_notif { 2670struct il3945_beacon_notif {
@@ -2682,7 +2682,7 @@ struct il4965_beacon_notif {
2682} __packed; 2682} __packed;
2683 2683
2684/* 2684/*
2685 * REPLY_TX_BEACON = 0x91 (command, has simple generic response) 2685 * C_TX_BEACON= 0x91 (command, has simple generic response)
2686 */ 2686 */
2687 2687
2688struct il3945_tx_beacon_cmd { 2688struct il3945_tx_beacon_cmd {
@@ -2963,19 +2963,19 @@ struct stats_general {
2963#define UCODE_STATS_NARROW_BAND_MSK (0x1 << 2) 2963#define UCODE_STATS_NARROW_BAND_MSK (0x1 << 2)
2964 2964
2965/* 2965/*
2966 * REPLY_STATS_CMD = 0x9c, 2966 * C_STATS = 0x9c,
2967 * all devices identical. 2967 * all devices identical.
2968 * 2968 *
2969 * This command triggers an immediate response containing uCode stats. 2969 * This command triggers an immediate response containing uCode stats.
2970 * The response is in the same format as STATS_NOTIFICATION 0x9d, below. 2970 * The response is in the same format as N_STATS 0x9d, below.
2971 * 2971 *
2972 * If the CLEAR_STATS configuration flag is set, uCode will clear its 2972 * If the CLEAR_STATS configuration flag is set, uCode will clear its
2973 * internal copy of the stats (counters) after issuing the response. 2973 * internal copy of the stats (counters) after issuing the response.
2974 * This flag does not affect STATS_NOTIFICATIONs after beacons (see below). 2974 * This flag does not affect N_STATSs after beacons (see below).
2975 * 2975 *
2976 * If the DISABLE_NOTIF configuration flag is set, uCode will not issue 2976 * If the DISABLE_NOTIF configuration flag is set, uCode will not issue
2977 * STATS_NOTIFICATIONs after received beacons (see below). This flag 2977 * N_STATSs after received beacons (see below). This flag
2978 * does not affect the response to the REPLY_STATS_CMD 0x9c itself. 2978 * does not affect the response to the C_STATS 0x9c itself.
2979 */ 2979 */
2980#define IL_STATS_CONF_CLEAR_STATS cpu_to_le32(0x1) /* see above */ 2980#define IL_STATS_CONF_CLEAR_STATS cpu_to_le32(0x1) /* see above */
2981#define IL_STATS_CONF_DISABLE_NOTIF cpu_to_le32(0x2)/* see above */ 2981#define IL_STATS_CONF_DISABLE_NOTIF cpu_to_le32(0x2)/* see above */
@@ -2984,14 +2984,14 @@ struct il_stats_cmd {
2984} __packed; 2984} __packed;
2985 2985
2986/* 2986/*
2987 * STATS_NOTIFICATION = 0x9d (notification only, not a command) 2987 * N_STATS = 0x9d (notification only, not a command)
2988 * 2988 *
2989 * By default, uCode issues this notification after receiving a beacon 2989 * By default, uCode issues this notification after receiving a beacon
2990 * while associated. To disable this behavior, set DISABLE_NOTIF flag in the 2990 * while associated. To disable this behavior, set DISABLE_NOTIF flag in the
2991 * REPLY_STATS_CMD 0x9c, above. 2991 * C_STATS 0x9c, above.
2992 * 2992 *
2993 * Statistics counters continue to increment beacon after beacon, but are 2993 * Statistics counters continue to increment beacon after beacon, but are
2994 * cleared when changing channels or when driver issues REPLY_STATS_CMD 2994 * cleared when changing channels or when driver issues C_STATS
2995 * 0x9c with CLEAR_STATS bit set (see above). 2995 * 0x9c with CLEAR_STATS bit set (see above).
2996 * 2996 *
2997 * uCode also issues this notification during scans. uCode clears stats 2997 * uCode also issues this notification during scans. uCode clears stats
@@ -3016,9 +3016,9 @@ struct il_notif_stats {
3016} __packed; 3016} __packed;
3017 3017
3018/* 3018/*
3019 * MISSED_BEACONS_NOTIFICATION = 0xa2 (notification only, not a command) 3019 * N_MISSED_BEACONS = 0xa2 (notification only, not a command)
3020 * 3020 *
3021 * uCode send MISSED_BEACONS_NOTIFICATION to driver when detect beacon missed 3021 * uCode send N_MISSED_BEACONS to driver when detect beacon missed
3022 * in regardless of how many missed beacons, which mean when driver receive the 3022 * in regardless of how many missed beacons, which mean when driver receive the
3023 * notification, inside the command, it can find all the beacons information 3023 * notification, inside the command, it can find all the beacons information
3024 * which include number of total missed beacons, number of consecutive missed 3024 * which include number of total missed beacons, number of consecutive missed
@@ -3062,7 +3062,7 @@ struct il_missed_beacon_notif {
3062 *****************************************************************************/ 3062 *****************************************************************************/
3063 3063
3064/** 3064/**
3065 * SENSITIVITY_CMD = 0xa8 (command, has simple generic response) 3065 * C_SENSITIVITY = 0xa8 (command, has simple generic response)
3066 * 3066 *
3067 * This command sets up the Rx signal detector for a sensitivity level that 3067 * This command sets up the Rx signal detector for a sensitivity level that
3068 * is high enough to lock onto all signals within the associated network, 3068 * is high enough to lock onto all signals within the associated network,
@@ -3076,7 +3076,7 @@ struct il_missed_beacon_notif {
3076 * time listening, not transmitting). Driver must adjust sensitivity so that 3076 * time listening, not transmitting). Driver must adjust sensitivity so that
3077 * the ratio of actual false alarms to actual Rx time falls within this range. 3077 * the ratio of actual false alarms to actual Rx time falls within this range.
3078 * 3078 *
3079 * While associated, uCode delivers STATS_NOTIFICATIONs after each 3079 * While associated, uCode delivers N_STATSs after each
3080 * received beacon. These provide information to the driver to analyze the 3080 * received beacon. These provide information to the driver to analyze the
3081 * sensitivity. Don't analyze stats that come in from scanning, or any 3081 * sensitivity. Don't analyze stats that come in from scanning, or any
3082 * other non-associated-network source. Pertinent stats include: 3082 * other non-associated-network source. Pertinent stats include:
@@ -3217,7 +3217,7 @@ struct il_missed_beacon_notif {
3217 */ 3217 */
3218 3218
3219/* 3219/*
3220 * Table entries in SENSITIVITY_CMD (struct il_sensitivity_cmd) 3220 * Table entries in C_SENSITIVITY (struct il_sensitivity_cmd)
3221 */ 3221 */
3222#define HD_TBL_SIZE (11) /* number of entries */ 3222#define HD_TBL_SIZE (11) /* number of entries */
3223#define HD_MIN_ENERGY_CCK_DET_IDX (0) /* table idxes */ 3223#define HD_MIN_ENERGY_CCK_DET_IDX (0) /* table idxes */
@@ -3233,8 +3233,8 @@ struct il_missed_beacon_notif {
3233#define HD_OFDM_ENERGY_TH_IN_IDX (10) 3233#define HD_OFDM_ENERGY_TH_IN_IDX (10)
3234 3234
3235/* Control field in struct il_sensitivity_cmd */ 3235/* Control field in struct il_sensitivity_cmd */
3236#define SENSITIVITY_CMD_CONTROL_DEFAULT_TBL cpu_to_le16(0) 3236#define C_SENSITIVITY_CONTROL_DEFAULT_TBL cpu_to_le16(0)
3237#define SENSITIVITY_CMD_CONTROL_WORK_TBL cpu_to_le16(1) 3237#define C_SENSITIVITY_CONTROL_WORK_TBL cpu_to_le16(1)
3238 3238
3239/** 3239/**
3240 * struct il_sensitivity_cmd 3240 * struct il_sensitivity_cmd
@@ -3250,12 +3250,12 @@ struct il_sensitivity_cmd {
3250 3250
3251 3251
3252/** 3252/**
3253 * REPLY_PHY_CALIBRATION_CMD = 0xb0 (command, has simple generic response) 3253 * C_PHY_CALIBRATION = 0xb0 (command, has simple generic response)
3254 * 3254 *
3255 * This command sets the relative gains of 4965 device's 3 radio receiver chains. 3255 * This command sets the relative gains of 4965 device's 3 radio receiver chains.
3256 * 3256 *
3257 * After the first association, driver should accumulate signal and noise 3257 * After the first association, driver should accumulate signal and noise
3258 * stats from the STATS_NOTIFICATIONs that follow the first 20 3258 * stats from the N_STATSs that follow the first 20
3259 * beacons from the associated network (don't collect stats that come 3259 * beacons from the associated network (don't collect stats that come
3260 * in from scanning, or any other non-network source). 3260 * in from scanning, or any other non-network source).
3261 * 3261 *
@@ -3338,7 +3338,7 @@ struct il_calib_diff_gain_cmd {
3338 3338
3339/* 3339/*
3340 * LEDs Command & Response 3340 * LEDs Command & Response
3341 * REPLY_LEDS_CMD = 0x48 (command, has simple generic response) 3341 * C_LEDS = 0x48 (command, has simple generic response)
3342 * 3342 *
3343 * For each of 3 possible LEDs (Activity/Link/Tech, selected by "id" field), 3343 * For each of 3 possible LEDs (Activity/Link/Tech, selected by "id" field),
3344 * this command turns it on or off, or sets up a periodic blinking cycle. 3344 * this command turns it on or off, or sets up a periodic blinking cycle.
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c b/drivers/net/wireless/iwlegacy/iwl-core.c
index e6c7d5f77e78..baed3dc082dc 100644
--- a/drivers/net/wireless/iwlegacy/iwl-core.c
+++ b/drivers/net/wireless/iwlegacy/iwl-core.c
@@ -1165,7 +1165,7 @@ void il_send_bt_config(struct il_priv *il)
1165 D_INFO("BT coex %s\n", 1165 D_INFO("BT coex %s\n",
1166 (bt_cmd.flags == BT_COEX_DISABLE) ? "disable" : "active"); 1166 (bt_cmd.flags == BT_COEX_DISABLE) ? "disable" : "active");
1167 1167
1168 if (il_send_cmd_pdu(il, REPLY_BT_CONFIG, 1168 if (il_send_cmd_pdu(il, C_BT_CONFIG,
1169 sizeof(struct il_bt_cmd), &bt_cmd)) 1169 sizeof(struct il_bt_cmd), &bt_cmd))
1170 IL_ERR("failed to send BT Coex Config\n"); 1170 IL_ERR("failed to send BT Coex Config\n");
1171} 1171}
@@ -1179,11 +1179,11 @@ int il_send_stats_request(struct il_priv *il, u8 flags, bool clear)
1179 }; 1179 };
1180 1180
1181 if (flags & CMD_ASYNC) 1181 if (flags & CMD_ASYNC)
1182 return il_send_cmd_pdu_async(il, REPLY_STATS_CMD, 1182 return il_send_cmd_pdu_async(il, C_STATS,
1183 sizeof(struct il_stats_cmd), 1183 sizeof(struct il_stats_cmd),
1184 &stats_cmd, NULL); 1184 &stats_cmd, NULL);
1185 else 1185 else
1186 return il_send_cmd_pdu(il, REPLY_STATS_CMD, 1186 return il_send_cmd_pdu(il, C_STATS,
1187 sizeof(struct il_stats_cmd), 1187 sizeof(struct il_stats_cmd),
1188 &stats_cmd); 1188 &stats_cmd);
1189} 1189}
diff --git a/drivers/net/wireless/iwlegacy/iwl-debugfs.c b/drivers/net/wireless/iwlegacy/iwl-debugfs.c
index b9888ac0f518..4076b79e593e 100644
--- a/drivers/net/wireless/iwlegacy/iwl-debugfs.c
+++ b/drivers/net/wireless/iwlegacy/iwl-debugfs.c
@@ -554,7 +554,7 @@ static ssize_t il_dbgfs_interrupt_read(struct file *file,
554 pos += scnprintf(buf + pos, bufsz - pos, 554 pos += scnprintf(buf + pos, bufsz - pos,
555 "Rx command responses:\t\t %u\n", 555 "Rx command responses:\t\t %u\n",
556 il->isr_stats.rx); 556 il->isr_stats.rx);
557 for (cnt = 0; cnt < REPLY_MAX; cnt++) { 557 for (cnt = 0; cnt < IL_CN_MAX; cnt++) {
558 if (il->isr_stats.rx_handlers[cnt] > 0) 558 if (il->isr_stats.rx_handlers[cnt] > 0)
559 pos += scnprintf(buf + pos, bufsz - pos, 559 pos += scnprintf(buf + pos, bufsz - pos,
560 "\tRx handler[%36s]:\t\t %u\n", 560 "\tRx handler[%36s]:\t\t %u\n",
diff --git a/drivers/net/wireless/iwlegacy/iwl-dev.h b/drivers/net/wireless/iwlegacy/iwl-dev.h
index f7c3b43ae049..1bc4a71ac00f 100644
--- a/drivers/net/wireless/iwlegacy/iwl-dev.h
+++ b/drivers/net/wireless/iwlegacy/iwl-dev.h
@@ -383,8 +383,8 @@ struct il_rx_queue {
383 * @bitmap1: High order, one bit for each frame pending ACK in Tx win 383 * @bitmap1: High order, one bit for each frame pending ACK in Tx win
384 * @rate_n_flags: Rate at which Tx was attempted 384 * @rate_n_flags: Rate at which Tx was attempted
385 * 385 *
386 * If REPLY_TX indicates that aggregation was attempted, driver must wait 386 * If C_TX indicates that aggregation was attempted, driver must wait
387 * for block ack (REPLY_COMPRESSED_BA). This struct stores tx reply info 387 * for block ack (N_COMPRESSED_BA). This struct stores tx reply info
388 * until block ack arrives. 388 * until block ack arrives.
389 */ 389 */
390struct il_ht_agg { 390struct il_ht_agg {
@@ -813,7 +813,7 @@ struct isr_stats {
813 u32 ctkill; 813 u32 ctkill;
814 u32 wakeup; 814 u32 wakeup;
815 u32 rx; 815 u32 rx;
816 u32 rx_handlers[REPLY_MAX]; 816 u32 rx_handlers[IL_CN_MAX];
817 u32 tx; 817 u32 tx;
818 u32 unhandled; 818 u32 unhandled;
819}; 819};
@@ -968,7 +968,7 @@ struct il_priv {
968 enum ieee80211_band band; 968 enum ieee80211_band band;
969 int alloc_rxb_page; 969 int alloc_rxb_page;
970 970
971 void (*rx_handlers[REPLY_MAX])(struct il_priv *il, 971 void (*rx_handlers[IL_CN_MAX])(struct il_priv *il,
972 struct il_rx_buf *rxb); 972 struct il_rx_buf *rxb);
973 973
974 struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; 974 struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
diff --git a/drivers/net/wireless/iwlegacy/iwl-hcmd.c b/drivers/net/wireless/iwlegacy/iwl-hcmd.c
index 19a59558e247..670a398e0975 100644
--- a/drivers/net/wireless/iwlegacy/iwl-hcmd.c
+++ b/drivers/net/wireless/iwlegacy/iwl-hcmd.c
@@ -40,47 +40,47 @@
40const char *il_get_cmd_string(u8 cmd) 40const char *il_get_cmd_string(u8 cmd)
41{ 41{
42 switch (cmd) { 42 switch (cmd) {
43 IL_CMD(REPLY_ALIVE); 43 IL_CMD(N_ALIVE);
44 IL_CMD(REPLY_ERROR); 44 IL_CMD(N_ERROR);
45 IL_CMD(REPLY_RXON); 45 IL_CMD(C_RXON);
46 IL_CMD(REPLY_RXON_ASSOC); 46 IL_CMD(C_RXON_ASSOC);
47 IL_CMD(REPLY_QOS_PARAM); 47 IL_CMD(C_QOS_PARAM);
48 IL_CMD(REPLY_RXON_TIMING); 48 IL_CMD(C_RXON_TIMING);
49 IL_CMD(REPLY_ADD_STA); 49 IL_CMD(C_ADD_STA);
50 IL_CMD(REPLY_REMOVE_STA); 50 IL_CMD(C_REM_STA);
51 IL_CMD(REPLY_WEPKEY); 51 IL_CMD(C_WEPKEY);
52 IL_CMD(REPLY_3945_RX); 52 IL_CMD(N_3945_RX);
53 IL_CMD(REPLY_TX); 53 IL_CMD(C_TX);
54 IL_CMD(REPLY_RATE_SCALE); 54 IL_CMD(C_RATE_SCALE);
55 IL_CMD(REPLY_LEDS_CMD); 55 IL_CMD(C_LEDS);
56 IL_CMD(REPLY_TX_LINK_QUALITY_CMD); 56 IL_CMD(C_TX_LINK_QUALITY_CMD);
57 IL_CMD(REPLY_CHANNEL_SWITCH); 57 IL_CMD(C_CHANNEL_SWITCH);
58 IL_CMD(CHANNEL_SWITCH_NOTIFICATION); 58 IL_CMD(N_CHANNEL_SWITCH);
59 IL_CMD(REPLY_SPECTRUM_MEASUREMENT_CMD); 59 IL_CMD(C_SPECTRUM_MEASUREMENT);
60 IL_CMD(SPECTRUM_MEASURE_NOTIFICATION); 60 IL_CMD(N_SPECTRUM_MEASUREMENT);
61 IL_CMD(POWER_TBL_CMD); 61 IL_CMD(C_POWER_TBL);
62 IL_CMD(PM_SLEEP_NOTIFICATION); 62 IL_CMD(N_PM_SLEEP);
63 IL_CMD(PM_DEBUG_STATISTIC_NOTIFIC); 63 IL_CMD(N_PM_DEBUG_STATS);
64 IL_CMD(REPLY_SCAN_CMD); 64 IL_CMD(C_SCAN);
65 IL_CMD(REPLY_SCAN_ABORT_CMD); 65 IL_CMD(C_SCAN_ABORT);
66 IL_CMD(SCAN_START_NOTIFICATION); 66 IL_CMD(N_SCAN_START);
67 IL_CMD(SCAN_RESULTS_NOTIFICATION); 67 IL_CMD(N_SCAN_RESULTS);
68 IL_CMD(SCAN_COMPLETE_NOTIFICATION); 68 IL_CMD(N_SCAN_COMPLETE);
69 IL_CMD(BEACON_NOTIFICATION); 69 IL_CMD(N_BEACON);
70 IL_CMD(REPLY_TX_BEACON); 70 IL_CMD(C_TX_BEACON);
71 IL_CMD(REPLY_TX_PWR_TBL_CMD); 71 IL_CMD(C_TX_PWR_TBL);
72 IL_CMD(REPLY_BT_CONFIG); 72 IL_CMD(C_BT_CONFIG);
73 IL_CMD(REPLY_STATS_CMD); 73 IL_CMD(C_STATS);
74 IL_CMD(STATS_NOTIFICATION); 74 IL_CMD(N_STATS);
75 IL_CMD(CARD_STATE_NOTIFICATION); 75 IL_CMD(N_CARD_STATE);
76 IL_CMD(MISSED_BEACONS_NOTIFICATION); 76 IL_CMD(N_MISSED_BEACONS);
77 IL_CMD(REPLY_CT_KILL_CONFIG_CMD); 77 IL_CMD(C_CT_KILL_CONFIG);
78 IL_CMD(SENSITIVITY_CMD); 78 IL_CMD(C_SENSITIVITY);
79 IL_CMD(REPLY_PHY_CALIBRATION_CMD); 79 IL_CMD(C_PHY_CALIBRATION);
80 IL_CMD(REPLY_RX_PHY_CMD); 80 IL_CMD(N_RX_PHY);
81 IL_CMD(REPLY_RX_MPDU_CMD); 81 IL_CMD(N_RX_MPDU);
82 IL_CMD(REPLY_RX); 82 IL_CMD(N_RX);
83 IL_CMD(REPLY_COMPRESSED_BA); 83 IL_CMD(N_COMPRESSED_BA);
84 default: 84 default:
85 return "UNKNOWN"; 85 return "UNKNOWN";
86 86
@@ -102,8 +102,8 @@ static void il_generic_cmd_callback(struct il_priv *il,
102 102
103#ifdef CONFIG_IWLEGACY_DEBUG 103#ifdef CONFIG_IWLEGACY_DEBUG
104 switch (cmd->hdr.cmd) { 104 switch (cmd->hdr.cmd) {
105 case REPLY_TX_LINK_QUALITY_CMD: 105 case C_TX_LINK_QUALITY_CMD:
106 case SENSITIVITY_CMD: 106 case C_SENSITIVITY:
107 D_HC_DUMP("back from %s (0x%08X)\n", 107 D_HC_DUMP("back from %s (0x%08X)\n",
108 il_get_cmd_string(cmd->hdr.cmd), pkt->hdr.flags); 108 il_get_cmd_string(cmd->hdr.cmd), pkt->hdr.flags);
109 break; 109 break;
diff --git a/drivers/net/wireless/iwlegacy/iwl-power.c b/drivers/net/wireless/iwlegacy/iwl-power.c
index c66a0f77dc32..2b06a95f97f0 100644
--- a/drivers/net/wireless/iwlegacy/iwl-power.c
+++ b/drivers/net/wireless/iwlegacy/iwl-power.c
@@ -88,7 +88,7 @@ il_set_power(struct il_priv *il, struct il_powertable_cmd *cmd)
88 le32_to_cpu(cmd->sleep_interval[3]), 88 le32_to_cpu(cmd->sleep_interval[3]),
89 le32_to_cpu(cmd->sleep_interval[4])); 89 le32_to_cpu(cmd->sleep_interval[4]));
90 90
91 return il_send_cmd_pdu(il, POWER_TBL_CMD, 91 return il_send_cmd_pdu(il, C_POWER_TBL,
92 sizeof(struct il_powertable_cmd), cmd); 92 sizeof(struct il_powertable_cmd), cmd);
93} 93}
94 94
diff --git a/drivers/net/wireless/iwlegacy/iwl-prph.h b/drivers/net/wireless/iwlegacy/iwl-prph.h
index b0bf6848bd1d..029ea8a83dff 100644
--- a/drivers/net/wireless/iwlegacy/iwl-prph.h
+++ b/drivers/net/wireless/iwlegacy/iwl-prph.h
@@ -189,7 +189,7 @@
189 * procedure. 189 * procedure.
190 * 190 *
191 * This save/restore method is mostly for autonomous power management during 191 * This save/restore method is mostly for autonomous power management during
192 * normal operation (result of POWER_TBL_CMD). Platform suspend/resume and 192 * normal operation (result of C_POWER_TBL). Platform suspend/resume and
193 * RFKILL should use complete restarts (with total re-initialization) of uCode, 193 * RFKILL should use complete restarts (with total re-initialization) of uCode,
194 * allowing total shutdown (including BSM memory). 194 * allowing total shutdown (including BSM memory).
195 * 195 *
diff --git a/drivers/net/wireless/iwlegacy/iwl-scan.c b/drivers/net/wireless/iwlegacy/iwl-scan.c
index 6d20f2b64c3e..1f81d56ad8ac 100644
--- a/drivers/net/wireless/iwlegacy/iwl-scan.c
+++ b/drivers/net/wireless/iwlegacy/iwl-scan.c
@@ -59,7 +59,7 @@ static int il_send_scan_abort(struct il_priv *il)
59 int ret; 59 int ret;
60 struct il_rx_pkt *pkt; 60 struct il_rx_pkt *pkt;
61 struct il_host_cmd cmd = { 61 struct il_host_cmd cmd = {
62 .id = REPLY_SCAN_ABORT_CMD, 62 .id = C_SCAN_ABORT,
63 .flags = CMD_WANT_SKB, 63 .flags = CMD_WANT_SKB,
64 }; 64 };
65 65
@@ -181,7 +181,7 @@ int il_scan_cancel_timeout(struct il_priv *il, unsigned long ms)
181} 181}
182EXPORT_SYMBOL(il_scan_cancel_timeout); 182EXPORT_SYMBOL(il_scan_cancel_timeout);
183 183
184/* Service response to REPLY_SCAN_CMD (0x80) */ 184/* Service response to C_SCAN (0x80) */
185static void il_rx_reply_scan(struct il_priv *il, 185static void il_rx_reply_scan(struct il_priv *il,
186 struct il_rx_buf *rxb) 186 struct il_rx_buf *rxb)
187{ 187{
@@ -194,7 +194,7 @@ static void il_rx_reply_scan(struct il_priv *il,
194#endif 194#endif
195} 195}
196 196
197/* Service SCAN_START_NOTIFICATION (0x82) */ 197/* Service N_SCAN_START (0x82) */
198static void il_rx_scan_start_notif(struct il_priv *il, 198static void il_rx_scan_start_notif(struct il_priv *il,
199 struct il_rx_buf *rxb) 199 struct il_rx_buf *rxb)
200{ 200{
@@ -212,7 +212,7 @@ static void il_rx_scan_start_notif(struct il_priv *il,
212 notif->status, notif->beacon_timer); 212 notif->status, notif->beacon_timer);
213} 213}
214 214
215/* Service SCAN_RESULTS_NOTIFICATION (0x83) */ 215/* Service N_SCAN_RESULTS (0x83) */
216static void il_rx_scan_results_notif(struct il_priv *il, 216static void il_rx_scan_results_notif(struct il_priv *il,
217 struct il_rx_buf *rxb) 217 struct il_rx_buf *rxb)
218{ 218{
@@ -234,7 +234,7 @@ static void il_rx_scan_results_notif(struct il_priv *il,
234#endif 234#endif
235} 235}
236 236
237/* Service SCAN_COMPLETE_NOTIFICATION (0x84) */ 237/* Service N_SCAN_COMPLETE (0x84) */
238static void il_rx_scan_complete_notif(struct il_priv *il, 238static void il_rx_scan_complete_notif(struct il_priv *il,
239 struct il_rx_buf *rxb) 239 struct il_rx_buf *rxb)
240{ 240{
@@ -263,12 +263,12 @@ static void il_rx_scan_complete_notif(struct il_priv *il,
263void il_setup_rx_scan_handlers(struct il_priv *il) 263void il_setup_rx_scan_handlers(struct il_priv *il)
264{ 264{
265 /* scan handlers */ 265 /* scan handlers */
266 il->rx_handlers[REPLY_SCAN_CMD] = il_rx_reply_scan; 266 il->rx_handlers[C_SCAN] = il_rx_reply_scan;
267 il->rx_handlers[SCAN_START_NOTIFICATION] = 267 il->rx_handlers[N_SCAN_START] =
268 il_rx_scan_start_notif; 268 il_rx_scan_start_notif;
269 il->rx_handlers[SCAN_RESULTS_NOTIFICATION] = 269 il->rx_handlers[N_SCAN_RESULTS] =
270 il_rx_scan_results_notif; 270 il_rx_scan_results_notif;
271 il->rx_handlers[SCAN_COMPLETE_NOTIFICATION] = 271 il->rx_handlers[N_SCAN_COMPLETE] =
272 il_rx_scan_complete_notif; 272 il_rx_scan_complete_notif;
273} 273}
274EXPORT_SYMBOL(il_setup_rx_scan_handlers); 274EXPORT_SYMBOL(il_setup_rx_scan_handlers);
diff --git a/drivers/net/wireless/iwlegacy/iwl-sta.c b/drivers/net/wireless/iwlegacy/iwl-sta.c
index ffb966bf836d..58762e795f36 100644
--- a/drivers/net/wireless/iwlegacy/iwl-sta.c
+++ b/drivers/net/wireless/iwlegacy/iwl-sta.c
@@ -67,7 +67,7 @@ static int il_process_add_sta_resp(struct il_priv *il,
67 int ret = -EIO; 67 int ret = -EIO;
68 68
69 if (pkt->hdr.flags & IL_CMD_FAILED_MSK) { 69 if (pkt->hdr.flags & IL_CMD_FAILED_MSK) {
70 IL_ERR("Bad return from REPLY_ADD_STA (0x%08X)\n", 70 IL_ERR("Bad return from C_ADD_STA (0x%08X)\n",
71 pkt->hdr.flags); 71 pkt->hdr.flags);
72 return ret; 72 return ret;
73 } 73 }
@@ -79,7 +79,7 @@ static int il_process_add_sta_resp(struct il_priv *il,
79 79
80 switch (pkt->u.add_sta.status) { 80 switch (pkt->u.add_sta.status) {
81 case ADD_STA_SUCCESS_MSK: 81 case ADD_STA_SUCCESS_MSK:
82 D_INFO("REPLY_ADD_STA PASSED\n"); 82 D_INFO("C_ADD_STA PASSED\n");
83 il_sta_ucode_activate(il, sta_id); 83 il_sta_ucode_activate(il, sta_id);
84 ret = 0; 84 ret = 0;
85 break; 85 break;
@@ -97,7 +97,7 @@ static int il_process_add_sta_resp(struct il_priv *il,
97 sta_id); 97 sta_id);
98 break; 98 break;
99 default: 99 default:
100 D_ASSOC("Received REPLY_ADD_STA:(0x%08X)\n", 100 D_ASSOC("Received C_ADD_STA:(0x%08X)\n",
101 pkt->u.add_sta.status); 101 pkt->u.add_sta.status);
102 break; 102 break;
103 } 103 }
@@ -142,7 +142,7 @@ int il_send_add_sta(struct il_priv *il,
142 int ret = 0; 142 int ret = 0;
143 u8 data[sizeof(*sta)]; 143 u8 data[sizeof(*sta)];
144 struct il_host_cmd cmd = { 144 struct il_host_cmd cmd = {
145 .id = REPLY_ADD_STA, 145 .id = C_ADD_STA,
146 .flags = flags, 146 .flags = flags,
147 .data = data, 147 .data = data,
148 }; 148 };
@@ -290,7 +290,7 @@ u8 il_prep_station(struct il_priv *il, struct il_rxon_context *ctx,
290 sta_id, addr); 290 sta_id, addr);
291 il->num_stations++; 291 il->num_stations++;
292 292
293 /* Set up the REPLY_ADD_STA command to send to device */ 293 /* Set up the C_ADD_STA command to send to device */
294 memset(&station->sta, 0, sizeof(struct il_addsta_cmd)); 294 memset(&station->sta, 0, sizeof(struct il_addsta_cmd));
295 memcpy(station->sta.sta.addr, addr, ETH_ALEN); 295 memcpy(station->sta.sta.addr, addr, ETH_ALEN);
296 station->sta.mode = 0; 296 station->sta.mode = 0;
@@ -421,7 +421,7 @@ static int il_send_remove_station(struct il_priv *il,
421 struct il_rem_sta_cmd rm_sta_cmd; 421 struct il_rem_sta_cmd rm_sta_cmd;
422 422
423 struct il_host_cmd cmd = { 423 struct il_host_cmd cmd = {
424 .id = REPLY_REMOVE_STA, 424 .id = C_REM_STA,
425 .len = sizeof(struct il_rem_sta_cmd), 425 .len = sizeof(struct il_rem_sta_cmd),
426 .flags = CMD_SYNC, 426 .flags = CMD_SYNC,
427 .data = &rm_sta_cmd, 427 .data = &rm_sta_cmd,
@@ -440,7 +440,7 @@ static int il_send_remove_station(struct il_priv *il,
440 440
441 pkt = (struct il_rx_pkt *)cmd.reply_page; 441 pkt = (struct il_rx_pkt *)cmd.reply_page;
442 if (pkt->hdr.flags & IL_CMD_FAILED_MSK) { 442 if (pkt->hdr.flags & IL_CMD_FAILED_MSK) {
443 IL_ERR("Bad return from REPLY_REMOVE_STA (0x%08X)\n", 443 IL_ERR("Bad return from C_REM_STA (0x%08X)\n",
444 pkt->hdr.flags); 444 pkt->hdr.flags);
445 ret = -EIO; 445 ret = -EIO;
446 } 446 }
@@ -454,11 +454,11 @@ static int il_send_remove_station(struct il_priv *il,
454 spin_unlock_irqrestore(&il->sta_lock, 454 spin_unlock_irqrestore(&il->sta_lock,
455 flags_spin); 455 flags_spin);
456 } 456 }
457 D_ASSOC("REPLY_REMOVE_STA PASSED\n"); 457 D_ASSOC("C_REM_STA PASSED\n");
458 break; 458 break;
459 default: 459 default:
460 ret = -EIO; 460 ret = -EIO;
461 IL_ERR("REPLY_REMOVE_STA failed\n"); 461 IL_ERR("C_REM_STA failed\n");
462 break; 462 break;
463 } 463 }
464 } 464 }
@@ -753,7 +753,7 @@ int il_send_lq_cmd(struct il_priv *il, struct il_rxon_context *ctx,
753 unsigned long flags_spin; 753 unsigned long flags_spin;
754 754
755 struct il_host_cmd cmd = { 755 struct il_host_cmd cmd = {
756 .id = REPLY_TX_LINK_QUALITY_CMD, 756 .id = C_TX_LINK_QUALITY_CMD,
757 .len = sizeof(struct il_link_quality_cmd), 757 .len = sizeof(struct il_link_quality_cmd),
758 .flags = flags, 758 .flags = flags,
759 .data = lq, 759 .data = lq,
diff --git a/drivers/net/wireless/iwlegacy/iwl-tx.c b/drivers/net/wireless/iwlegacy/iwl-tx.c
index 3f97d09fa00a..3b588b39fd67 100644
--- a/drivers/net/wireless/iwlegacy/iwl-tx.c
+++ b/drivers/net/wireless/iwlegacy/iwl-tx.c
@@ -509,8 +509,8 @@ int il_enqueue_hcmd(struct il_priv *il, struct il_host_cmd *cmd)
509 509
510#ifdef CONFIG_IWLEGACY_DEBUG 510#ifdef CONFIG_IWLEGACY_DEBUG
511 switch (out_cmd->hdr.cmd) { 511 switch (out_cmd->hdr.cmd) {
512 case REPLY_TX_LINK_QUALITY_CMD: 512 case C_TX_LINK_QUALITY_CMD:
513 case SENSITIVITY_CMD: 513 case C_SENSITIVITY:
514 D_HC_DUMP( 514 D_HC_DUMP(
515 "Sending command %s (#%x), seq: 0x%04X, " 515 "Sending command %s (#%x), seq: 0x%04X, "
516 "%d bytes at %d[%d]:%d\n", 516 "%d bytes at %d[%d]:%d\n",