Commit 15b1687c authored by Winkler, Tomas's avatar Winkler, Tomas Committed by John W. Linville

iwlwifi: replace IWL_ERROR with IWL_ERR

IWL_ERR doesn't use hidden priv pointer.
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 39aadf8c
......@@ -216,7 +216,7 @@ static int iwl3945_led_register_led(struct iwl_priv *priv,
ret = led_classdev_register(device, &led->led_dev);
if (ret) {
IWL_ERROR("Error: failed to register led handler.\n");
IWL_ERR(priv, "Error: failed to register led handler.\n");
return ret;
}
......
......@@ -152,7 +152,7 @@ void iwl3945_disable_events(struct iwl_priv *priv)
base = le32_to_cpu(priv->card_alive.log_event_table_ptr);
if (!iwl3945_hw_valid_rtc_data_addr(base)) {
IWL_ERROR("Invalid event log pointer 0x%08X\n", base);
IWL_ERR(priv, "Invalid event log pointer 0x%08X\n", base);
return;
}
......@@ -224,7 +224,7 @@ __le32 iwl3945_get_antenna_flags(const struct iwl_priv *priv)
}
/* bad antenna selector value */
IWL_ERROR("Bad antenna selector value (0x%x)\n", priv->antenna);
IWL_ERR(priv, "Bad antenna selector value (0x%x)\n", priv->antenna);
return 0; /* "diversity" is default if error */
}
......@@ -344,7 +344,7 @@ static void iwl3945_rx_reply_tx(struct iwl_priv *priv,
int fail;
if ((index >= txq->q.n_bd) || (iwl3945_x2_queue_used(&txq->q, index) == 0)) {
IWL_ERROR("Read index for DMA queue txq_id (%d) index %d "
IWL_ERR(priv, "Read index for DMA queue txq_id (%d) index %d "
"is out of range [0-%d] %d %d\n", txq_id,
index, txq->q.n_bd, txq->q.write_ptr,
txq->q.read_ptr);
......@@ -376,7 +376,7 @@ static void iwl3945_rx_reply_tx(struct iwl_priv *priv,
iwl3945_tx_queue_reclaim(priv, txq_id, index);
if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK))
IWL_ERROR("TODO: Implement Tx ABORT REQUIRED!!!\n");
IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n");
}
......@@ -734,7 +734,7 @@ int iwl3945_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *ptr,
pad = TFD_CTL_PAD_GET(le32_to_cpu(tfd->control_flags));
if ((count >= NUM_TFD_CHUNKS) || (count < 0)) {
IWL_ERROR("Error can not send more than %d chunks\n",
IWL_ERR(priv, "Error can not send more than %d chunks\n",
NUM_TFD_CHUNKS);
return -EINVAL;
}
......@@ -771,7 +771,7 @@ int iwl3945_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl3945_tx_queue *txq)
/* sanity check */
counter = TFD_CTL_COUNT_GET(le32_to_cpu(bd->control_flags));
if (counter > NUM_TFD_CHUNKS) {
IWL_ERROR("Too many chunks: %i\n", counter);
IWL_ERR(priv, "Too many chunks: %i\n", counter);
/* @todo issue fatal error, it is quite serious situation */
return 0;
}
......@@ -1065,7 +1065,7 @@ static int iwl3945_txq_ctx_reset(struct iwl_priv *priv)
rc = iwl3945_tx_queue_init(priv, &priv->txq39[txq_id], slots_num,
txq_id);
if (rc) {
IWL_ERROR("Tx %d queue init failed\n", txq_id);
IWL_ERR(priv, "Tx %d queue init failed\n", txq_id);
goto error;
}
}
......@@ -1177,7 +1177,7 @@ int iwl3945_hw_nic_init(struct iwl_priv *priv)
if (!rxq->bd) {
rc = iwl3945_rx_queue_alloc(priv);
if (rc) {
IWL_ERROR("Unable to initialize Rx queue\n");
IWL_ERR(priv, "Unable to initialize Rx queue\n");
return -ENOMEM;
}
} else
......@@ -1377,7 +1377,7 @@ static int iwl3945_hw_reg_txpower_get_temperature(struct iwl_priv *priv)
/* handle insane temp reading */
if (iwl3945_hw_reg_temp_out_of_range(temperature)) {
IWL_ERROR("Error bad temperature value %d\n", temperature);
IWL_ERR(priv, "Error bad temperature value %d\n", temperature);
/* if really really hot(?),
* substitute the 3rd band/group's temp measured at factory */
......@@ -1685,8 +1685,8 @@ int iwl3945_hw_reg_send_txpower(struct iwl_priv *priv)
priv->band,
le16_to_cpu(priv->active39_rxon.channel));
if (!ch_info) {
IWL_ERROR
("Failed to get channel info for channel %d [%d]\n",
IWL_ERR(priv,
"Failed to get channel info for channel %d [%d]\n",
le16_to_cpu(priv->active39_rxon.channel), priv->band);
return -EINVAL;
}
......@@ -2224,7 +2224,7 @@ int iwl3945_txpower_set_from_eeprom(struct iwl_priv *priv)
ch_info->group_index,
&power_idx);
if (rc) {
IWL_ERROR("Invalid power index\n");
IWL_ERR(priv, "Invalid power index\n");
return rc;
}
pwr_info->base_power_index = (u8) power_idx;
......@@ -2300,7 +2300,7 @@ int iwl3945_hw_rxq_stop(struct iwl_priv *priv)
rc = iwl_poll_direct_bit(priv, FH39_RSSR_STATUS,
FH39_RSSR_CHNL0_RX_STATUS_CHNL_IDLE, 1000);
if (rc < 0)
IWL_ERROR("Can't stop Rx DMA.\n");
IWL_ERR(priv, "Can't stop Rx DMA.\n");
iwl_release_nic_access(priv);
spin_unlock_irqrestore(&priv->lock, flags);
......@@ -2440,7 +2440,7 @@ int iwl3945_hw_set_hw_params(struct iwl_priv *priv)
&priv->shared_phys);
if (!priv->shared_virt) {
IWL_ERROR("failed to allocate pci memory\n");
IWL_ERR(priv, "failed to allocate pci memory\n");
mutex_unlock(&priv->mutex);
return -ENOMEM;
}
......
......@@ -85,7 +85,7 @@ static int iwl4965_verify_bsm(struct iwl_priv *priv)
reg += sizeof(u32), image++) {
val = iwl_read_prph(priv, reg);
if (val != le32_to_cpu(*image)) {
IWL_ERROR("BSM uCode verification failed at "
IWL_ERR(priv, "BSM uCode verification failed at "
"addr 0x%08X+%u (of %u), is 0x%x, s/b 0x%x\n",
BSM_SRAM_LOWER_BOUND,
reg - BSM_SRAM_LOWER_BOUND, len,
......@@ -203,7 +203,7 @@ static int iwl4965_load_bsm(struct iwl_priv *priv)
if (i < 100)
IWL_DEBUG_INFO("BSM write complete, poll %d iterations\n", i);
else {
IWL_ERROR("BSM write did not complete!\n");
IWL_ERR(priv, "BSM write did not complete!\n");
return -EIO;
}
......@@ -523,7 +523,8 @@ static void iwl4965_chain_noise_reset(struct iwl_priv *priv)
cmd.diff_gain_c = 0;
if (iwl_send_cmd_pdu(priv, REPLY_PHY_CALIBRATION_CMD,
sizeof(cmd), &cmd))
IWL_ERROR("Could not send REPLY_PHY_CALIBRATION_CMD\n");
IWL_ERR(priv,
"Could not send REPLY_PHY_CALIBRATION_CMD\n");
data->state = IWL_CHAIN_NOISE_ACCUMULATE;
IWL_DEBUG_CALIB("Run chain_noise_calibrate\n");
}
......@@ -804,7 +805,8 @@ static int iwl4965_hw_set_hw_params(struct iwl_priv *priv)
if ((priv->cfg->mod_params->num_of_queues > IWL49_NUM_QUEUES) ||
(priv->cfg->mod_params->num_of_queues < IWL_MIN_NUM_QUEUES)) {
IWL_ERROR("invalid queues_num, should be between %d and %d\n",
IWL_ERR(priv,
"invalid queues_num, should be between %d and %d\n",
IWL_MIN_NUM_QUEUES, IWL49_NUM_QUEUES);
return -EINVAL;
}
......@@ -955,7 +957,7 @@ static int iwl4965_interpolate_chan(struct iwl_priv *priv, u32 channel,
s = iwl4965_get_sub_band(priv, channel);
if (s >= EEPROM_TX_POWER_BANDS) {
IWL_ERROR("Tx Power can not find channel %d\n", channel);
IWL_ERR(priv, "Tx Power can not find channel %d\n", channel);
return -1;
}
......@@ -1319,7 +1321,7 @@ static int iwl4965_fill_txpower_tbl(struct iwl_priv *priv, u8 band, u16 channel,
* and 2) mimo txpower balance between Tx chains. */
txatten_grp = iwl4965_get_tx_atten_grp(channel);
if (txatten_grp < 0) {
IWL_ERROR("Can't find txatten group for channel %d.\n",
IWL_ERR(priv, "Can't find txatten group for channel %d.\n",
channel);
return -EINVAL;
}
......@@ -1727,7 +1729,7 @@ static int iwl4965_hw_get_temperature(const struct iwl_priv *priv)
IWL_DEBUG_TEMP("Calib values R[1-3]: %d %d %d R4: %d\n", R1, R2, R3, vt);
if (R3 == R1) {
IWL_ERROR("Calibration conflict R1 == R3\n");
IWL_ERR(priv, "Calibration conflict R1 == R3\n");
return -1;
}
......@@ -2071,10 +2073,10 @@ static int iwl4965_tx_status_reply_tx(struct iwl_priv *priv,
sc = le16_to_cpu(hdr->seq_ctrl);
if (idx != (SEQ_TO_SN(sc) & 0xff)) {
IWL_ERROR("BUG_ON idx doesn't match seq control"
IWL_ERR(priv,
"BUG_ON idx doesn't match seq control"
" idx=%d, seq_idx=%d, seq=%d\n",
idx, SEQ_TO_SN(sc),
hdr->seq_ctrl);
idx, SEQ_TO_SN(sc), hdr->seq_ctrl);
return -1;
}
......@@ -2133,7 +2135,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
u8 *qc = NULL;
if ((index >= txq->q.n_bd) || (iwl_queue_used(&txq->q, index) == 0)) {
IWL_ERROR("Read index for DMA queue txq_id (%d) index %d "
IWL_ERR(priv, "Read index for DMA queue txq_id (%d) index %d "
"is out of range [0-%d] %d %d\n", txq_id,
index, txq->q.n_bd, txq->q.write_ptr,
txq->q.read_ptr);
......@@ -2151,7 +2153,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
sta_id = iwl_get_ra_sta_id(priv, hdr);
if (txq->sched_retry && unlikely(sta_id == IWL_INVALID_STATION)) {
IWL_ERROR("Station not known\n");
IWL_ERR(priv, "Station not known\n");
return;
}
......@@ -2214,7 +2216,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
iwl_txq_check_empty(priv, sta_id, tid, txq_id);
if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK))
IWL_ERROR("TODO: Implement Tx ABORT REQUIRED!!!\n");
IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n");
}
static int iwl4965_calc_rssi(struct iwl_priv *priv,
......
......@@ -289,7 +289,7 @@ static u32 eeprom_indirect_address(const struct iwl_priv *priv, u32 address)
offset = iwl_eeprom_query16(priv, EEPROM_5000_LINK_OTHERS);
break;
default:
IWL_ERROR("illegal indirect type: 0x%X\n",
IWL_ERR(priv, "illegal indirect type: 0x%X\n",
address & INDIRECT_TYPE_MSK);
break;
}
......@@ -384,7 +384,8 @@ static void iwl5000_chain_noise_reset(struct iwl_priv *priv)
ret = iwl_send_cmd_pdu(priv, REPLY_PHY_CALIBRATION_CMD,
sizeof(cmd), &cmd);
if (ret)
IWL_ERROR("Could not send REPLY_PHY_CALIBRATION_CMD\n");
IWL_ERR(priv,
"Could not send REPLY_PHY_CALIBRATION_CMD\n");
data->state = IWL_CHAIN_NOISE_ACCUMULATE;
IWL_DEBUG_CALIB("Run chain_noise_calibrate\n");
}
......@@ -507,7 +508,7 @@ static void iwl5000_rx_calib_result(struct iwl_priv *priv,
index = IWL_CALIB_BASE_BAND;
break;
default:
IWL_ERROR("Unknown calibration notification %d\n",
IWL_ERR(priv, "Unknown calibration notification %d\n",
hdr->op_code);
return;
}
......@@ -589,12 +590,12 @@ static int iwl5000_load_given_ucode(struct iwl_priv *priv,
ret = wait_event_interruptible_timeout(priv->wait_command_queue,
priv->ucode_write_complete, 5 * HZ);
if (ret == -ERESTARTSYS) {
IWL_ERROR("Could not load the INST uCode section due "
IWL_ERR(priv, "Could not load the INST uCode section due "
"to interrupt\n");
return ret;
}
if (!ret) {
IWL_ERROR("Could not load the INST uCode section\n");
IWL_ERR(priv, "Could not load the INST uCode section\n");
return -ETIMEDOUT;
}
......@@ -610,11 +611,11 @@ static int iwl5000_load_given_ucode(struct iwl_priv *priv,
ret = wait_event_interruptible_timeout(priv->wait_command_queue,
priv->ucode_write_complete, 5 * HZ);
if (ret == -ERESTARTSYS) {
IWL_ERROR("Could not load the INST uCode section due "
IWL_ERR(priv, "Could not load the INST uCode section due "
"to interrupt\n");
return ret;
} else if (!ret) {
IWL_ERROR("Could not load the DATA uCode section\n");
IWL_ERR(priv, "Could not load the DATA uCode section\n");
return -ETIMEDOUT;
} else
ret = 0;
......@@ -826,7 +827,8 @@ static int iwl5000_hw_set_hw_params(struct iwl_priv *priv)
{
if ((priv->cfg->mod_params->num_of_queues > IWL50_NUM_QUEUES) ||
(priv->cfg->mod_params->num_of_queues < IWL_MIN_NUM_QUEUES)) {
IWL_ERROR("invalid queues_num, should be between %d and %d\n",
IWL_ERR(priv,
"invalid queues_num, should be between %d and %d\n",
IWL_MIN_NUM_QUEUES, IWL50_NUM_QUEUES);
return -EINVAL;
}
......@@ -1201,7 +1203,8 @@ static int iwl5000_tx_status_reply_tx(struct iwl_priv *priv,
sc = le16_to_cpu(hdr->seq_ctrl);
if (idx != (SEQ_TO_SN(sc) & 0xff)) {
IWL_ERROR("BUG_ON idx doesn't match seq control"
IWL_ERR(priv,
"BUG_ON idx doesn't match seq control"
" idx=%d, seq_idx=%d, seq=%d\n",
idx, SEQ_TO_SN(sc),
hdr->seq_ctrl);
......@@ -1258,7 +1261,7 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv,
int freed;
if ((index >= txq->q.n_bd) || (iwl_queue_used(&txq->q, index) == 0)) {
IWL_ERROR("Read index for DMA queue txq_id (%d) index %d "
IWL_ERR(priv, "Read index for DMA queue txq_id (%d) index %d "
"is out of range [0-%d] %d %d\n", txq_id,
index, txq->q.n_bd, txq->q.write_ptr,
txq->q.read_ptr);
......@@ -1332,7 +1335,7 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv,
iwl_txq_check_empty(priv, sta_id, tid, txq_id);
if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK))
IWL_ERROR("TODO: Implement Tx ABORT REQUIRED!!!\n");
IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n");
}
/* Currently 5000 is the superset of everything */
......
......@@ -101,7 +101,7 @@ int iwl_agn_check_rxon_cmd(struct iwl_priv *priv)
le16_to_cpu(rxon->channel));
if (error) {
IWL_ERROR("Not a valid iwl4965_rxon_assoc_cmd field values\n");
IWL_ERR(priv, "Not a valid iwl_rxon_assoc_cmd field values\n");
return -1;
}
return 0;
......
......@@ -1431,7 +1431,8 @@ static int rs_move_siso_to_other(struct iwl_priv *priv,
if (!tbl->is_SGI)
break;
else
IWL_ERROR("SGI was set in GF+SISO\n");
IWL_ERR(priv,
"SGI was set in GF+SISO\n");
}
search_tbl->is_SGI = !tbl->is_SGI;
rs_set_expected_tpt_table(lq_sta, search_tbl);
......@@ -1748,13 +1749,13 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
rate_scale_index_msk = rate_mask;
if (!((1 << index) & rate_scale_index_msk)) {
IWL_ERROR("Current Rate is not valid\n");
IWL_ERR(priv, "Current Rate is not valid\n");
return;
}
/* Get expected throughput table and history window for current rate */
if (!tbl->expected_tpt) {
IWL_ERROR("tbl->expected_tpt is NULL\n");
IWL_ERR(priv, "tbl->expected_tpt is NULL\n");
return;
}
......
This diff is collapsed.
......@@ -102,7 +102,7 @@ int iwl_send_calib_results(struct iwl_priv *priv)
return 0;
err:
IWL_ERROR("Error %d iteration %d\n", ret, i);
IWL_ERR(priv, "Error %d iteration %d\n", ret, i);
return ret;
}
EXPORT_SYMBOL(iwl_send_calib_results);
......@@ -483,7 +483,7 @@ static int iwl_sensitivity_write(struct iwl_priv *priv)
ret = iwl_send_cmd(priv, &cmd_out);
if (ret)
IWL_ERROR("SENSITIVITY_CMD failed\n");
IWL_ERR(priv, "SENSITIVITY_CMD failed\n");
return ret;
}
......
......@@ -211,7 +211,7 @@ int iwl_hw_nic_init(struct iwl_priv *priv)
if (!rxq->bd) {
ret = iwl_rx_queue_alloc(priv);
if (ret) {
IWL_ERROR("Unable to initialize Rx queue\n");
IWL_ERR(priv, "Unable to initialize Rx queue\n");
return -ENOMEM;
}
} else
......@@ -678,7 +678,7 @@ static int iwl_get_idle_rx_chain_count(struct iwl_priv *priv, int active_cnt)
break;
case WLAN_HT_CAP_SM_PS_INVALID:
default:
IWL_ERROR("invalid mimo ps mode %d\n",
IWL_ERR(priv, "invalid mimo ps mode %d\n",
priv->current_ht_config.sm_ps);
WARN_ON(1);
idle_cnt = -1;
......@@ -830,7 +830,7 @@ int iwl_setup_mac(struct iwl_priv *priv)
ret = ieee80211_register_hw(priv->hw);
if (ret) {
IWL_ERROR("Failed to register hw (error %d)\n", ret);
IWL_ERR(priv, "Failed to register hw (error %d)\n", ret);
return ret;
}
priv->mac80211_registered = 1;
......@@ -901,13 +901,13 @@ int iwl_init_drv(struct iwl_priv *priv)
ret = iwl_init_channel_map(priv);
if (ret) {
IWL_ERROR("initializing regulatory failed: %d\n", ret);
IWL_ERR(priv, "initializing regulatory failed: %d\n", ret);
goto err;
}
ret = iwlcore_init_geos(priv);
if (ret) {
IWL_ERROR("initializing geos failed: %d\n", ret);
IWL_ERR(priv, "initializing geos failed: %d\n", ret);
goto err_free_channel_map;
}
......@@ -1059,7 +1059,7 @@ static int iwl_verify_inst_full(struct iwl_priv *priv, __le32 *image,
* if IWL_DL_IO is set */
val = _iwl_read_direct32(priv, HBUS_TARG_MEM_RDAT);
if (val != le32_to_cpu(*image)) {
IWL_ERROR("uCode INST section is invalid at "
IWL_ERR(priv, "uCode INST section is invalid at "
"offset 0x%x, is 0x%x, s/b 0x%x\n",
save_len - len, val, le32_to_cpu(*image));
ret = -EIO;
......@@ -1115,7 +1115,7 @@ int iwl_verify_ucode(struct iwl_priv *priv)
return 0;
}
IWL_ERROR("NO VALID UCODE IMAGE IN INSTRUCTION SRAM!!\n");
IWL_ERR(priv, "NO VALID UCODE IMAGE IN INSTRUCTION SRAM!!\n");
/* Since nothing seems to match, show first several data entries in
* instruction SRAM, so maybe visual inspection will give a clue.
......@@ -1187,7 +1187,7 @@ void iwl_dump_nic_error_log(struct iwl_priv *priv)
base = le32_to_cpu(priv->card_alive.error_event_table_ptr);
if (!priv->cfg->ops->lib->is_valid_rtc_data_addr(base)) {
IWL_ERROR("Not valid error log pointer 0x%08X\n", base);
IWL_ERR(priv, "Not valid error log pointer 0x%08X\n", base);
return;
}
......@@ -1200,8 +1200,9 @@ void iwl_dump_nic_error_log(struct iwl_priv *priv)
count = iwl_read_targ_mem(priv, base);
if (ERROR_START_OFFSET <= count * ERROR_ELEM_SIZE) {
IWL_ERROR("Start IWL Error Log Dump:\n");
IWL_ERROR("Status: 0x%08lX, count: %d\n", priv->status, count);
IWL_ERR(priv, "Start IWL Error Log Dump:\n");
IWL_ERR(priv, "Status: 0x%08lX, count: %d\n",
priv->status, count);
}
desc = iwl_read_targ_mem(priv, base + 1 * sizeof(u32));
......@@ -1214,12 +1215,12 @@ void iwl_dump_nic_error_log(struct iwl_priv *priv)
line = iwl_read_targ_mem(priv, base + 9 * sizeof(u32));
time = iwl_read_targ_mem(priv, base + 11 * sizeof(u32));
IWL_ERROR("Desc Time "
IWL_ERR(priv, "Desc Time "
"data1 data2 line\n");
IWL_ERROR("%-28s (#%02d) %010u 0x%08X 0x%08X %u\n",
IWL_ERR(priv, "%-28s (#%02d) %010u 0x%08X 0x%08X %u\n",
desc_lookup(desc), desc, time, data1, data2, line);
IWL_ERROR("blink1 blink2 ilink1 ilink2\n");
IWL_ERROR("0x%05X 0x%05X 0x%05X 0x%05X\n", blink1, blink2,
IWL_ERR(priv, "blink1 blink2 ilink1 ilink2\n");
IWL_ERR(priv, "0x%05X 0x%05X 0x%05X 0x%05X\n", blink1, blink2,
ilink1, ilink2);
iwl_release_nic_access(priv);
......@@ -1265,11 +1266,11 @@ static void iwl_print_event_log(struct iwl_priv *priv, u32 start_idx,
ptr += sizeof(u32);
if (mode == 0) {
/* data, ev */
IWL_ERROR("EVT_LOG:0x%08x:%04u\n", time, ev);
IWL_ERR(priv, "EVT_LOG:0x%08x:%04u\n", time, ev);
} else {
data = iwl_read_targ_mem(priv, ptr);
ptr += sizeof(u32);
IWL_ERROR("EVT_LOGT:%010u:0x%08x:%04u\n",
IWL_ERR(priv, "EVT_LOGT:%010u:0x%08x:%04u\n",
time, data, ev);
}
}
......@@ -1291,7 +1292,7 @@ void iwl_dump_nic_event_log(struct iwl_priv *priv)
base = le32_to_cpu(priv->card_alive.log_event_table_ptr);
if (!priv->cfg->ops->lib->is_valid_rtc_data_addr(base)) {
IWL_ERROR("Invalid event log pointer 0x%08X\n", base);
IWL_ERR(priv, "Invalid event log pointer 0x%08X\n", base);
return;
}
......@@ -1311,12 +1312,12 @@ void iwl_dump_nic_event_log(struct iwl_priv *priv)
/* bail out if nothing in log */
if (size == 0) {
IWL_ERROR("Start IWL Event Log Dump: nothing in log\n");
IWL_ERR(priv, "Start IWL Event Log Dump: nothing in log\n");
iwl_release_nic_access(priv);
return;
}
IWL_ERROR("Start IWL Event Log Dump: display count %d, wraps %d\n",
IWL_ERR(priv, "Start IWL Event Log Dump: display count %d, wraps %d\n",
size, num_wraps);
/* if uCode has wrapped back to top of log, start at the oldest entry,
......@@ -1348,7 +1349,7 @@ void iwl_rf_kill_ct_config(struct iwl_priv *priv)
ret = iwl_send_cmd_pdu(priv, REPLY_CT_KILL_CONFIG_CMD,
sizeof(cmd), &cmd);
if (ret)
IWL_ERROR("REPLY_CT_KILL_CONFIG_CMD failed\n");
IWL_ERR(priv, "REPLY_CT_KILL_CONFIG_CMD failed\n");
else
IWL_DEBUG_INFO("REPLY_CT_KILL_CONFIG_CMD succeeded, "
"critical temperature is %d\n",
......
......@@ -31,7 +31,6 @@
struct iwl_priv;
#define IWL_ERROR(f, a...) dev_err(&(priv->pci_dev->dev), f, ## a)
#define IWL_ERR(p, f, a...) dev_err(&((p)->pci_dev->dev), f, ## a)
#define IWL_WARN(p, f, a...) dev_warn(&((p)->pci_dev->dev), f, ## a)
#define IWL_INFO(p, f, a...) dev_info(&((p)->pci_dev->dev), f, ## a)
......
......@@ -306,14 +306,14 @@ static ssize_t iwl_dbgfs_eeprom_read(struct file *file,
buf_size = 4 * eeprom_len + 256;
if (eeprom_len % 16) {
IWL_ERROR("EEPROM size is not multiple of 16.\n");
IWL_ERR(priv, "EEPROM size is not multiple of 16.\n");
return -ENODATA;
}
/* 4 characters for byte 0xYY */
buf = kzalloc(buf_size, GFP_KERNEL);
if (!buf) {
IWL_ERROR("Can not allocate Buffer\n");
IWL_ERR(priv, "Can not allocate Buffer\n");
return -ENOMEM;
}
......@@ -370,7 +370,7 @@ static ssize_t iwl_dbgfs_channels_read(struct file *file, char __user *user_buf,
buf = kzalloc(bufsz, GFP_KERNEL);
if (!buf) {
IWL_ERROR("Can not allocate Buffer\n");
IWL_ERR(priv, "Can not allocate Buffer\n");
return -ENOMEM;
}
......@@ -474,7 +474,7 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name)
return 0;
err:
IWL_ERROR("Can't open the debugfs directory\n");
IWL_ERR(priv, "Can't open the debugfs directory\n");
iwl_dbgfs_unregister(priv);
return ret;
}
......
......@@ -145,7 +145,7 @@ int iwlcore_eeprom_verify_signature(struct iwl_priv *priv)
{
u32 gp = iwl_read32(priv, CSR_EEPROM_GP);
if ((gp & CSR_EEPROM_GP_VALID_MSK) == CSR_EEPROM_GP_BAD_SIGNATURE) {
IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x\n", gp);
IWL_ERR(priv, "EEPROM not found, EEPROM_GP=0x%08x\n", gp);
return -ENOENT;
}
return 0;
......@@ -223,7 +223,7 @@ int iwl_eeprom_init(struct iwl_priv *priv)
ret = priv->cfg->ops->lib->eeprom_ops.verify_signature(priv);
if (ret < 0) {
IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x\n", gp);
IWL_ERR(priv, "EEPROM not found, EEPROM_GP=0x%08x\n", gp);
ret = -ENOENT;
goto err;
}
......@@ -231,7 +231,7 @@ int iwl_eeprom_init(struct iwl_priv *priv)
/* Make sure driver (instead of uCode) is allowed to read EEPROM */
ret = priv->cfg->ops->lib->eeprom_ops.acquire_semaphore(priv);
if (ret < 0) {
IWL_ERROR("Failed to acquire EEPROM semaphore.\n");
IWL_ERR(priv, "Failed to acquire EEPROM semaphore.\n");
ret = -ENOENT;
goto err;
}
......@@ -247,7 +247,7 @@ int iwl_eeprom_init(struct iwl_priv *priv)
CSR_EEPROM_REG_READ_VALID_MSK,
IWL_EEPROM_ACCESS_TIMEOUT);
if (ret < 0) {
IWL_ERROR("Time out reading EEPROM[%d]\n", addr);
IWL_ERR(priv, "Time out reading EEPROM[%d]\n", addr);
goto done;
}
r = _iwl_read_direct32(priv, CSR_EEPROM_REG);
......@@ -285,7 +285,7 @@ int iwl_eeprom_check_version(struct iwl_priv *priv)
return 0;
err:
IWL_ERROR("Unsupported EEPROM VER=0x%x < 0x%x CALIB=0x%x < 0x%x\n",
IWL_ERR(priv, "Unsupported EEPROM VER=0x%x < 0x%x CALIB=0x%x < 0x%x\n",
eeprom_ver, priv->cfg->eeprom_ver,
calib_ver, priv->cfg->eeprom_calib_ver);
return -EINVAL;
......@@ -450,7 +450,7 @@ int iwl_init_channel_map(struct iwl_priv *priv)
priv->channel_info = kzalloc(sizeof(struct iwl_channel_info) *
priv->channel_count, GFP_KERNEL);
if (!priv->channel_info) {
IWL_ERROR("Could not allocate channel_info\n");
IWL_ERR(priv, "Could not allocate channel_info\n");
priv->channel_count = 0;
return -ENOMEM;
}
......
......@@ -109,14 +109,14 @@ static int iwl_generic_cmd_callback(struct iwl_priv *priv,
struct iwl_rx_packet *pkt = NULL;
if (!skb) {
IWL_ERROR("Error: Response NULL in %s.\n",
IWL_ERR(priv, "Error: Response NULL in %s.\n",
get_cmd_string(cmd->hdr.cmd));
return 1;
}
pkt = (struct iwl_rx_packet *)skb->data;
if (pkt->hdr.flags & IWL_CMD_FAILED_MSK) {
IWL_ERROR("Bad return from %s (0x%08X)\n",
IWL_ERR(priv, "Bad return from %s (0x%08X)\n",
get_cmd_string(cmd->hdr.cmd), pkt->hdr.flags);
return 1;
}
......@@ -156,7 +156,7 @@ static int iwl_send_cmd_async(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
ret = iwl_enqueue_hcmd(priv, cmd);
if (ret < 0) {
IWL_ERROR("Error sending %s: enqueue_hcmd failed: %d\n",
IWL_ERR(priv, "Error sending %s: enqueue_hcmd failed: %d\n",
get_cmd_string(cmd->id), ret);
return ret;
}
......@@ -174,7 +174,8 @@ int iwl_send_cmd_sync(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
BUG_ON(cmd->meta.u.callback != NULL);
if (test_and_set_bit(STATUS_HCMD_SYNC_ACTIVE, &priv->status)) {
IWL_ERROR("Error sending %s: Already sending a host command\n",
IWL_ERR(priv,
"Error sending %s: Already sending a host command\n",
get_cmd_string(cmd->id));
ret = -EBUSY;
goto out;
......@@ -188,7 +189,7 @@ int iwl_send_cmd_sync(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
cmd_idx = iwl_enqueue_hcmd(priv, cmd);
if (cmd_idx < 0) {
ret = cmd_idx;
IWL_ERROR("Error sending %s: enqueue_hcmd failed: %d\n",
IWL_ERR(priv, "Error sending %s: enqueue_hcmd failed: %d\n",
get_cmd_string(cmd->id), ret);
goto out;
}
......@@ -198,7 +199,8 @@ int iwl_send_cmd_sync(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
HOST_COMPLETE_TIMEOUT);
if (!ret) {
if (test_bit(STATUS_HCMD_ACTIVE, &priv->status)) {
IWL_ERROR("Error sending %s: time out after %dms.\n",
IWL_ERR(priv,
"Error sending %s: time out after %dms.\n",
get_cmd_string(cmd->id),
jiffies_to_msecs(HOST_COMPLETE_TIMEOUT));
......@@ -221,7 +223,7 @@ int iwl_send_cmd_sync(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
goto fail;
}
if ((cmd->meta.flags & CMD_WANT_SKB) && !cmd->meta.u.skb) {
IWL_ERROR("Error: Response NULL in '%s'\n",
IWL_ERR(priv, "Error: Response NULL in '%s'\n",
get_cmd_string(cmd->id));
ret = -EIO;
goto cancel;
......
......@@ -167,7 +167,7 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv)
(CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY |
CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 50);
if (ret < 0) {
IWL_ERROR("MAC is in deep sleep!\n");
IWL_ERR(priv, "MAC is in deep sleep!\n");
return -EIO;
}
......@@ -182,7 +182,7 @@ static inline int __iwl_grab_nic_access(const char *f, u32 l,
struct iwl_priv *priv)
{
if (atomic_read(&priv->restrict_refcnt))
IWL_ERROR("Grabbing access while already held %s %d.\n", f, l);
IWL_ERR(priv, "Grabbing access while already held %s %d.\n", f, l);
IWL_DEBUG_IO("grabbing nic access - %s %d\n", f, l);
return _iwl_grab_nic_access(priv);
......@@ -207,7 +207,7 @@ static inline void __iwl_release_nic_access(const char *f, u32 l,
struct iwl_priv *priv)
{
if (atomic_read(&priv->restrict_refcnt) <= 0)
IWL_ERROR("Release unheld nic access at line %s %d.\n", f, l);
IWL_ERR(priv, "Release unheld nic access at line %s %d.\n", f, l);
IWL_DEBUG_IO("releasing nic access - %s %d\n", f, l);
_iwl_release_nic_access(priv);
......@@ -229,7 +229,7 @@ static inline u32 __iwl_read_direct32(const char *f, u32 l,
{
u32 value = _iwl_read_direct32(priv, reg);
if (!atomic_read(&priv->restrict_refcnt))
IWL_ERROR("Nic access not held from %s %d\n", f, l);
IWL_ERR(priv, "Nic access not held from %s %d\n", f, l);
IWL_DEBUG_IO("read_direct32(0x%4X) = 0x%08x - %s %d \n", reg, value,
f, l);
return value;
......@@ -250,7 +250,7 @@ static void __iwl_write_direct32(const char *f , u32 line,
struct iwl_priv *priv, u32 reg, u32 value)
{
if (!atomic_read(&priv->restrict_refcnt))
IWL_ERROR("Nic access not held from %s line %d\n", f, line);
IWL_ERR(priv, "Nic access not held from %s line %d\n", f, line);
_iwl_write_direct32(priv, reg, value);
}
#define iwl_write_direct32(priv, reg, value) \
......@@ -308,7 +308,7 @@ static inline u32 __iwl_read_prph(const char *f, u32 line,
struct iwl_priv *priv, u32 reg)
{
if (!atomic_read(&priv->restrict_refcnt))
IWL_ERROR("Nic access not held from %s line %d\n", f, line);
IWL_ERR(priv, "Nic access not held from %s line %d\n", f, line);
return _iwl_read_prph(priv, reg);
}
......@@ -331,7 +331,7 @@ static inline void __iwl_write_prph(const char *f, u32 line,
struct iwl_priv *priv, u32 addr, u32 val)
{
if (!atomic_read(&priv->restrict_refcnt))
IWL_ERROR("Nic access not held from %s line %d\n", f, line);
IWL_ERR(priv, "Nic access not held from %s line %d\n", f, line);
_iwl_write_prph(priv, addr, val);
}
......@@ -349,7 +349,7 @@ static inline void __iwl_set_bits_prph(const char *f, u32 line,
u32 reg, u32 mask)
{
if (!atomic_read(&priv->restrict_refcnt))
IWL_ERROR("Nic access not held from %s line %d\n", f, line);
IWL_ERR(priv, "Nic access not held from %s line %d\n", f, line);
_iwl_set_bits_prph(priv, reg, mask);
}
......@@ -367,7 +367,7 @@ static inline void __iwl_set_bits_mask_prph(const char *f, u32 line,
struct iwl_priv *priv, u32 reg, u32 bits, u32 mask)
{
if (!atomic_read(&priv->restrict_refcnt))
IWL_ERROR("Nic access not held from %s line %d\n", f, line);
IWL_ERR(priv, "Nic access not held from %s line %d\n", f, line);
_iwl_set_bits_mask_prph(priv, reg, bits, mask);
}
#define iwl_set_bits_mask_prph(priv, reg, bits, mask) \
......
......@@ -254,7 +254,7 @@ static int iwl_leds_register_led(struct iwl_priv *priv, struct iwl_led *led,
ret = led_classdev_register(device, &led->led_dev);
if (ret) {
IWL_ERROR("Error: failed to register led handler.\n");
IWL_ERR(priv, "Error: failed to register led handler.\n");
return ret;
}
......
......@@ -82,7 +82,7 @@ int iwl_rfkill_init(struct iwl_priv *priv)
IWL_DEBUG_RF_KILL("Initializing RFKILL.\n");
priv->rfkill = rfkill_allocate(device, RFKILL_TYPE_WLAN);
if (!priv->rfkill) {
IWL_ERROR("Unable to allocate RFKILL device.\n");
IWL_ERR(priv, "Unable to allocate RFKILL device.\n");
ret = -ENOMEM;
goto error;
}
......@@ -98,7 +98,7 @@ int iwl_rfkill_init(struct iwl_priv *priv)
ret = rfkill_register(priv->rfkill);
if (ret) {
IWL_ERROR("Unable to register RFKILL: %d\n", ret);
IWL_ERR(priv, "Unable to register RFKILL: %d\n", ret);
goto free_rfkill;
}
......
......@@ -894,7 +894,7 @@ static void iwl_pass_packet_to_mac80211(struct iwl_priv *priv,
rx_start = (struct iwl_rx_phy_res *)&priv->last_phy_res[1];
if (!rx_start) {
IWL_ERROR("MPDU frame without a PHY data\n");
IWL_ERR(priv, "MPDU frame without a PHY data\n");
return;
}
if (include_phy) {
......@@ -1020,7 +1020,7 @@ void iwl_rx_reply_rx(struct iwl_priv *priv,
}
if (!rx_start) {
IWL_ERROR("MPDU frame without a PHY data\n");
IWL_ERR(priv, "MPDU frame without a PHY data\n");
return;
}
......
......@@ -146,7 +146,7 @@ static int iwl_get_measurement(struct iwl_priv *priv,
res = (struct iwl_rx_packet *)cmd.meta.u.skb->data;
if (res->hdr.flags & IWL_CMD_FAILED_MSK) {
IWL_ERROR("Bad return from REPLY_RX_ON_ASSOC command\n");
IWL_ERR(priv, "Bad return from REPLY_RX_ON_ASSOC command\n");
rc = -EIO;
}
......
......@@ -87,7 +87,8 @@ static void iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id)
spin_lock_irqsave(&priv->sta_lock, flags);
if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE))
IWL_ERROR("ACTIVATE a non DRIVER active station %d\n", sta_id);
IWL_ERR(priv, "ACTIVATE a non DRIVER active station %d\n",
sta_id);
priv->stations[sta_id].used |= IWL_STA_UCODE_ACTIVE;
IWL_DEBUG_ASSOC("Added STA to Ucode: %pM\n",
......@@ -105,13 +106,13 @@ static int iwl_add_sta_callback(struct iwl_priv *priv,
u8 sta_id = addsta->sta.sta_id;
if (!skb) {
IWL_ERROR("Error: Response NULL in REPLY_ADD_STA.\n");
IWL_ERR(priv, "Error: Response NULL in REPLY_ADD_STA.\n");
return 1;
}
res = (struct iwl_rx_packet *)skb->data;
if (res->hdr.flags & IWL_CMD_FAILED_MSK) {
IWL_ERROR("Bad return from REPLY_ADD_STA (0x%08X)\n",
IWL_ERR(priv, "Bad return from REPLY_ADD_STA (0x%08X)\n",
res->hdr.flags);
return 1;
}
......@@ -155,7 +156,7 @@ static int iwl_send_add_sta(struct iwl_priv *priv,
res = (struct iwl_rx_packet *)cmd.meta.u.skb->data;
if (res->hdr.flags & IWL_CMD_FAILED_MSK) {
IWL_ERROR("Bad return from REPLY_ADD_STA (0x%08X)\n",
IWL_ERR(priv, "Bad return from REPLY_ADD_STA (0x%08X)\n",
res->hdr.flags);
ret = -EIO;
}
......@@ -307,7 +308,7 @@ static void iwl_sta_ucode_deactivate(struct iwl_priv *priv, const char *addr)
/* Ucode must be active and driver must be non active */
if (priv->stations[sta_id].used != IWL_STA_UCODE_ACTIVE)
IWL_ERROR("removed non active STA %d\n", sta_id);
IWL_ERR(priv, "removed non active STA %d\n", sta_id);
priv->stations[sta_id].used &= ~IWL_STA_UCODE_ACTIVE;
......@@ -324,13 +325,13 @@ static int iwl_remove_sta_callback(struct iwl_priv *priv,
const char *addr = rm_sta->addr;
if (!skb) {
IWL_ERROR("Error: Response NULL in REPLY_REMOVE_STA.\n");
IWL_ERR(priv, "Error: Response NULL in REPLY_REMOVE_STA.\n");
return 1;
}
res = (struct iwl_rx_packet *)skb->data;
if (res->hdr.flags & IWL_CMD_FAILED_MSK) {
IWL_ERROR("Bad return from REPLY_REMOVE_STA (0x%08X)\n",
IWL_ERR(priv, "Bad return from REPLY_REMOVE_STA (0x%08X)\n",
res->hdr.flags);
return 1;
}
......@@ -340,7 +341,7 @@ static int iwl_remove_sta_callback(struct iwl_priv *priv,
iwl_sta_ucode_deactivate(priv, addr);
break;
default:
IWL_ERROR("REPLY_REMOVE_STA failed\n");
IWL_ERR(priv, "REPLY_REMOVE_STA failed\n");
break;
}
......@@ -378,7 +379,7 @@ static int iwl_send_remove_station(struct iwl_priv *priv, const u8 *addr,
res = (struct iwl_rx_packet *)cmd.meta.u.skb->data;
if (res->hdr.flags & IWL_CMD_FAILED_MSK) {
IWL_ERROR("Bad return from REPLY_REMOVE_STA (0x%08X)\n",
IWL_ERR(priv, "Bad return from REPLY_REMOVE_STA (0x%08X)\n",
res->hdr.flags);
ret = -EIO;
}
......@@ -391,7 +392,7 @@ static int iwl_send_remove_station(struct iwl_priv *priv, const u8 *addr,
break;
default:
ret = -EIO;
IWL_ERROR("REPLY_REMOVE_STA failed\n");
IWL_ERR(priv, "REPLY_REMOVE_STA failed\n");
break;
}
}
......@@ -433,13 +434,13 @@ int iwl_remove_station(struct iwl_priv *priv, const u8 *addr, int is_ap)
sta_id, addr);
if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE)) {
IWL_ERROR("Removing %pM but non DRIVER active\n",
IWL_ERR(priv, "Removing %pM but non DRIVER active\n",
addr);
goto out;
}
if (!(priv->stations[sta_id].used & IWL_STA_UCODE_ACTIVE)) {
IWL_ERROR("Removing %pM but non UCODE active\n",
IWL_ERR(priv, "Removing %pM but non UCODE active\n",
addr);
goto out;
}
......@@ -475,7 +476,7 @@ void iwl_clear_stations_table(struct iwl_priv *priv)
if (iwl_is_alive(priv) &&
!test_bit(STATUS_EXIT_PENDING, &priv->status) &&
iwl_send_cmd_pdu_async(priv, REPLY_REMOVE_ALL_STA, 0, NULL, NULL))
IWL_ERROR("Couldn't clear the station table\n");
IWL_ERR(priv, "Couldn't clear the station table\n");
priv->num_stations = 0;
memset(priv->stations, 0, sizeof(priv->stations));
......@@ -548,7 +549,7 @@ int iwl_remove_default_wep_key(struct iwl_priv *priv,
spin_lock_irqsave(&priv->sta_lock, flags);
if (!test_and_clear_bit(keyconf->keyidx, &priv->ucode_key_table))
IWL_ERROR("index %d not used in uCode key table.\n",
IWL_ERR(priv, "index %d not used in uCode key table.\n",
keyconf->keyidx);
priv->default_wep_key--;
......@@ -582,7 +583,7 @@ int iwl_set_default_wep_key(struct iwl_priv *priv,
priv->default_wep_key++;
if (test_and_set_bit(keyconf->keyidx, &priv->ucode_key_table))
IWL_ERROR("index %d already used in uCode key table.\n",
IWL_ERR(priv, "index %d already used in uCode key table.\n",
keyconf->keyidx);
priv->wep_keys[keyconf->keyidx].key_size = keyconf->keylen;
......@@ -820,7 +821,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
if (!test_and_clear_bit(priv->stations[sta_id].sta.key.key_offset,
&priv->ucode_key_table))
IWL_ERROR("index %d not used in uCode key table.\n",
IWL_ERR(priv, "index %d not used in uCode key table.\n",
priv->stations[sta_id].sta.key.key_offset);
memset(&priv->stations[sta_id].keyinfo, 0,
sizeof(struct iwl_hw_key));
......@@ -857,7 +858,8 @@ int iwl_set_dynamic_key(struct iwl_priv *priv,
ret = iwl_set_wep_dynamic_key_info(priv, keyconf, sta_id);
break;
default:
IWL_ERROR("Unknown alg: %s alg = %d\n", __func__, keyconf->alg);
IWL_ERR(priv,
"Unknown alg: %s alg = %d\n", __func__, keyconf->alg);
ret = -EINVAL;
}
......
......@@ -138,7 +138,7 @@ static void iwl_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq)
num_tbs = iwl_tfd_get_num_tbs(tfd);
if (num_tbs >= IWL_NUM_OF_TBS) {
IWL_ERROR("Too many chunks: %i\n", num_tbs);
IWL_ERR(priv, "Too many chunks: %i\n", num_tbs);
/* @todo issue fatal error, it is quite serious situation */
return;
}
......@@ -171,14 +171,14 @@ static int iwl_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv,
/* Each TFD can point to a maximum 20 Tx buffers */
if (num_tbs >= IWL_NUM_OF_TBS) {
IWL_ERROR("Error can not send more than %d chunks\n",
IWL_ERR(priv, "Error can not send more than %d chunks\n",
IWL_NUM_OF_TBS);
return -EINVAL;
}
BUG_ON(addr & ~DMA_BIT_MASK(36));
if (unlikely(addr & ~IWL_TX_DMA_MASK))
IWL_ERROR("Unaligned address = %llx\n",
IWL_ERR(priv, "Unaligned address = %llx\n",
(unsigned long long)addr);
iwl_tfd_set_tb(tfd, num_tbs, addr, len);
......@@ -395,7 +395,7 @@ static int iwl_tx_queue_alloc(struct iwl_priv *priv,
txq->txb = kmalloc(sizeof(txq->txb[0]) *
TFD_QUEUE_SIZE_MAX, GFP_KERNEL);
if (!txq->txb) {
IWL_ERROR("kmalloc for auxiliary BD "
IWL_ERR(priv, "kmalloc for auxiliary BD "
"structures failed\n");
goto error;
}
......@@ -409,7 +409,7 @@ static int iwl_tx_queue_alloc(struct iwl_priv *priv,
&txq->q.dma_addr);
if (!txq->tfds) {
IWL_ERROR("pci_alloc_consistent(%zd) failed\n",
IWL_ERR(priv, "pci_alloc_consistent(%zd) failed\n",
sizeof(txq->tfds[0]) * TFD_QUEUE_SIZE_MAX);
goto error;
}
......@@ -557,13 +557,13 @@ int iwl_txq_ctx_reset(struct iwl_priv *priv)
ret = iwl_alloc_dma_ptr(priv, &priv->scd_bc_tbls,
priv->hw_params.scd_bc_tbls_size);
if (ret) {
IWL_ERROR("Scheduler BC Table allocation failed\n");
IWL_ERR(priv, "Scheduler BC Table allocation failed\n");
goto error_bc_tbls;
}
/* Alloc keep-warm buffer */
ret = iwl_alloc_dma_ptr(priv, &priv->kw, IWL_KW_SIZE);
if (ret) {
IWL_ERROR("Keep Warm allocation failed\n");
IWL_ERR(priv, "Keep Warm allocation failed\n");
goto error_kw;
}
spin_lock_irqsave(&priv->lock, flags);
......@@ -589,7 +589,7 @@ int iwl_txq_ctx_reset(struct iwl_priv *priv)
ret = iwl_tx_queue_init(priv, &priv->txq[txq_id], slots_num,
txq_id);
if (ret) {
IWL_ERROR("Tx %d queue init failed\n", txq_id);
IWL_ERR(priv, "Tx %d queue init failed\n", txq_id);
goto error;
}
}
......@@ -850,7 +850,7 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
if ((ieee80211_get_tx_rate(priv->hw, info)->hw_value & 0xFF) ==
IWL_INVALID_RATE) {
IWL_ERROR("ERROR: No TX rate available.\n");
IWL_ERR(priv, "ERROR: No TX rate available.\n");
goto drop_unlock;
}
......@@ -1086,7 +1086,7 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
}
if (iwl_queue_space(q) < ((cmd->meta.flags & CMD_ASYNC) ? 2 : 1)) {
IWL_ERROR("No space for Tx\n");
IWL_ERR(priv, "No space for Tx\n");
return -ENOSPC;
}
......@@ -1163,7 +1163,7 @@ int iwl_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)
int nfreed = 0;
if ((index >= q->n_bd) || (iwl_queue_used(q, index) == 0)) {
IWL_ERROR("Read index for DMA queue txq id (%d), index %d, "
IWL_ERR(priv, "Read index for DMA queue txq id (%d), index %d, "
"is out of range [0-%d] %d %d.\n", txq_id,
index, q->n_bd, q->write_ptr, q->read_ptr);
return 0;
......@@ -1203,7 +1203,7 @@ static void iwl_hcmd_queue_reclaim(struct iwl_priv *priv, int txq_id,
int nfreed = 0;
if ((idx >= q->n_bd) || (iwl_queue_used(q, idx) == 0)) {
IWL_ERROR("Read index for DMA queue txq id (%d), index %d, "
IWL_ERR(priv, "Read index for DMA queue txq id (%d), index %d, "
"is out of range [0-%d] %d %d.\n", txq_id,
idx, q->n_bd, q->write_ptr, q->read_ptr);
return;
......@@ -1218,7 +1218,7 @@ static void iwl_hcmd_queue_reclaim(struct iwl_priv *priv, int txq_id,
q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd)) {
if (nfreed++ > 0) {
IWL_ERROR("HCMD skipped: index (%d) %d %d\n", idx,
IWL_ERR(priv, "HCMD skipped: index (%d) %d %d\n", idx,
q->write_ptr, q->read_ptr);
queue_work(priv->workqueue, &priv->restart);
}
......@@ -1314,7 +1314,7 @@ int iwl_tx_agg_start(struct iwl_priv *priv, const u8 *ra, u16 tid, u16 *ssn)
return -ENXIO;
if (priv->stations[sta_id].tid[tid].agg.state != IWL_AGG_OFF) {
IWL_ERROR("Start AGG when state is not IWL_AGG_OFF !\n");
IWL_ERR(priv, "Start AGG when state is not IWL_AGG_OFF !\n");
return -ENXIO;
}
......@@ -1354,7 +1354,7 @@ int iwl_tx_agg_stop(struct iwl_priv *priv , const u8 *ra, u16 tid)
unsigned long flags;
if (!ra) {
IWL_ERROR("ra = NULL\n");
IWL_ERR(priv, "ra = NULL\n");
return -EINVAL;
}
......@@ -1455,7 +1455,7 @@ static int iwl_tx_status_reply_compressed_ba(struct iwl_priv *priv,
struct ieee80211_tx_info *info;
if (unlikely(!agg->wait_for_ba)) {
IWL_ERROR("Received BA when not expected\n");
IWL_ERR(priv, "Received BA when not expected\n");
return -EINVAL;
}
......@@ -1528,7 +1528,8 @@ void iwl_rx_reply_compressed_ba(struct iwl_priv *priv,
u16 ba_resp_scd_ssn = le16_to_cpu(ba_resp->scd_ssn);
if (scd_flow >= priv->hw_params.max_txq_num) {
IWL_ERROR("BUG_ON scd_flow is bigger than number of queues\n");
IWL_ERR(priv,
"BUG_ON scd_flow is bigger than number of queues\n");
return;
}
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment