frame_size = il3945_hw_get_beacon_cmd(il, frame, rate);
- rc = il_send_cmd_pdu(il, REPLY_TX_BEACON, frame_size,
+ rc = il_send_cmd_pdu(il, C_TX_BEACON, frame_size,
&frame->u.cmd[0]);
il3945_free_frame(il, frame);
}
/*
- * handle build REPLY_TX command notification.
+ * handle build C_TX command notification.
*/
static void il3945_build_tx_cmd_basic(struct il_priv *il,
struct il_device_cmd *cmd,
}
/*
- * start REPLY_TX command process
+ * start C_TX command process
*/
static int il3945_tx_skb(struct il_priv *il, struct sk_buff *skb)
{
* after Tx, uCode's Tx response will return this value so driver can
* locate the frame within the tx queue and do post-tx processing.
*/
- out_cmd->hdr.cmd = REPLY_TX;
+ out_cmd->hdr.cmd = C_TX;
out_cmd->hdr.sequence = cpu_to_le16((u16)(QUEUE_TO_SEQ(txq_id) |
IDX_TO_SEQ(q->write_ptr)));
struct il_spectrum_cmd spectrum;
struct il_rx_pkt *pkt;
struct il_host_cmd cmd = {
- .id = REPLY_SPECTRUM_MEASUREMENT_CMD,
+ .id = C_SPECTRUM_MEASUREMENT,
.data = (void *)&spectrum,
.flags = CMD_WANT_SKB,
};
pkt = (struct il_rx_pkt *)cmd.reply_page;
if (pkt->hdr.flags & IL_CMD_FAILED_MSK) {
- IL_ERR("Bad return from REPLY_RX_ON_ASSOC command\n");
+ IL_ERR("Bad return from N_RX_ON_ASSOC command\n");
rc = -EIO;
}
struct il_rx_pkt *pkt = rxb_addr(rxb);
#endif
- D_RX("Received REPLY_ADD_STA: 0x%02X\n", pkt->u.status);
+ D_RX("Received C_ADD_STA: 0x%02X\n", pkt->u.status);
}
static void il3945_rx_beacon_notif(struct il_priv *il,
*/
static void il3945_setup_rx_handlers(struct il_priv *il)
{
- il->rx_handlers[REPLY_ALIVE] = il3945_rx_reply_alive;
- il->rx_handlers[REPLY_ADD_STA] = il3945_rx_reply_add_sta;
- il->rx_handlers[REPLY_ERROR] = il_rx_reply_error;
- il->rx_handlers[CHANNEL_SWITCH_NOTIFICATION] = il_rx_csa;
- il->rx_handlers[SPECTRUM_MEASURE_NOTIFICATION] =
+ il->rx_handlers[N_ALIVE] = il3945_rx_reply_alive;
+ il->rx_handlers[C_ADD_STA] = il3945_rx_reply_add_sta;
+ il->rx_handlers[N_ERROR] = il_rx_reply_error;
+ il->rx_handlers[N_CHANNEL_SWITCH] = il_rx_csa;
+ il->rx_handlers[N_SPECTRUM_MEASUREMENT] =
il_rx_spectrum_measure_notif;
- il->rx_handlers[PM_SLEEP_NOTIFICATION] = il_rx_pm_sleep_notif;
- il->rx_handlers[PM_DEBUG_STATISTIC_NOTIFIC] =
+ il->rx_handlers[N_PM_SLEEP] = il_rx_pm_sleep_notif;
+ il->rx_handlers[N_PM_DEBUG_STATS] =
il_rx_pm_debug_stats_notif;
- il->rx_handlers[BEACON_NOTIFICATION] = il3945_rx_beacon_notif;
+ il->rx_handlers[N_BEACON] = il3945_rx_beacon_notif;
/*
* The same handler is used for both the REPLY to a discrete
* stats request from the host as well as for the periodic
* stats notifications (after received beacons) from the uCode.
*/
- il->rx_handlers[REPLY_STATS_CMD] = il3945_reply_stats;
- il->rx_handlers[STATS_NOTIFICATION] = il3945_hw_rx_stats;
+ il->rx_handlers[C_STATS] = il3945_reply_stats;
+ il->rx_handlers[N_STATS] = il3945_hw_rx_stats;
il_setup_rx_scan_handlers(il);
- il->rx_handlers[CARD_STATE_NOTIFICATION] = il3945_rx_card_state_notif;
+ il->rx_handlers[N_CARD_STATE] = il3945_rx_card_state_notif;
/* Set up hardware specific Rx handlers */
il3945_hw_rx_handler_setup(il);
* Ucode should set SEQ_RX_FRAME bit if ucode-originated,
* but apparently a few don't get set; catch them here. */
reclaim = !(pkt->hdr.sequence & SEQ_RX_FRAME) &&
- pkt->hdr.cmd != STATS_NOTIFICATION &&
- pkt->hdr.cmd != REPLY_TX;
+ pkt->hdr.cmd != N_STATS &&
+ pkt->hdr.cmd != C_TX;
/* Based on type of command response or notification,
* handle those that need handling via function in
}
/**
- * il3945_init_alive_start - Called after REPLY_ALIVE notification received
+ * il3945_init_alive_start - Called after N_ALIVE notification received
*
- * Called after REPLY_ALIVE notification received from "initialize" uCode.
+ * Called after N_ALIVE notification received from "initialize" uCode.
*
* Tell "initialize" uCode to go ahead and load the runtime uCode.
*/
}
/**
- * il3945_alive_start - called after REPLY_ALIVE notification received
+ * il3945_alive_start - called after N_ALIVE notification received
* from protocol/runtime uCode (initialization uCode's
* Alive gets handled by il3945_init_alive_start()).
*/
int il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
{
struct il_host_cmd cmd = {
- .id = REPLY_SCAN_CMD,
+ .id = C_SCAN,
.len = sizeof(struct il3945_scan_cmd),
.flags = CMD_SIZE_HUGE,
};
rc = il_send_rxon_timing(il, ctx);
if (rc)
- IL_WARN("REPLY_RXON_TIMING failed - "
+ IL_WARN("C_RXON_TIMING failed - "
"Attempting to continue.\n");
ctx->staging.filter_flags |= RXON_FILTER_ASSOC_MSK;
/* RXON Timing */
rc = il_send_rxon_timing(il, ctx);
if (rc)
- IL_WARN("REPLY_RXON_TIMING failed - "
+ IL_WARN("C_RXON_TIMING failed - "
"Attempting to continue.\n");
ctx->staging.assoc_id = 0;
il->ctx.ctxid = 0;
- il->ctx.rxon_cmd = REPLY_RXON;
- il->ctx.rxon_timing_cmd = REPLY_RXON_TIMING;
- il->ctx.rxon_assoc_cmd = REPLY_RXON_ASSOC;
- il->ctx.qos_cmd = REPLY_QOS_PARAM;
+ il->ctx.rxon_cmd = C_RXON;
+ il->ctx.rxon_timing_cmd = C_RXON_TIMING;
+ il->ctx.rxon_assoc_cmd = C_RXON_ASSOC;
+ il->ctx.qos_cmd = C_QOS_PARAM;
il->ctx.ap_sta_id = IL_AP_ID;
- il->ctx.wep_key_cmd = REPLY_WEPKEY;
+ il->ctx.wep_key_cmd = C_WEPKEY;
il->ctx.interface_modes =
BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_ADHOC);
struct il_led_cmd *led_cmd)
{
struct il_host_cmd cmd = {
- .id = REPLY_LEDS_CMD,
+ .id = C_LEDS,
.len = sizeof(struct il_led_cmd),
.data = led_cmd,
.flags = CMD_ASYNC,
txpower.power[i].rate);
}
- return il_send_cmd_pdu(il, REPLY_TX_PWR_TBL_CMD,
+ return il_send_cmd_pdu(il, C_TX_PWR_TBL,
sizeof(struct il3945_txpowertable_cmd),
&txpower);
struct il_rx_pkt *pkt;
struct il3945_rxon_assoc_cmd rxon_assoc;
struct il_host_cmd cmd = {
- .id = REPLY_RXON_ASSOC,
+ .id = C_RXON_ASSOC,
.len = sizeof(rxon_assoc),
.flags = CMD_WANT_SKB,
.data = &rxon_assoc,
pkt = (struct il_rx_pkt *)cmd.reply_page;
if (pkt->hdr.flags & IL_CMD_FAILED_MSK) {
- IL_ERR("Bad return from REPLY_RXON_ASSOC command\n");
+ IL_ERR("Bad return from C_RXON_ASSOC command\n");
rc = -EIO;
}
*/
active_rxon->reserved4 = 0;
active_rxon->reserved5 = 0;
- rc = il_send_cmd_pdu(il, REPLY_RXON,
+ rc = il_send_cmd_pdu(il, C_RXON,
sizeof(struct il3945_rxon_cmd),
&il->ctx.active);
il_set_rxon_hwcrypto(il, ctx, !il3945_mod_params.sw_crypto);
/* Apply the new configuration */
- rc = il_send_cmd_pdu(il, REPLY_RXON,
+ rc = il_send_cmd_pdu(il, C_RXON,
sizeof(struct il3945_rxon_cmd),
staging_rxon);
if (rc) {
static u16 il3945_get_hcmd_size(u8 cmd_id, u16 len)
{
switch (cmd_id) {
- case REPLY_RXON:
+ case C_RXON:
return sizeof(struct il3945_rxon_cmd);
- case POWER_TBL_CMD:
+ case C_POWER_TBL:
return sizeof(struct il3945_powertable_cmd);
default:
return len;
/* Update the rate scaling for control frame Tx */
rate_cmd.table_id = 0;
- rc = il_send_cmd_pdu(il, REPLY_RATE_SCALE, sizeof(rate_cmd),
+ rc = il_send_cmd_pdu(il, C_RATE_SCALE, sizeof(rate_cmd),
&rate_cmd);
if (rc)
return rc;
/* Update the rate scaling for data frame Tx */
rate_cmd.table_id = 1;
- return il_send_cmd_pdu(il, REPLY_RATE_SCALE, sizeof(rate_cmd),
+ return il_send_cmd_pdu(il, C_RATE_SCALE, sizeof(rate_cmd),
&rate_cmd);
}
void il3945_hw_rx_handler_setup(struct il_priv *il)
{
- il->rx_handlers[REPLY_TX] = il3945_rx_reply_tx;
- il->rx_handlers[REPLY_3945_RX] = il3945_rx_reply_rx;
+ il->rx_handlers[C_TX] = il3945_rx_reply_tx;
+ il->rx_handlers[N_3945_RX] = il3945_rx_reply_rx;
}
void il3945_hw_setup_deferred_work(struct il_priv *il)
data->nrg_th_cck);
}
-/* Prepare a SENSITIVITY_CMD, send to uCode if values have changed */
+/* Prepare a C_SENSITIVITY, send to uCode if values have changed */
static int il4965_sensitivity_write(struct il_priv *il)
{
struct il_sensitivity_cmd cmd;
struct il_sensitivity_data *data = NULL;
struct il_host_cmd cmd_out = {
- .id = SENSITIVITY_CMD,
+ .id = C_SENSITIVITY,
.len = sizeof(struct il_sensitivity_cmd),
.flags = CMD_ASYNC,
.data = &cmd,
il4965_prepare_legacy_sensitivity_tbl(il, data, &cmd.table[0]);
/* Update uCode's "work" table, and copy it to DSP */
- cmd.control = SENSITIVITY_CMD_CONTROL_WORK_TBL;
+ cmd.control = C_SENSITIVITY_CONTROL_WORK_TBL;
/* Don't send command to uCode if nothing has changed */
if (!memcmp(&cmd.table[0], &(il->sensitivity_tbl[0]),
sizeof(u16)*HD_TBL_SIZE)) {
- D_CALIB("No change in SENSITIVITY_CMD\n");
+ D_CALIB("No change in C_SENSITIVITY\n");
return 0;
}
cmd.diff_gain_a = data->delta_gain_code[0];
cmd.diff_gain_b = data->delta_gain_code[1];
cmd.diff_gain_c = data->delta_gain_code[2];
- ret = il_send_cmd_pdu(il, REPLY_PHY_CALIBRATION_CMD,
+ ret = il_send_cmd_pdu(il, C_PHY_CALIBRATION,
sizeof(cmd), &cmd);
if (ret)
D_CALIB("fail sending cmd "
- "REPLY_PHY_CALIBRATION_CMD\n");
+ "C_PHY_CALIBRATION\n");
/* TODO we might want recalculate
* rx_chain in rxon cmd */
rxb->page = NULL;
}
-/* Called for REPLY_RX (legacy ABG frames), or
- * REPLY_RX_MPDU_CMD (HT high-throughput N frames). */
+/* Called for N_RX (legacy ABG frames), or
+ * N_RX_MPDU (HT high-throughput N frames). */
void il4965_rx_reply_rx(struct il_priv *il,
struct il_rx_buf *rxb)
{
u32 rate_n_flags;
/**
- * REPLY_RX and REPLY_RX_MPDU_CMD are handled differently.
- * REPLY_RX: physical layer info is in this buffer
- * REPLY_RX_MPDU_CMD: physical layer info was sent in separate
+ * N_RX and N_RX_MPDU are handled differently.
+ * N_RX: physical layer info is in this buffer
+ * N_RX_MPDU: physical layer info was sent in separate
* command and cached in il->last_phy_res
*
* Here we set up local variables depending on which command is
* received.
*/
- if (pkt->hdr.cmd == REPLY_RX) {
+ if (pkt->hdr.cmd == N_RX) {
phy_res = (struct il_rx_phy_res *)pkt->u.raw;
header = (struct ieee80211_hdr *)(pkt->u.raw + sizeof(*phy_res)
+ phy_res->cfg_phy_cnt);
rxb, &rx_status);
}
-/* Cache phy data (Rx signal strength, etc) for HT frame (REPLY_RX_PHY_CMD).
- * This will be used later in il_rx_reply_rx() for REPLY_RX_MPDU_CMD. */
+/* Cache phy data (Rx signal strength, etc) for HT frame (N_RX_PHY).
+ * This will be used later in il_rx_reply_rx() for N_RX_MPDU. */
void il4965_rx_reply_rx_phy(struct il_priv *il,
struct il_rx_buf *rxb)
{
int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
{
struct il_host_cmd cmd = {
- .id = REPLY_SCAN_CMD,
+ .id = C_SCAN,
.len = sizeof(struct il_scan_cmd),
.flags = CMD_SIZE_HUGE,
};
msecs_to_jiffies(REG_RECALIB_PERIOD * 1000));
if (unlikely(!test_bit(S_SCANNING, &il->status)) &&
- (pkt->hdr.cmd == STATS_NOTIFICATION)) {
+ (pkt->hdr.cmd == N_STATS)) {
il4965_rx_calc_noise(il);
queue_work(il->workqueue, &il->run_time_calib_work);
}
}
/*
- * handle build REPLY_TX command notification.
+ * handle build C_TX command notification.
*/
static void il4965_tx_cmd_build_basic(struct il_priv *il,
struct sk_buff *skb,
}
/*
- * start REPLY_TX command process
+ * start C_TX command process
*/
int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
{
* after Tx, uCode's Tx response will return this value so driver can
* locate the frame within the tx queue and do post-tx processing.
*/
- out_cmd->hdr.cmd = REPLY_TX;
+ out_cmd->hdr.cmd = C_TX;
out_cmd->hdr.sequence = cpu_to_le16((u16)(QUEUE_TO_SEQ(txq_id) |
IDX_TO_SEQ(q->write_ptr)));
}
/**
- * il4965_rx_reply_compressed_ba - Handler for REPLY_COMPRESSED_BA
+ * il4965_rx_reply_compressed_ba - Handler for N_COMPRESSED_BA
*
* Handles block-acknowledge notification from device, which reports success
* of frames sent via aggregation.
spin_lock_irqsave(&il->sta_lock, flags);
- D_TX_REPLY("REPLY_COMPRESSED_BA [%d] Received from %pM, "
+ D_TX_REPLY("N_COMPRESSED_BA [%d] Received from %pM, "
"sta_id = %d\n",
agg->wait_for_ba,
(u8 *) &ba_resp->sta_addr_lo32,
memset(&ctx->wep_keys[keyconf->keyidx], 0, sizeof(ctx->wep_keys[0]));
if (il_is_rfkill(il)) {
D_WEP(
- "Not sending REPLY_WEPKEY command due to RFKILL.\n");
+ "Not sending C_WEPKEY command due to RFKILL.\n");
/* but keys in device are clear anyway so return success */
return 0;
}
if (il_is_rfkill(il)) {
D_WEP(
- "Not sending REPLY_ADD_STA command because RFKILL enabled.\n");
+ "Not sending C_ADD_STA command because RFKILL enabled.\n");
spin_unlock_irqrestore(&il->sta_lock, flags);
return 0;
}
return -EINVAL;
}
- rc = il_send_cmd_pdu(il, REPLY_TX_BEACON, frame_size,
+ rc = il_send_cmd_pdu(il, C_TX_BEACON, frame_size,
&frame->u.cmd[0]);
il4965_free_frame(il, frame);
* This callback is provided in order to send a stats request.
*
* This timer function is continually reset to execute within
- * REG_RECALIB_PERIOD seconds since the last STATS_NOTIFICATION
+ * REG_RECALIB_PERIOD seconds since the last N_STATS
* was received. We need to ensure we receive the stats in order
* to update the temperature used for calibrating the TXPOWER.
*/
*/
static void il4965_setup_rx_handlers(struct il_priv *il)
{
- il->rx_handlers[REPLY_ALIVE] = il4965_rx_reply_alive;
- il->rx_handlers[REPLY_ERROR] = il_rx_reply_error;
- il->rx_handlers[CHANNEL_SWITCH_NOTIFICATION] = il_rx_csa;
- il->rx_handlers[SPECTRUM_MEASURE_NOTIFICATION] =
+ il->rx_handlers[N_ALIVE] = il4965_rx_reply_alive;
+ il->rx_handlers[N_ERROR] = il_rx_reply_error;
+ il->rx_handlers[N_CHANNEL_SWITCH] = il_rx_csa;
+ il->rx_handlers[N_SPECTRUM_MEASUREMENT] =
il_rx_spectrum_measure_notif;
- il->rx_handlers[PM_SLEEP_NOTIFICATION] = il_rx_pm_sleep_notif;
- il->rx_handlers[PM_DEBUG_STATISTIC_NOTIFIC] =
+ il->rx_handlers[N_PM_SLEEP] = il_rx_pm_sleep_notif;
+ il->rx_handlers[N_PM_DEBUG_STATS] =
il_rx_pm_debug_stats_notif;
- il->rx_handlers[BEACON_NOTIFICATION] = il4965_rx_beacon_notif;
+ il->rx_handlers[N_BEACON] = il4965_rx_beacon_notif;
/*
* The same handler is used for both the REPLY to a discrete
* stats request from the host as well as for the periodic
* stats notifications (after received beacons) from the uCode.
*/
- il->rx_handlers[REPLY_STATS_CMD] = il4965_reply_stats;
- il->rx_handlers[STATS_NOTIFICATION] = il4965_rx_stats;
+ il->rx_handlers[C_STATS] = il4965_reply_stats;
+ il->rx_handlers[N_STATS] = il4965_rx_stats;
il_setup_rx_scan_handlers(il);
/* status change handler */
- il->rx_handlers[CARD_STATE_NOTIFICATION] =
+ il->rx_handlers[N_CARD_STATE] =
il4965_rx_card_state_notif;
- il->rx_handlers[MISSED_BEACONS_NOTIFICATION] =
+ il->rx_handlers[N_MISSED_BEACONS] =
il4965_rx_missed_beacon_notif;
/* Rx handlers */
- il->rx_handlers[REPLY_RX_PHY_CMD] = il4965_rx_reply_rx_phy;
- il->rx_handlers[REPLY_RX_MPDU_CMD] = il4965_rx_reply_rx;
+ il->rx_handlers[N_RX_PHY] = il4965_rx_reply_rx_phy;
+ il->rx_handlers[N_RX_MPDU] = il4965_rx_reply_rx;
/* block ack */
- il->rx_handlers[REPLY_COMPRESSED_BA] = il4965_rx_reply_compressed_ba;
+ il->rx_handlers[N_COMPRESSED_BA] = il4965_rx_reply_compressed_ba;
/* Set up hardware specific Rx handlers */
il->cfg->ops->lib->rx_handler_setup(il);
}
* Ucode should set SEQ_RX_FRAME bit if ucode-originated,
* but apparently a few don't get set; catch them here. */
reclaim = !(pkt->hdr.sequence & SEQ_RX_FRAME) &&
- (pkt->hdr.cmd != REPLY_RX_PHY_CMD) &&
- (pkt->hdr.cmd != REPLY_RX) &&
- (pkt->hdr.cmd != REPLY_RX_MPDU_CMD) &&
- (pkt->hdr.cmd != REPLY_COMPRESSED_BA) &&
- (pkt->hdr.cmd != STATS_NOTIFICATION) &&
- (pkt->hdr.cmd != REPLY_TX);
+ (pkt->hdr.cmd != N_RX_PHY) &&
+ (pkt->hdr.cmd != N_RX) &&
+ (pkt->hdr.cmd != N_RX_MPDU) &&
+ (pkt->hdr.cmd != N_COMPRESSED_BA) &&
+ (pkt->hdr.cmd != N_STATS) &&
+ (pkt->hdr.cmd != C_TX);
/* Based on type of command response or notification,
* handle those that need handling via function in
cmd.critical_temperature_R =
cpu_to_le32(il->hw_params.ct_kill_threshold);
- ret = il_send_cmd_pdu(il, REPLY_CT_KILL_CONFIG_CMD,
+ ret = il_send_cmd_pdu(il, C_CT_KILL_CONFIG,
sizeof(cmd), &cmd);
if (ret)
- IL_ERR("REPLY_CT_KILL_CONFIG_CMD failed\n");
+ IL_ERR("C_CT_KILL_CONFIG failed\n");
else
- D_INFO("REPLY_CT_KILL_CONFIG_CMD "
+ D_INFO("C_CT_KILL_CONFIG "
"succeeded, "
"critical temperature is %d\n",
il->hw_params.ct_kill_threshold);
}
/**
- * il4965_alive_start - called after REPLY_ALIVE notification received
+ * il4965_alive_start - called after N_ALIVE notification received
* from protocol/runtime uCode (initialization uCode's
* Alive gets handled by il_init_alive_start()).
*/
il->ctx.always_active = true;
il->ctx.is_active = true;
- il->ctx.rxon_cmd = REPLY_RXON;
- il->ctx.rxon_timing_cmd = REPLY_RXON_TIMING;
- il->ctx.rxon_assoc_cmd = REPLY_RXON_ASSOC;
- il->ctx.qos_cmd = REPLY_QOS_PARAM;
+ il->ctx.rxon_cmd = C_RXON;
+ il->ctx.rxon_timing_cmd = C_RXON_TIMING;
+ il->ctx.rxon_assoc_cmd = C_RXON_ASSOC;
+ il->ctx.qos_cmd = C_QOS_PARAM;
il->ctx.ap_sta_id = IL_AP_ID;
- il->ctx.wep_key_cmd = REPLY_WEPKEY;
+ il->ctx.wep_key_cmd = C_WEPKEY;
il->ctx.ac_to_fifo = il4965_bss_ac_to_fifo;
il->ctx.ac_to_queue = il4965_bss_ac_to_queue;
il->ctx.exclusive_interface_modes =
* if the driver's iwl-4965-rs rate scaling algorithm is used, instead of
* rc80211_simple.
*
- * NOTE: Run REPLY_ADD_STA command to set up station table entry, before
- * calling this function (which runs REPLY_TX_LINK_QUALITY_CMD,
+ * NOTE: Run C_ADD_STA command to set up station table entry, before
+ * calling this function (which runs C_TX_LINK_QUALITY_CMD,
* which requires station table entry to exist).
*/
static void il4965_rs_initialize_lq(struct il_priv *il,
il4965_send_led_cmd(struct il_priv *il, struct il_led_cmd *led_cmd)
{
struct il_host_cmd cmd = {
- .id = REPLY_LEDS_CMD,
+ .id = C_LEDS,
.len = sizeof(struct il_led_cmd),
.data = led_cmd,
.flags = CMD_ASYNC,
}
/**
- * il4965_init_alive_start - Called after REPLY_ALIVE notification received
+ * il4965_init_alive_start - Called after N_ALIVE notification received
*
- * Called after REPLY_ALIVE notification received from "initialize" uCode.
+ * Called after N_ALIVE notification received from "initialize" uCode.
*
* The 4965 "initialize" ALIVE reply contains calibration data for:
* Voltage, temperature, and MIMO tx gain correction, now stored in il
cmd.diff_gain_a = 0;
cmd.diff_gain_b = 0;
cmd.diff_gain_c = 0;
- if (il_send_cmd_pdu(il, REPLY_PHY_CALIBRATION_CMD,
+ if (il_send_cmd_pdu(il, C_PHY_CALIBRATION,
sizeof(cmd), &cmd))
IL_ERR(
- "Could not send REPLY_PHY_CALIBRATION_CMD\n");
+ "Could not send C_PHY_CALIBRATION\n");
data->state = IL_CHAIN_NOISE_ACCUMULATE;
D_CALIB("Run chain_noise_calibrate\n");
}
goto out;
ret = il_send_cmd_pdu(il,
- REPLY_TX_PWR_TBL_CMD, sizeof(cmd), &cmd);
+ C_TX_PWR_TBL, sizeof(cmd), &cmd);
out:
return ret;
ctx->staging.ofdm_ht_dual_stream_basic_rates;
rxon_assoc.rx_chain_select_flags = ctx->staging.rx_chain;
- ret = il_send_cmd_pdu_async(il, REPLY_RXON_ASSOC,
+ ret = il_send_cmd_pdu_async(il, C_RXON_ASSOC,
sizeof(rxon_assoc), &rxon_assoc, NULL);
return ret;
}
return il_send_cmd_pdu(il,
- REPLY_CHANNEL_SWITCH, sizeof(cmd), &cmd);
+ C_CHANNEL_SWITCH, sizeof(cmd), &cmd);
}
/**
static u16 il4965_get_hcmd_size(u8 cmd_id, u16 len)
{
switch (cmd_id) {
- case REPLY_RXON:
+ case C_RXON:
return (u16) sizeof(struct il4965_rxon_cmd);
default:
return len;
static void il4965_rx_handler_setup(struct il_priv *il)
{
/* Legacy Rx frames */
- il->rx_handlers[REPLY_RX] = il4965_rx_reply_rx;
+ il->rx_handlers[N_RX] = il4965_rx_reply_rx;
/* Tx response */
- il->rx_handlers[REPLY_TX] = il4965_rx_reply_tx;
- il->rx_handlers[BEACON_NOTIFICATION] = il4965_rx_beacon_notif;
+ il->rx_handlers[C_TX] = il4965_rx_reply_tx;
+ il->rx_handlers[N_BEACON] = il4965_rx_beacon_notif;
}
static struct il_hcmd_ops il4965_hcmd = {
* uCode provides all 4 values to the driver via the "initialize alive"
* notification (see struct il4965_init_alive_resp). After the runtime uCode
* image loads, uCode updates the R4 value via stats notifications
- * (see STATS_NOTIFICATION), which occur after each received beacon
- * when associated, or can be requested via REPLY_STATS_CMD.
+ * (see N_STATS), which occur after each received beacon
+ * when associated, or can be requested via C_STATS.
*
* NOTE: uCode provides the R4 value as a 23-bit signed value. Driver
* must sign-extend to 32 bits before applying formula below.
#define IL_MAX_RATES (IL_CCK_RATES + IL_OFDM_RATES)
enum {
- REPLY_ALIVE = 0x1,
- REPLY_ERROR = 0x2,
+ N_ALIVE = 0x1,
+ N_ERROR = 0x2,
/* RXON and QOS commands */
- REPLY_RXON = 0x10,
- REPLY_RXON_ASSOC = 0x11,
- REPLY_QOS_PARAM = 0x13,
- REPLY_RXON_TIMING = 0x14,
+ C_RXON = 0x10,
+ C_RXON_ASSOC = 0x11,
+ C_QOS_PARAM = 0x13,
+ C_RXON_TIMING = 0x14,
/* Multi-Station support */
- REPLY_ADD_STA = 0x18,
- REPLY_REMOVE_STA = 0x19,
+ C_ADD_STA = 0x18,
+ C_REM_STA = 0x19,
/* Security */
- REPLY_WEPKEY = 0x20,
+ C_WEPKEY = 0x20,
/* RX, TX, LEDs */
- REPLY_3945_RX = 0x1b, /* 3945 only */
- REPLY_TX = 0x1c,
- REPLY_RATE_SCALE = 0x47, /* 3945 only */
- REPLY_LEDS_CMD = 0x48,
- REPLY_TX_LINK_QUALITY_CMD = 0x4e, /* for 4965 and up */
+ N_3945_RX = 0x1b, /* 3945 only */
+ C_TX = 0x1c,
+ C_RATE_SCALE = 0x47, /* 3945 only */
+ C_LEDS = 0x48,
+ C_TX_LINK_QUALITY_CMD = 0x4e, /* for 4965 */
/* 802.11h related */
- REPLY_CHANNEL_SWITCH = 0x72,
- CHANNEL_SWITCH_NOTIFICATION = 0x73,
- REPLY_SPECTRUM_MEASUREMENT_CMD = 0x74,
- SPECTRUM_MEASURE_NOTIFICATION = 0x75,
+ C_CHANNEL_SWITCH = 0x72,
+ N_CHANNEL_SWITCH = 0x73,
+ C_SPECTRUM_MEASUREMENT = 0x74,
+ N_SPECTRUM_MEASUREMENT = 0x75,
/* Power Management */
- POWER_TBL_CMD = 0x77,
- PM_SLEEP_NOTIFICATION = 0x7A,
- PM_DEBUG_STATISTIC_NOTIFIC = 0x7B,
+ C_POWER_TBL = 0x77,
+ N_PM_SLEEP = 0x7A,
+ N_PM_DEBUG_STATS = 0x7B,
/* Scan commands and notifications */
- REPLY_SCAN_CMD = 0x80,
- REPLY_SCAN_ABORT_CMD = 0x81,
- SCAN_START_NOTIFICATION = 0x82,
- SCAN_RESULTS_NOTIFICATION = 0x83,
- SCAN_COMPLETE_NOTIFICATION = 0x84,
+ C_SCAN = 0x80,
+ C_SCAN_ABORT = 0x81,
+ N_SCAN_START = 0x82,
+ N_SCAN_RESULTS = 0x83,
+ N_SCAN_COMPLETE = 0x84,
/* IBSS/AP commands */
- BEACON_NOTIFICATION = 0x90,
- REPLY_TX_BEACON = 0x91,
+ N_BEACON = 0x90,
+ C_TX_BEACON= 0x91,
/* Miscellaneous commands */
- REPLY_TX_PWR_TBL_CMD = 0x97,
+ C_TX_PWR_TBL = 0x97,
/* Bluetooth device coexistence config command */
- REPLY_BT_CONFIG = 0x9b,
+ C_BT_CONFIG = 0x9b,
/* Statistics */
- REPLY_STATS_CMD = 0x9c,
- STATS_NOTIFICATION = 0x9d,
+ C_STATS = 0x9c,
+ N_STATS = 0x9d,
/* RF-KILL commands and notifications */
- CARD_STATE_NOTIFICATION = 0xa1,
+ N_CARD_STATE = 0xa1,
/* Missed beacons notification */
- MISSED_BEACONS_NOTIFICATION = 0xa2,
+ N_MISSED_BEACONS = 0xa2,
- REPLY_CT_KILL_CONFIG_CMD = 0xa4,
- SENSITIVITY_CMD = 0xa8,
- REPLY_PHY_CALIBRATION_CMD = 0xb0,
- REPLY_RX_PHY_CMD = 0xc0,
- REPLY_RX_MPDU_CMD = 0xc1,
- REPLY_RX = 0xc3,
- REPLY_COMPRESSED_BA = 0xc5,
+ C_CT_KILL_CONFIG = 0xa4,
+ C_SENSITIVITY = 0xa8,
+ C_PHY_CALIBRATION = 0xb0,
+ N_RX_PHY = 0xc0,
+ N_RX_MPDU = 0xc1,
+ N_RX = 0xc3,
+ N_COMPRESSED_BA = 0xc5,
- REPLY_MAX = 0xff
+ IL_CN_MAX = 0xff
};
/******************************************************************************
* driver, and each response/notification received from uCode.
*/
struct il_cmd_header {
- u8 cmd; /* Command ID: REPLY_RXON, etc. */
+ u8 cmd; /* Command ID: C_RXON, etc. */
u8 flags; /* 0:5 reserved, 6 abort, 7 internal */
/*
* The driver sets up the sequence number to values of its choosing.
* There is one exception: uCode sets bit 15 when it originates
* the response/notification, i.e. when the response/notification
* is not a direct response to a command sent by the driver. For
- * example, uCode issues REPLY_3945_RX when it sends a received frame
+ * example, uCode issues N_3945_RX when it sends a received frame
* to the driver; it is not a direct response to any driver command.
*
* The Linux driver uses the following format:
/**
* struct il3945_tx_power
*
- * Used in REPLY_TX_PWR_TBL_CMD, REPLY_SCAN_CMD, REPLY_CHANNEL_SWITCH
+ * Used in C_TX_PWR_TBL, C_SCAN, C_CHANNEL_SWITCH
*
* Each entry contains two values:
* 1) DSP gain (or sometimes called DSP attenuation). This is a fine-grained
/**
* struct il3945_power_per_rate
*
- * Used in REPLY_TX_PWR_TBL_CMD, REPLY_CHANNEL_SWITCH
+ * Used in C_TX_PWR_TBL, C_CHANNEL_SWITCH
*/
struct il3945_power_per_rate {
u8 rate; /* plcp */
* iwl4965 rate_n_flags bit fields
*
* rate_n_flags format is used in following iwl4965 commands:
- * REPLY_RX (response only)
- * REPLY_RX_MPDU (response only)
- * REPLY_TX (both command and response)
- * REPLY_TX_LINK_QUALITY_CMD
+ * N_RX (response only)
+ * N_RX_MPDU (response only)
+ * C_TX (both command and response)
+ * C_TX_LINK_QUALITY_CMD
*
* High-throughput (HT) rate format for bits 7:0 (bit 8 must be "1"):
* 2-0: 0) 6 Mbps
/**
* union il4965_tx_power_dual_stream
*
- * Host format used for REPLY_TX_PWR_TBL_CMD, REPLY_CHANNEL_SWITCH
+ * Host format used for C_TX_PWR_TBL, C_CHANNEL_SWITCH
* Use __le32 version (struct tx_power_dual_stream) when building command.
*
* Driver provides radio gain and DSP attenuation settings to device in pairs,
/**
* struct tx_power_dual_stream
*
- * Table entries in REPLY_TX_PWR_TBL_CMD, REPLY_CHANNEL_SWITCH
+ * Table entries in C_TX_PWR_TBL, C_CHANNEL_SWITCH
*
* Same format as il_tx_power_dual_stream, but __le32
*/
/**
* struct il4965_tx_power_db
*
- * Entire table within REPLY_TX_PWR_TBL_CMD, REPLY_CHANNEL_SWITCH
+ * Entire table within C_TX_PWR_TBL, C_CHANNEL_SWITCH
*/
struct il4965_tx_power_db {
struct tx_power_dual_stream power_tbl[POWER_TBL_NUM_ENTRIES];
#define INITIALIZE_SUBTYPE (9)
/*
- * ("Initialize") REPLY_ALIVE = 0x1 (response only, not a command)
+ * ("Initialize") N_ALIVE = 0x1 (response only, not a command)
*
* uCode issues this "initialize alive" notification once the initialization
* uCode image has completed its work, and is ready to load the runtime image.
/**
- * REPLY_ALIVE = 0x1 (response only, not a command)
+ * N_ALIVE = 0x1 (response only, not a command)
*
* uCode issues this "alive" notification once the runtime image is ready
* to receive commands from the driver. This is the *second* "alive"
} __packed;
/*
- * REPLY_ERROR = 0x2 (response only, not a command)
+ * N_ERROR = 0x2 (response only, not a command)
*/
struct il_error_resp {
__le32 error_type;
#define RXON_FILTER_BCON_AWARE_MSK cpu_to_le32(1 << 6)
/**
- * REPLY_RXON = 0x10 (command, has simple generic response)
+ * C_RXON = 0x10 (command, has simple generic response)
*
* RXON tunes the radio tuner to a service channel, and sets up a number
* of parameters that are used primarily for Rx, but also for Tx operations.
* channel.
*
* NOTE: All RXONs wipe clean the internal txpower table. Driver must
- * issue a new REPLY_TX_PWR_TBL_CMD after each REPLY_RXON (0x10),
+ * issue a new C_TX_PWR_TBL after each C_RXON (0x10),
* regardless of whether RXON_FILTER_ASSOC_MSK is set.
*/
/*
- * REPLY_RXON_ASSOC = 0x11 (command, has simple generic response)
+ * C_RXON_ASSOC = 0x11 (command, has simple generic response)
*/
struct il3945_rxon_assoc_cmd {
__le32 flags;
#define IL39_MAX_UCODE_BEACON_INTERVAL 1 /* 1024 */
/*
- * REPLY_RXON_TIMING = 0x14 (command, has simple generic response)
+ * C_RXON_TIMING = 0x14 (command, has simple generic response)
*/
struct il_rxon_time_cmd {
__le64 timestamp;
} __packed;
/*
- * REPLY_CHANNEL_SWITCH = 0x72 (command, has simple generic response)
+ * C_CHANNEL_SWITCH = 0x72 (command, has simple generic response)
*/
struct il3945_channel_switch_cmd {
u8 band;
} __packed;
/*
- * CHANNEL_SWITCH_NOTIFICATION = 0x73 (notification only, not a command)
+ * N_CHANNEL_SWITCH = 0x73 (notification only, not a command)
*/
struct il_csa_notification {
__le16 band;
*****************************************************************************/
/**
- * struct il_ac_qos -- QOS timing params for REPLY_QOS_PARAM
+ * struct il_ac_qos -- QOS timing params for C_QOS_PARAM
* One for each of 4 EDCA access categories in struct il_qosparam_cmd
*
* @cw_min: Contention win, start value in numbers of slots.
#define AC_NUM 4
/*
- * REPLY_QOS_PARAM = 0x13 (command, has simple generic response)
+ * C_QOS_PARAM = 0x13 (command, has simple generic response)
*
* This command sets up timings for each of the 4 prioritized EDCA Tx FIFOs
* 0: Background, 1: Best Effort, 2: Video, 3: Voice.
} __packed;
/*
- * REPLY_ADD_STA = 0x18 (command)
+ * C_ADD_STA = 0x18 (command)
*
* The device contains an internal table of per-station information,
* with info on security keys, aggregation parameters, and Tx rates for
* initial Tx attempt and any retries (4965 devices uses
- * REPLY_TX_LINK_QUALITY_CMD,
- * 3945 uses REPLY_RATE_SCALE to set up rate tables).
+ * C_TX_LINK_QUALITY_CMD,
+ * 3945 uses C_RATE_SCALE to set up rate tables).
*
- * REPLY_ADD_STA sets up the table entry for one station, either creating
+ * C_ADD_STA sets up the table entry for one station, either creating
* a new entry, or modifying a pre-existing one.
*
* NOTE: RXON command (without "associated" bit set) wipes the station table
#define ADD_STA_NO_BLOCK_ACK_RESOURCE 0x4
#define ADD_STA_MODIFY_NON_EXIST_STA 0x8
/*
- * REPLY_ADD_STA = 0x18 (response)
+ * C_ADD_STA = 0x18 (response)
*/
struct il_add_sta_resp {
u8 status; /* ADD_STA_* */
#define REM_STA_SUCCESS_MSK 0x1
/*
- * REPLY_REM_STA = 0x19 (response)
+ * C_REM_STA = 0x19 (response)
*/
struct il_rem_sta_resp {
u8 status;
} __packed;
/*
- * REPLY_REM_STA = 0x19 (command)
+ * C_REM_STA = 0x19 (command)
*/
struct il_rem_sta_cmd {
u8 num_sta; /* number of removed stations */
} __packed;
/*
- * REPLY_3945_RX = 0x1b (response only, not a command)
+ * N_3945_RX = 0x1b (response only, not a command)
*
* NOTE: DO NOT dereference from casts to this structure
* It is provided only for calculating minimum data set size.
/*
- * REPLY_RX = 0xc3 (response only, not a command)
+ * N_RX = 0xc3 (response only, not a command)
* Used only for legacy (non 11n) frames.
*/
struct il_rx_phy_res {
* (5)
* Tx Commands & Responses:
*
- * Driver must place each REPLY_TX command into one of the prioritized Tx
+ * Driver must place each C_TX command into one of the prioritized Tx
* queues in host DRAM, shared between driver and device (see comments for
* SCD registers and Tx/Rx Queues). When the device's Tx scheduler and uCode
* are preparing to transmit, the device pulls the Tx command over the PCI
* uCode handles all timing and protocol related to control frames
* (RTS/CTS/ACK), based on flags in the Tx command. uCode and Tx scheduler
* handle reception of block-acks; uCode updates the host driver via
- * REPLY_COMPRESSED_BA.
+ * N_COMPRESSED_BA.
*
* uCode handles retrying Tx when an ACK is expected but not received.
* This includes trying lower data rates than the one requested in the Tx
- * command, as set up by the REPLY_RATE_SCALE (for 3945) or
- * REPLY_TX_LINK_QUALITY_CMD (4965).
+ * command, as set up by the C_RATE_SCALE (for 3945) or
+ * C_TX_LINK_QUALITY_CMD (4965).
*
- * Driver sets up transmit power for various rates via REPLY_TX_PWR_TBL_CMD.
+ * Driver sets up transmit power for various rates via C_TX_PWR_TBL.
* This command must be executed after every RXON command, before Tx can occur.
*****************************************************************************/
-/* REPLY_TX Tx flags field */
+/* C_TX Tx flags field */
/*
* 1: Use Request-To-Send protocol before this frame.
#define TX_CMD_FLG_ACK_MSK cpu_to_le32(1 << 3)
/* For 4965 devices:
- * 1: Use rate scale table (see REPLY_TX_LINK_QUALITY_CMD).
+ * 1: Use rate scale table (see C_TX_LINK_QUALITY_CMD).
* Tx command's initial_rate_idx indicates first rate to try;
* uCode walks through table for additional Tx attempts.
* 0: Use Tx rate/MCS from Tx command's rate_n_flags field.
/* 1: uCode overrides sequence control field in MAC header.
* 0: Driver provides sequence control field in MAC header.
* Set this for management frames, non-QOS data frames, non-unicast frames,
- * and also in Tx command embedded in REPLY_SCAN_CMD for active scans. */
+ * and also in Tx command embedded in C_SCAN for active scans. */
#define TX_CMD_FLG_SEQ_CTL_MSK cpu_to_le32(1 << 13)
/* 1: This frame is non-last MPDU; more fragments are coming.
#define TKIP_ICV_LEN 4
/*
- * REPLY_TX = 0x1c (command)
+ * C_TX = 0x1c (command)
*/
struct il3945_tx_cmd {
} __packed;
/*
- * REPLY_TX = 0x1c (response)
+ * C_TX = 0x1c (response)
*/
struct il3945_tx_resp {
u8 failure_rts;
u8 sec_ctl; /* TX_CMD_SEC_* */
/*
- * Index into rate table (see REPLY_TX_LINK_QUALITY_CMD) for initial
+ * Index into rate table (see C_TX_LINK_QUALITY_CMD) for initial
* Tx attempt, if TX_CMD_FLG_STA_RATE_MSK is set. Normally "0" for
* data frames, this field may be used to selectively reduce initial
* rate (via non-0 value) for special frames (e.g. management), while
#define AGG_TX_STATE_SEQ_NUM_MSK 0xffff0000
/*
- * REPLY_TX = 0x1c (response)
+ * C_TX = 0x1c (response)
*
* This response may be in one of two slightly different formats, indicated
* by the frame_count field:
} __packed;
/*
- * REPLY_COMPRESSED_BA = 0xc5 (response only, not a command)
+ * N_COMPRESSED_BA = 0xc5 (response only, not a command)
*
* Reports Block-Acknowledge from recipient station
*/
} __packed;
/*
- * REPLY_TX_PWR_TBL_CMD = 0x97 (command, has simple generic response)
+ * C_TX_PWR_TBL = 0x97 (command, has simple generic response)
*
* See details under "TXPOWER" in 4965.h.
*/
/**
* struct il3945_rate_scaling_cmd - Rate Scaling Command & Response
*
- * REPLY_RATE_SCALE = 0x47 (command, has simple generic response)
+ * C_RATE_SCALE = 0x47 (command, has simple generic response)
*
* NOTE: The table of rates passed to the uCode via the
* RATE_SCALE command sets up the corresponding order of
*
* For example, if you set 9MB (PLCP 0x0f) as the first
* rate in the rate table, the bit mask for that rate
- * when passed through ofdm_basic_rates on the REPLY_RXON
+ * when passed through ofdm_basic_rates on the C_RXON
* command would be bit 0 (1 << 0)
*/
struct il3945_rate_scaling_info {
/**
* struct il_link_qual_general_params
*
- * Used in REPLY_TX_LINK_QUALITY_CMD
+ * Used in C_TX_LINK_QUALITY_CMD
*/
struct il_link_qual_general_params {
u8 flags;
/**
* struct il_link_qual_agg_params
*
- * Used in REPLY_TX_LINK_QUALITY_CMD
+ * Used in C_TX_LINK_QUALITY_CMD
*/
struct il_link_qual_agg_params {
} __packed;
/*
- * REPLY_TX_LINK_QUALITY_CMD = 0x4e (command, has simple generic response)
+ * C_TX_LINK_QUALITY_CMD = 0x4e (command, has simple generic response)
*
- * For 4965 devices only; 3945 uses REPLY_RATE_SCALE.
+ * For 4965 devices only; 3945 uses C_RATE_SCALE.
*
* Each station in the 4965 device's internal station table has its own table
* of 16
* one station.
*
* NOTE: Station must already be in 4965 device's station table.
- * Use REPLY_ADD_STA.
+ * Use C_ADD_STA.
*
* The rate scaling procedures described below work well. Of course, other
* procedures are possible, and may work better for particular environments.
#define BT_MAX_KILL_DEF (0x5)
/*
- * REPLY_BT_CONFIG = 0x9b (command, has simple generic response)
+ * C_BT_CONFIG = 0x9b (command, has simple generic response)
*
* 3945 and 4965 devices support hardware handshake with Bluetooth device on
* same platform. Bluetooth device alerts wireless device when it will Tx;
} __packed;
/*
- * REPLY_SPECTRUM_MEASUREMENT_CMD = 0x74 (command)
+ * C_SPECTRUM_MEASUREMENT = 0x74 (command)
*/
struct il_spectrum_cmd {
__le16 len; /* number of bytes starting from token */
} __packed;
/*
- * REPLY_SPECTRUM_MEASUREMENT_CMD = 0x74 (response)
+ * C_SPECTRUM_MEASUREMENT = 0x74 (response)
*/
struct il_spectrum_resp {
u8 token;
};
/*
- * SPECTRUM_MEASURE_NOTIFICATION = 0x75 (notification only, not a command)
+ * N_SPECTRUM_MEASUREMENT = 0x75 (notification only, not a command)
*/
struct il_spectrum_notification {
u8 id; /* measurement id -- 0 or 1 */
* struct il_powertable_cmd - Power Table Command
* @flags: See below:
*
- * POWER_TBL_CMD = 0x77 (command, has simple generic response)
+ * C_POWER_TBL = 0x77 (command, has simple generic response)
*
* PM allow:
* bit 0 - '0' Driver not allow power management
} __packed;
/*
- * PM_SLEEP_NOTIFICATION = 0x7A (notification only, not a command)
+ * N_PM_SLEEP = 0x7A (notification only, not a command)
* all devices identical.
*/
struct il_sleep_notification {
};
/*
- * CARD_STATE_NOTIFICATION = 0xa1 (notification only, not a command)
+ * N_CARD_STATE = 0xa1 (notification only, not a command)
*/
struct il_card_state_notif {
__le32 flags;
#define SCAN_CHANNEL_TYPE_ACTIVE cpu_to_le32(1)
/**
- * struct il_scan_channel - entry in REPLY_SCAN_CMD channel table
+ * struct il_scan_channel - entry in C_SCAN channel table
*
* One for each channel in the scan list.
* Each channel can independently select:
/**
* struct il_ssid_ie - directed scan network information element
*
- * Up to 20 of these may appear in REPLY_SCAN_CMD (Note: Only 4 are in
+ * Up to 20 of these may appear in C_SCAN (Note: Only 4 are in
* 3945 SCAN api), selected by "type" bit field in struct il_scan_channel;
* each channel may select different ssids from among the 20 (4) entries.
* SSID IEs get transmitted in reverse order of entry.
#define IL_MAX_CMD_SIZE 4096
/*
- * REPLY_SCAN_CMD = 0x80 (command)
+ * C_SCAN = 0x80 (command)
*
* The hardware scan command is very powerful; the driver can set it up to
* maintain (relatively) normal network traffic while doing a scan in the
*
* NOTE: Only one band of channels can be scanned per pass. You
* must not mix 2.4GHz channels and 5.2GHz channels, and you must wait
- * for one scan to complete (i.e. receive SCAN_COMPLETE_NOTIFICATION)
+ * for one scan to complete (i.e. receive N_SCAN_COMPLETE)
* before requesting another scan.
*/
u8 data[0];
*
* NOTE: Only one band of channels can be scanned per pass. You
* must not mix 2.4GHz channels and 5.2GHz channels, and you must wait
- * for one scan to complete (i.e. receive SCAN_COMPLETE_NOTIFICATION)
+ * for one scan to complete (i.e. receive N_SCAN_COMPLETE)
* before requesting another scan.
*/
u8 data[0];
#define ABORT_STATUS 0x2
/*
- * REPLY_SCAN_CMD = 0x80 (response)
+ * C_SCAN = 0x80 (response)
*/
struct il_scanreq_notification {
__le32 status; /* 1: okay, 2: cannot fulfill request */
} __packed;
/*
- * SCAN_START_NOTIFICATION = 0x82 (notification only, not a command)
+ * N_SCAN_START = 0x82 (notification only, not a command)
*/
struct il_scanstart_notification {
__le32 tsf_low;
#define NUMBER_OF_STATS 1 /* first __le32 is good CRC */
/*
- * SCAN_RESULTS_NOTIFICATION = 0x83 (notification only, not a command)
+ * N_SCAN_RESULTS = 0x83 (notification only, not a command)
*/
struct il_scanresults_notification {
u8 channel;
} __packed;
/*
- * SCAN_COMPLETE_NOTIFICATION = 0x84 (notification only, not a command)
+ * N_SCAN_COMPLETE = 0x84 (notification only, not a command)
*/
struct il_scancomplete_notification {
u8 scanned_channels;
};
/*
- * BEACON_NOTIFICATION = 0x90 (notification only, not a command)
+ * N_BEACON = 0x90 (notification only, not a command)
*/
struct il3945_beacon_notif {
} __packed;
/*
- * REPLY_TX_BEACON = 0x91 (command, has simple generic response)
+ * C_TX_BEACON= 0x91 (command, has simple generic response)
*/
struct il3945_tx_beacon_cmd {
#define UCODE_STATS_NARROW_BAND_MSK (0x1 << 2)
/*
- * REPLY_STATS_CMD = 0x9c,
+ * C_STATS = 0x9c,
* all devices identical.
*
* This command triggers an immediate response containing uCode stats.
- * The response is in the same format as STATS_NOTIFICATION 0x9d, below.
+ * The response is in the same format as N_STATS 0x9d, below.
*
* If the CLEAR_STATS configuration flag is set, uCode will clear its
* internal copy of the stats (counters) after issuing the response.
- * This flag does not affect STATS_NOTIFICATIONs after beacons (see below).
+ * This flag does not affect N_STATSs after beacons (see below).
*
* If the DISABLE_NOTIF configuration flag is set, uCode will not issue
- * STATS_NOTIFICATIONs after received beacons (see below). This flag
- * does not affect the response to the REPLY_STATS_CMD 0x9c itself.
+ * N_STATSs after received beacons (see below). This flag
+ * does not affect the response to the C_STATS 0x9c itself.
*/
#define IL_STATS_CONF_CLEAR_STATS cpu_to_le32(0x1) /* see above */
#define IL_STATS_CONF_DISABLE_NOTIF cpu_to_le32(0x2)/* see above */
} __packed;
/*
- * STATS_NOTIFICATION = 0x9d (notification only, not a command)
+ * N_STATS = 0x9d (notification only, not a command)
*
* By default, uCode issues this notification after receiving a beacon
* while associated. To disable this behavior, set DISABLE_NOTIF flag in the
- * REPLY_STATS_CMD 0x9c, above.
+ * C_STATS 0x9c, above.
*
* Statistics counters continue to increment beacon after beacon, but are
- * cleared when changing channels or when driver issues REPLY_STATS_CMD
+ * cleared when changing channels or when driver issues C_STATS
* 0x9c with CLEAR_STATS bit set (see above).
*
* uCode also issues this notification during scans. uCode clears stats
} __packed;
/*
- * MISSED_BEACONS_NOTIFICATION = 0xa2 (notification only, not a command)
+ * N_MISSED_BEACONS = 0xa2 (notification only, not a command)
*
- * uCode send MISSED_BEACONS_NOTIFICATION to driver when detect beacon missed
+ * uCode send N_MISSED_BEACONS to driver when detect beacon missed
* in regardless of how many missed beacons, which mean when driver receive the
* notification, inside the command, it can find all the beacons information
* which include number of total missed beacons, number of consecutive missed
*****************************************************************************/
/**
- * SENSITIVITY_CMD = 0xa8 (command, has simple generic response)
+ * C_SENSITIVITY = 0xa8 (command, has simple generic response)
*
* This command sets up the Rx signal detector for a sensitivity level that
* is high enough to lock onto all signals within the associated network,
* time listening, not transmitting). Driver must adjust sensitivity so that
* the ratio of actual false alarms to actual Rx time falls within this range.
*
- * While associated, uCode delivers STATS_NOTIFICATIONs after each
+ * While associated, uCode delivers N_STATSs after each
* received beacon. These provide information to the driver to analyze the
* sensitivity. Don't analyze stats that come in from scanning, or any
* other non-associated-network source. Pertinent stats include:
*/
/*
- * Table entries in SENSITIVITY_CMD (struct il_sensitivity_cmd)
+ * Table entries in C_SENSITIVITY (struct il_sensitivity_cmd)
*/
#define HD_TBL_SIZE (11) /* number of entries */
#define HD_MIN_ENERGY_CCK_DET_IDX (0) /* table idxes */
#define HD_OFDM_ENERGY_TH_IN_IDX (10)
/* Control field in struct il_sensitivity_cmd */
-#define SENSITIVITY_CMD_CONTROL_DEFAULT_TBL cpu_to_le16(0)
-#define SENSITIVITY_CMD_CONTROL_WORK_TBL cpu_to_le16(1)
+#define C_SENSITIVITY_CONTROL_DEFAULT_TBL cpu_to_le16(0)
+#define C_SENSITIVITY_CONTROL_WORK_TBL cpu_to_le16(1)
/**
* struct il_sensitivity_cmd
/**
- * REPLY_PHY_CALIBRATION_CMD = 0xb0 (command, has simple generic response)
+ * C_PHY_CALIBRATION = 0xb0 (command, has simple generic response)
*
* This command sets the relative gains of 4965 device's 3 radio receiver chains.
*
* After the first association, driver should accumulate signal and noise
- * stats from the STATS_NOTIFICATIONs that follow the first 20
+ * stats from the N_STATSs that follow the first 20
* beacons from the associated network (don't collect stats that come
* in from scanning, or any other non-network source).
*
/*
* LEDs Command & Response
- * REPLY_LEDS_CMD = 0x48 (command, has simple generic response)
+ * C_LEDS = 0x48 (command, has simple generic response)
*
* For each of 3 possible LEDs (Activity/Link/Tech, selected by "id" field),
* this command turns it on or off, or sets up a periodic blinking cycle.
D_INFO("BT coex %s\n",
(bt_cmd.flags == BT_COEX_DISABLE) ? "disable" : "active");
- if (il_send_cmd_pdu(il, REPLY_BT_CONFIG,
+ if (il_send_cmd_pdu(il, C_BT_CONFIG,
sizeof(struct il_bt_cmd), &bt_cmd))
IL_ERR("failed to send BT Coex Config\n");
}
};
if (flags & CMD_ASYNC)
- return il_send_cmd_pdu_async(il, REPLY_STATS_CMD,
+ return il_send_cmd_pdu_async(il, C_STATS,
sizeof(struct il_stats_cmd),
&stats_cmd, NULL);
else
- return il_send_cmd_pdu(il, REPLY_STATS_CMD,
+ return il_send_cmd_pdu(il, C_STATS,
sizeof(struct il_stats_cmd),
&stats_cmd);
}
pos += scnprintf(buf + pos, bufsz - pos,
"Rx command responses:\t\t %u\n",
il->isr_stats.rx);
- for (cnt = 0; cnt < REPLY_MAX; cnt++) {
+ for (cnt = 0; cnt < IL_CN_MAX; cnt++) {
if (il->isr_stats.rx_handlers[cnt] > 0)
pos += scnprintf(buf + pos, bufsz - pos,
"\tRx handler[%36s]:\t\t %u\n",
* @bitmap1: High order, one bit for each frame pending ACK in Tx win
* @rate_n_flags: Rate at which Tx was attempted
*
- * If REPLY_TX indicates that aggregation was attempted, driver must wait
- * for block ack (REPLY_COMPRESSED_BA). This struct stores tx reply info
+ * If C_TX indicates that aggregation was attempted, driver must wait
+ * for block ack (N_COMPRESSED_BA). This struct stores tx reply info
* until block ack arrives.
*/
struct il_ht_agg {
u32 ctkill;
u32 wakeup;
u32 rx;
- u32 rx_handlers[REPLY_MAX];
+ u32 rx_handlers[IL_CN_MAX];
u32 tx;
u32 unhandled;
};
enum ieee80211_band band;
int alloc_rxb_page;
- void (*rx_handlers[REPLY_MAX])(struct il_priv *il,
+ void (*rx_handlers[IL_CN_MAX])(struct il_priv *il,
struct il_rx_buf *rxb);
struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
const char *il_get_cmd_string(u8 cmd)
{
switch (cmd) {
- IL_CMD(REPLY_ALIVE);
- IL_CMD(REPLY_ERROR);
- IL_CMD(REPLY_RXON);
- IL_CMD(REPLY_RXON_ASSOC);
- IL_CMD(REPLY_QOS_PARAM);
- IL_CMD(REPLY_RXON_TIMING);
- IL_CMD(REPLY_ADD_STA);
- IL_CMD(REPLY_REMOVE_STA);
- IL_CMD(REPLY_WEPKEY);
- IL_CMD(REPLY_3945_RX);
- IL_CMD(REPLY_TX);
- IL_CMD(REPLY_RATE_SCALE);
- IL_CMD(REPLY_LEDS_CMD);
- IL_CMD(REPLY_TX_LINK_QUALITY_CMD);
- IL_CMD(REPLY_CHANNEL_SWITCH);
- IL_CMD(CHANNEL_SWITCH_NOTIFICATION);
- IL_CMD(REPLY_SPECTRUM_MEASUREMENT_CMD);
- IL_CMD(SPECTRUM_MEASURE_NOTIFICATION);
- IL_CMD(POWER_TBL_CMD);
- IL_CMD(PM_SLEEP_NOTIFICATION);
- IL_CMD(PM_DEBUG_STATISTIC_NOTIFIC);
- IL_CMD(REPLY_SCAN_CMD);
- IL_CMD(REPLY_SCAN_ABORT_CMD);
- IL_CMD(SCAN_START_NOTIFICATION);
- IL_CMD(SCAN_RESULTS_NOTIFICATION);
- IL_CMD(SCAN_COMPLETE_NOTIFICATION);
- IL_CMD(BEACON_NOTIFICATION);
- IL_CMD(REPLY_TX_BEACON);
- IL_CMD(REPLY_TX_PWR_TBL_CMD);
- IL_CMD(REPLY_BT_CONFIG);
- IL_CMD(REPLY_STATS_CMD);
- IL_CMD(STATS_NOTIFICATION);
- IL_CMD(CARD_STATE_NOTIFICATION);
- IL_CMD(MISSED_BEACONS_NOTIFICATION);
- IL_CMD(REPLY_CT_KILL_CONFIG_CMD);
- IL_CMD(SENSITIVITY_CMD);
- IL_CMD(REPLY_PHY_CALIBRATION_CMD);
- IL_CMD(REPLY_RX_PHY_CMD);
- IL_CMD(REPLY_RX_MPDU_CMD);
- IL_CMD(REPLY_RX);
- IL_CMD(REPLY_COMPRESSED_BA);
+ IL_CMD(N_ALIVE);
+ IL_CMD(N_ERROR);
+ IL_CMD(C_RXON);
+ IL_CMD(C_RXON_ASSOC);
+ IL_CMD(C_QOS_PARAM);
+ IL_CMD(C_RXON_TIMING);
+ IL_CMD(C_ADD_STA);
+ IL_CMD(C_REM_STA);
+ IL_CMD(C_WEPKEY);
+ IL_CMD(N_3945_RX);
+ IL_CMD(C_TX);
+ IL_CMD(C_RATE_SCALE);
+ IL_CMD(C_LEDS);
+ IL_CMD(C_TX_LINK_QUALITY_CMD);
+ IL_CMD(C_CHANNEL_SWITCH);
+ IL_CMD(N_CHANNEL_SWITCH);
+ IL_CMD(C_SPECTRUM_MEASUREMENT);
+ IL_CMD(N_SPECTRUM_MEASUREMENT);
+ IL_CMD(C_POWER_TBL);
+ IL_CMD(N_PM_SLEEP);
+ IL_CMD(N_PM_DEBUG_STATS);
+ IL_CMD(C_SCAN);
+ IL_CMD(C_SCAN_ABORT);
+ IL_CMD(N_SCAN_START);
+ IL_CMD(N_SCAN_RESULTS);
+ IL_CMD(N_SCAN_COMPLETE);
+ IL_CMD(N_BEACON);
+ IL_CMD(C_TX_BEACON);
+ IL_CMD(C_TX_PWR_TBL);
+ IL_CMD(C_BT_CONFIG);
+ IL_CMD(C_STATS);
+ IL_CMD(N_STATS);
+ IL_CMD(N_CARD_STATE);
+ IL_CMD(N_MISSED_BEACONS);
+ IL_CMD(C_CT_KILL_CONFIG);
+ IL_CMD(C_SENSITIVITY);
+ IL_CMD(C_PHY_CALIBRATION);
+ IL_CMD(N_RX_PHY);
+ IL_CMD(N_RX_MPDU);
+ IL_CMD(N_RX);
+ IL_CMD(N_COMPRESSED_BA);
default:
return "UNKNOWN";
#ifdef CONFIG_IWLEGACY_DEBUG
switch (cmd->hdr.cmd) {
- case REPLY_TX_LINK_QUALITY_CMD:
- case SENSITIVITY_CMD:
+ case C_TX_LINK_QUALITY_CMD:
+ case C_SENSITIVITY:
D_HC_DUMP("back from %s (0x%08X)\n",
il_get_cmd_string(cmd->hdr.cmd), pkt->hdr.flags);
break;
le32_to_cpu(cmd->sleep_interval[3]),
le32_to_cpu(cmd->sleep_interval[4]));
- return il_send_cmd_pdu(il, POWER_TBL_CMD,
+ return il_send_cmd_pdu(il, C_POWER_TBL,
sizeof(struct il_powertable_cmd), cmd);
}
* procedure.
*
* This save/restore method is mostly for autonomous power management during
- * normal operation (result of POWER_TBL_CMD). Platform suspend/resume and
+ * normal operation (result of C_POWER_TBL). Platform suspend/resume and
* RFKILL should use complete restarts (with total re-initialization) of uCode,
* allowing total shutdown (including BSM memory).
*
int ret;
struct il_rx_pkt *pkt;
struct il_host_cmd cmd = {
- .id = REPLY_SCAN_ABORT_CMD,
+ .id = C_SCAN_ABORT,
.flags = CMD_WANT_SKB,
};
}
EXPORT_SYMBOL(il_scan_cancel_timeout);
-/* Service response to REPLY_SCAN_CMD (0x80) */
+/* Service response to C_SCAN (0x80) */
static void il_rx_reply_scan(struct il_priv *il,
struct il_rx_buf *rxb)
{
#endif
}
-/* Service SCAN_START_NOTIFICATION (0x82) */
+/* Service N_SCAN_START (0x82) */
static void il_rx_scan_start_notif(struct il_priv *il,
struct il_rx_buf *rxb)
{
notif->status, notif->beacon_timer);
}
-/* Service SCAN_RESULTS_NOTIFICATION (0x83) */
+/* Service N_SCAN_RESULTS (0x83) */
static void il_rx_scan_results_notif(struct il_priv *il,
struct il_rx_buf *rxb)
{
#endif
}
-/* Service SCAN_COMPLETE_NOTIFICATION (0x84) */
+/* Service N_SCAN_COMPLETE (0x84) */
static void il_rx_scan_complete_notif(struct il_priv *il,
struct il_rx_buf *rxb)
{
void il_setup_rx_scan_handlers(struct il_priv *il)
{
/* scan handlers */
- il->rx_handlers[REPLY_SCAN_CMD] = il_rx_reply_scan;
- il->rx_handlers[SCAN_START_NOTIFICATION] =
+ il->rx_handlers[C_SCAN] = il_rx_reply_scan;
+ il->rx_handlers[N_SCAN_START] =
il_rx_scan_start_notif;
- il->rx_handlers[SCAN_RESULTS_NOTIFICATION] =
+ il->rx_handlers[N_SCAN_RESULTS] =
il_rx_scan_results_notif;
- il->rx_handlers[SCAN_COMPLETE_NOTIFICATION] =
+ il->rx_handlers[N_SCAN_COMPLETE] =
il_rx_scan_complete_notif;
}
EXPORT_SYMBOL(il_setup_rx_scan_handlers);
int ret = -EIO;
if (pkt->hdr.flags & IL_CMD_FAILED_MSK) {
- IL_ERR("Bad return from REPLY_ADD_STA (0x%08X)\n",
+ IL_ERR("Bad return from C_ADD_STA (0x%08X)\n",
pkt->hdr.flags);
return ret;
}
switch (pkt->u.add_sta.status) {
case ADD_STA_SUCCESS_MSK:
- D_INFO("REPLY_ADD_STA PASSED\n");
+ D_INFO("C_ADD_STA PASSED\n");
il_sta_ucode_activate(il, sta_id);
ret = 0;
break;
sta_id);
break;
default:
- D_ASSOC("Received REPLY_ADD_STA:(0x%08X)\n",
+ D_ASSOC("Received C_ADD_STA:(0x%08X)\n",
pkt->u.add_sta.status);
break;
}
int ret = 0;
u8 data[sizeof(*sta)];
struct il_host_cmd cmd = {
- .id = REPLY_ADD_STA,
+ .id = C_ADD_STA,
.flags = flags,
.data = data,
};
sta_id, addr);
il->num_stations++;
- /* Set up the REPLY_ADD_STA command to send to device */
+ /* Set up the C_ADD_STA command to send to device */
memset(&station->sta, 0, sizeof(struct il_addsta_cmd));
memcpy(station->sta.sta.addr, addr, ETH_ALEN);
station->sta.mode = 0;
struct il_rem_sta_cmd rm_sta_cmd;
struct il_host_cmd cmd = {
- .id = REPLY_REMOVE_STA,
+ .id = C_REM_STA,
.len = sizeof(struct il_rem_sta_cmd),
.flags = CMD_SYNC,
.data = &rm_sta_cmd,
pkt = (struct il_rx_pkt *)cmd.reply_page;
if (pkt->hdr.flags & IL_CMD_FAILED_MSK) {
- IL_ERR("Bad return from REPLY_REMOVE_STA (0x%08X)\n",
+ IL_ERR("Bad return from C_REM_STA (0x%08X)\n",
pkt->hdr.flags);
ret = -EIO;
}
spin_unlock_irqrestore(&il->sta_lock,
flags_spin);
}
- D_ASSOC("REPLY_REMOVE_STA PASSED\n");
+ D_ASSOC("C_REM_STA PASSED\n");
break;
default:
ret = -EIO;
- IL_ERR("REPLY_REMOVE_STA failed\n");
+ IL_ERR("C_REM_STA failed\n");
break;
}
}
unsigned long flags_spin;
struct il_host_cmd cmd = {
- .id = REPLY_TX_LINK_QUALITY_CMD,
+ .id = C_TX_LINK_QUALITY_CMD,
.len = sizeof(struct il_link_quality_cmd),
.flags = flags,
.data = lq,
#ifdef CONFIG_IWLEGACY_DEBUG
switch (out_cmd->hdr.cmd) {
- case REPLY_TX_LINK_QUALITY_CMD:
- case SENSITIVITY_CMD:
+ case C_TX_LINK_QUALITY_CMD:
+ case C_SENSITIVITY:
D_HC_DUMP(
"Sending command %s (#%x), seq: 0x%04X, "
"%d bytes at %d[%d]:%d\n",