Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278179
b: refs/heads/master
c: 4d69c75
h: refs/heads/master
i:
  278177: d7e7e12
  278175: 4788c6e
v: v3
  • Loading branch information
Stanislaw Gruszka committed Nov 15, 2011
1 parent 1f2af4a commit 0b8fed9
Show file tree
Hide file tree
Showing 18 changed files with 318 additions and 318 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: db7746f78cab25ee39dd20f61d9b2e6b5993d8fa
refs/heads/master: 4d69c7521a90cba945b4720672b4511b1e541189
62 changes: 31 additions & 31 deletions trunk/drivers/net/wireless/iwlegacy/3945-mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ static int il3945_send_beacon_cmd(struct il_priv *il)

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);
Expand Down Expand Up @@ -406,7 +406,7 @@ static void il3945_build_tx_cmd_hwcrypto(struct il_priv *il,
}

/*
* 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,
Expand Down Expand Up @@ -460,7 +460,7 @@ static void il3945_build_tx_cmd_basic(struct il_priv *il,
}

/*
* start REPLY_TX command process
* start C_TX command process
*/
static int il3945_tx_skb(struct il_priv *il, struct sk_buff *skb)
{
Expand Down Expand Up @@ -560,7 +560,7 @@ 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)));

Expand Down Expand Up @@ -672,7 +672,7 @@ static int il3945_get_measurement(struct il_priv *il,
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,
};
Expand Down Expand Up @@ -717,7 +717,7 @@ static int il3945_get_measurement(struct il_priv *il,

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;
}

Expand Down Expand Up @@ -786,7 +786,7 @@ static void il3945_rx_reply_add_sta(struct il_priv *il,
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,
Expand Down Expand Up @@ -853,27 +853,27 @@ static void il3945_rx_card_state_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);
Expand Down Expand Up @@ -1253,8 +1253,8 @@ static void il3945_rx_handle(struct il_priv *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
Expand Down Expand Up @@ -2137,9 +2137,9 @@ static int il3945_set_ucode_ptrs(struct il_priv *il)
}

/**
* 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.
*/
Expand Down Expand Up @@ -2180,7 +2180,7 @@ static void il3945_init_alive_start(struct il_priv *il)
}

/**
* 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()).
*/
Expand Down Expand Up @@ -2553,7 +2553,7 @@ static void il3945_rfkill_poll(struct work_struct *data)
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,
};
Expand Down Expand Up @@ -2767,7 +2767,7 @@ void il3945_post_associate(struct il_priv *il)

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;
Expand Down Expand Up @@ -2931,7 +2931,7 @@ void il3945_config_ap(struct il_priv *il)
/* 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;
Expand Down Expand Up @@ -3657,12 +3657,12 @@ static int il3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *en

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);
Expand Down
24 changes: 12 additions & 12 deletions trunk/drivers/net/wireless/iwlegacy/3945.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static int il3945_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,
Expand Down Expand Up @@ -1444,7 +1444,7 @@ static int il3945_send_tx_power(struct il_priv *il)
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);

Expand Down Expand Up @@ -1673,7 +1673,7 @@ static int il3945_send_rxon_assoc(struct il_priv *il,
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,
Expand Down Expand Up @@ -1701,7 +1701,7 @@ static int il3945_send_rxon_assoc(struct il_priv *il,

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;
}

Expand Down Expand Up @@ -1782,7 +1782,7 @@ int il3945_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx)
*/
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);

Expand Down Expand Up @@ -1818,7 +1818,7 @@ int il3945_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx)
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) {
Expand Down Expand Up @@ -2237,9 +2237,9 @@ int il3945_hw_tx_queue_init(struct il_priv *il, struct il_tx_queue *txq)
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;
Expand Down Expand Up @@ -2383,14 +2383,14 @@ int il3945_init_hw_rate_table(struct il_priv *il)

/* 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);
}

Expand Down Expand Up @@ -2464,8 +2464,8 @@ unsigned int il3945_hw_get_beacon_cmd(struct il_priv *il,

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)
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/net/wireless/iwlegacy/4965-calib.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,13 +410,13 @@ static void il4965_prepare_legacy_sensitivity_tbl(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,
Expand All @@ -429,12 +429,12 @@ static int il4965_sensitivity_write(struct il_priv *il)
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;
}

Expand Down Expand Up @@ -776,11 +776,11 @@ static void il4965_gain_computation(struct il_priv *il,
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 */
Expand Down
Loading

0 comments on commit 0b8fed9

Please sign in to comment.