Commit 39aadf8c authored by Winkler, Tomas's avatar Winkler, Tomas Committed by John W. Linville

iwlwifi: replace IWL_WARNING with IWL_WARN

IWL_WARN 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 978785a3
...@@ -158,7 +158,7 @@ void iwl3945_disable_events(struct iwl_priv *priv) ...@@ -158,7 +158,7 @@ void iwl3945_disable_events(struct iwl_priv *priv)
ret = iwl_grab_nic_access(priv); ret = iwl_grab_nic_access(priv);
if (ret) { if (ret) {
IWL_WARNING("Can not read from adapter at this time.\n"); IWL_WARN(priv, "Can not read from adapter at this time.\n");
return; return;
} }
...@@ -2095,7 +2095,7 @@ static void iwl3945_hw_reg_init_channel_groups(struct iwl_priv *priv) ...@@ -2095,7 +2095,7 @@ static void iwl3945_hw_reg_init_channel_groups(struct iwl_priv *priv)
/* sanity check on factory saturation power value */ /* sanity check on factory saturation power value */
if (group->saturation_power < 40) { if (group->saturation_power < 40) {
IWL_WARNING("Error: saturation power is %d, " IWL_WARN(priv, "Error: saturation power is %d, "
"less than minimum expected 40\n", "less than minimum expected 40\n",
group->saturation_power); group->saturation_power);
return; return;
......
...@@ -1485,12 +1485,12 @@ static int iwl4965_fill_txpower_tbl(struct iwl_priv *priv, u8 band, u16 channel, ...@@ -1485,12 +1485,12 @@ static int iwl4965_fill_txpower_tbl(struct iwl_priv *priv, u8 band, u16 channel,
/* stay within the table! */ /* stay within the table! */
if (power_index > 107) { if (power_index > 107) {
IWL_WARNING("txpower index %d > 107\n", IWL_WARN(priv, "txpower index %d > 107\n",
power_index); power_index);
power_index = 107; power_index = 107;
} }
if (power_index < 0) { if (power_index < 0) {
IWL_WARNING("txpower index %d < 0\n", IWL_WARN(priv, "txpower index %d < 0\n",
power_index); power_index);
power_index = 0; power_index = 0;
} }
...@@ -1533,7 +1533,7 @@ static int iwl4965_send_tx_power(struct iwl_priv *priv) ...@@ -1533,7 +1533,7 @@ static int iwl4965_send_tx_power(struct iwl_priv *priv)
/* If this gets hit a lot, switch it to a BUG() and catch /* If this gets hit a lot, switch it to a BUG() and catch
* the stack trace to find out who is calling this during * the stack trace to find out who is calling this during
* a scan. */ * a scan. */
IWL_WARNING("TX Power requested while scanning!\n"); IWL_WARN(priv, "TX Power requested while scanning!\n");
return -EAGAIN; return -EAGAIN;
} }
...@@ -1839,7 +1839,8 @@ static int iwl4965_txq_agg_disable(struct iwl_priv *priv, u16 txq_id, ...@@ -1839,7 +1839,8 @@ static int iwl4965_txq_agg_disable(struct iwl_priv *priv, u16 txq_id,
if ((IWL49_FIRST_AMPDU_QUEUE > txq_id) || if ((IWL49_FIRST_AMPDU_QUEUE > txq_id) ||
(IWL49_FIRST_AMPDU_QUEUE + IWL49_NUM_AMPDU_QUEUES <= txq_id)) { (IWL49_FIRST_AMPDU_QUEUE + IWL49_NUM_AMPDU_QUEUES <= txq_id)) {
IWL_WARNING("queue number out of range: %d, must be %d to %d\n", IWL_WARN(priv,
"queue number out of range: %d, must be %d to %d\n",
txq_id, IWL49_FIRST_AMPDU_QUEUE, txq_id, IWL49_FIRST_AMPDU_QUEUE,
IWL49_FIRST_AMPDU_QUEUE + IWL49_NUM_AMPDU_QUEUES - 1); IWL49_FIRST_AMPDU_QUEUE + IWL49_NUM_AMPDU_QUEUES - 1);
return -EINVAL; return -EINVAL;
...@@ -1910,7 +1911,8 @@ static int iwl4965_txq_agg_enable(struct iwl_priv *priv, int txq_id, ...@@ -1910,7 +1911,8 @@ static int iwl4965_txq_agg_enable(struct iwl_priv *priv, int txq_id,
if ((IWL49_FIRST_AMPDU_QUEUE > txq_id) || if ((IWL49_FIRST_AMPDU_QUEUE > txq_id) ||
(IWL49_FIRST_AMPDU_QUEUE + IWL49_NUM_AMPDU_QUEUES <= txq_id)) { (IWL49_FIRST_AMPDU_QUEUE + IWL49_NUM_AMPDU_QUEUES <= txq_id)) {
IWL_WARNING("queue number out of range: %d, must be %d to %d\n", IWL_WARN(priv,
"queue number out of range: %d, must be %d to %d\n",
txq_id, IWL49_FIRST_AMPDU_QUEUE, txq_id, IWL49_FIRST_AMPDU_QUEUE,
IWL49_FIRST_AMPDU_QUEUE + IWL49_NUM_AMPDU_QUEUES - 1); IWL49_FIRST_AMPDU_QUEUE + IWL49_NUM_AMPDU_QUEUES - 1);
return -EINVAL; return -EINVAL;
......
...@@ -676,7 +676,8 @@ static void iwl5000_init_alive_start(struct iwl_priv *priv) ...@@ -676,7 +676,8 @@ static void iwl5000_init_alive_start(struct iwl_priv *priv)
iwl_clear_stations_table(priv); iwl_clear_stations_table(priv);
ret = priv->cfg->ops->lib->alive_notify(priv); ret = priv->cfg->ops->lib->alive_notify(priv);
if (ret) { if (ret) {
IWL_WARNING("Could not complete ALIVE transition: %d\n", ret); IWL_WARN(priv,
"Could not complete ALIVE transition: %d\n", ret);
goto restart; goto restart;
} }
...@@ -1012,7 +1013,8 @@ static int iwl5000_txq_agg_enable(struct iwl_priv *priv, int txq_id, ...@@ -1012,7 +1013,8 @@ static int iwl5000_txq_agg_enable(struct iwl_priv *priv, int txq_id,
if ((IWL50_FIRST_AMPDU_QUEUE > txq_id) || if ((IWL50_FIRST_AMPDU_QUEUE > txq_id) ||
(IWL50_FIRST_AMPDU_QUEUE + IWL50_NUM_AMPDU_QUEUES <= txq_id)) { (IWL50_FIRST_AMPDU_QUEUE + IWL50_NUM_AMPDU_QUEUES <= txq_id)) {
IWL_WARNING("queue number out of range: %d, must be %d to %d\n", IWL_WARN(priv,
"queue number out of range: %d, must be %d to %d\n",
txq_id, IWL50_FIRST_AMPDU_QUEUE, txq_id, IWL50_FIRST_AMPDU_QUEUE,
IWL50_FIRST_AMPDU_QUEUE + IWL50_NUM_AMPDU_QUEUES - 1); IWL50_FIRST_AMPDU_QUEUE + IWL50_NUM_AMPDU_QUEUES - 1);
return -EINVAL; return -EINVAL;
...@@ -1077,7 +1079,8 @@ static int iwl5000_txq_agg_disable(struct iwl_priv *priv, u16 txq_id, ...@@ -1077,7 +1079,8 @@ static int iwl5000_txq_agg_disable(struct iwl_priv *priv, u16 txq_id,
if ((IWL50_FIRST_AMPDU_QUEUE > txq_id) || if ((IWL50_FIRST_AMPDU_QUEUE > txq_id) ||
(IWL50_FIRST_AMPDU_QUEUE + IWL50_NUM_AMPDU_QUEUES <= txq_id)) { (IWL50_FIRST_AMPDU_QUEUE + IWL50_NUM_AMPDU_QUEUES <= txq_id)) {
IWL_WARNING("queue number out of range: %d, must be %d to %d\n", IWL_WARN(priv,
"queue number out of range: %d, must be %d to %d\n",
txq_id, IWL50_FIRST_AMPDU_QUEUE, txq_id, IWL50_FIRST_AMPDU_QUEUE,
IWL50_FIRST_AMPDU_QUEUE + IWL50_NUM_AMPDU_QUEUES - 1); IWL50_FIRST_AMPDU_QUEUE + IWL50_NUM_AMPDU_QUEUES - 1);
return -EINVAL; return -EINVAL;
......
...@@ -51,53 +51,53 @@ int iwl_agn_check_rxon_cmd(struct iwl_priv *priv) ...@@ -51,53 +51,53 @@ int iwl_agn_check_rxon_cmd(struct iwl_priv *priv)
(RXON_FLG_TGJ_NARROW_BAND_MSK | (RXON_FLG_TGJ_NARROW_BAND_MSK |
RXON_FLG_RADAR_DETECT_MSK)); RXON_FLG_RADAR_DETECT_MSK));
if (error) if (error)
IWL_WARNING("check 24G fields %d | %d\n", IWL_WARN(priv, "check 24G fields %d | %d\n",
counter++, error); counter++, error);
} else { } else {
error |= (rxon->flags & RXON_FLG_SHORT_SLOT_MSK) ? error |= (rxon->flags & RXON_FLG_SHORT_SLOT_MSK) ?
0 : le32_to_cpu(RXON_FLG_SHORT_SLOT_MSK); 0 : le32_to_cpu(RXON_FLG_SHORT_SLOT_MSK);
if (error) if (error)
IWL_WARNING("check 52 fields %d | %d\n", IWL_WARN(priv, "check 52 fields %d | %d\n",
counter++, error); counter++, error);
error |= le32_to_cpu(rxon->flags & RXON_FLG_CCK_MSK); error |= le32_to_cpu(rxon->flags & RXON_FLG_CCK_MSK);
if (error) if (error)
IWL_WARNING("check 52 CCK %d | %d\n", IWL_WARN(priv, "check 52 CCK %d | %d\n",
counter++, error); counter++, error);
} }
error |= (rxon->node_addr[0] | rxon->bssid_addr[0]) & 0x1; error |= (rxon->node_addr[0] | rxon->bssid_addr[0]) & 0x1;
if (error) if (error)
IWL_WARNING("check mac addr %d | %d\n", counter++, error); IWL_WARN(priv, "check mac addr %d | %d\n", counter++, error);
/* make sure basic rates 6Mbps and 1Mbps are supported */ /* make sure basic rates 6Mbps and 1Mbps are supported */
error |= (((rxon->ofdm_basic_rates & IWL_RATE_6M_MASK) == 0) && error |= (((rxon->ofdm_basic_rates & IWL_RATE_6M_MASK) == 0) &&
((rxon->cck_basic_rates & IWL_RATE_1M_MASK) == 0)); ((rxon->cck_basic_rates & IWL_RATE_1M_MASK) == 0));
if (error) if (error)
IWL_WARNING("check basic rate %d | %d\n", counter++, error); IWL_WARN(priv, "check basic rate %d | %d\n", counter++, error);
error |= (le16_to_cpu(rxon->assoc_id) > 2007); error |= (le16_to_cpu(rxon->assoc_id) > 2007);
if (error) if (error)
IWL_WARNING("check assoc id %d | %d\n", counter++, error); IWL_WARN(priv, "check assoc id %d | %d\n", counter++, error);
error |= ((rxon->flags & (RXON_FLG_CCK_MSK | RXON_FLG_SHORT_SLOT_MSK)) error |= ((rxon->flags & (RXON_FLG_CCK_MSK | RXON_FLG_SHORT_SLOT_MSK))
== (RXON_FLG_CCK_MSK | RXON_FLG_SHORT_SLOT_MSK)); == (RXON_FLG_CCK_MSK | RXON_FLG_SHORT_SLOT_MSK));
if (error) if (error)
IWL_WARNING("check CCK and short slot %d | %d\n", IWL_WARN(priv, "check CCK and short slot %d | %d\n",
counter++, error); counter++, error);
error |= ((rxon->flags & (RXON_FLG_CCK_MSK | RXON_FLG_AUTO_DETECT_MSK)) error |= ((rxon->flags & (RXON_FLG_CCK_MSK | RXON_FLG_AUTO_DETECT_MSK))
== (RXON_FLG_CCK_MSK | RXON_FLG_AUTO_DETECT_MSK)); == (RXON_FLG_CCK_MSK | RXON_FLG_AUTO_DETECT_MSK));
if (error) if (error)
IWL_WARNING("check CCK & auto detect %d | %d\n", IWL_WARN(priv, "check CCK & auto detect %d | %d\n",
counter++, error); counter++, error);
error |= ((rxon->flags & (RXON_FLG_AUTO_DETECT_MSK | error |= ((rxon->flags & (RXON_FLG_AUTO_DETECT_MSK |
RXON_FLG_TGG_PROTECT_MSK)) == RXON_FLG_TGG_PROTECT_MSK); RXON_FLG_TGG_PROTECT_MSK)) == RXON_FLG_TGG_PROTECT_MSK);
if (error) if (error)
IWL_WARNING("check TGG and auto detect %d | %d\n", IWL_WARN(priv, "check TGG and auto detect %d | %d\n",
counter++, error); counter++, error);
if (error) if (error)
IWL_WARNING("Tuning to channel %d\n", IWL_WARN(priv, "Tuning to channel %d\n",
le16_to_cpu(rxon->channel)); le16_to_cpu(rxon->channel));
if (error) { if (error) {
......
...@@ -337,7 +337,7 @@ static void iwl_clear_free_frames(struct iwl_priv *priv) ...@@ -337,7 +337,7 @@ static void iwl_clear_free_frames(struct iwl_priv *priv)
} }
if (priv->frames_count) { if (priv->frames_count) {
IWL_WARNING("%d frames still in use. Did we lose one?\n", IWL_WARN(priv, "%d frames still in use. Did we lose one?\n",
priv->frames_count); priv->frames_count);
priv->frames_count = 0; priv->frames_count = 0;
} }
...@@ -745,7 +745,7 @@ static int iwl_set_mode(struct iwl_priv *priv, int mode) ...@@ -745,7 +745,7 @@ static int iwl_set_mode(struct iwl_priv *priv, int mode)
cancel_delayed_work(&priv->scan_check); cancel_delayed_work(&priv->scan_check);
if (iwl_scan_cancel_timeout(priv, 100)) { if (iwl_scan_cancel_timeout(priv, 100)) {
IWL_WARNING("Aborted scan still in progress after 100ms\n"); IWL_WARN(priv, "Aborted scan still in progress after 100ms\n");
IWL_DEBUG_MAC80211("leaving - scan abort failed.\n"); IWL_DEBUG_MAC80211("leaving - scan abort failed.\n");
return -EAGAIN; return -EAGAIN;
} }
...@@ -841,7 +841,7 @@ static void iwl_rx_reply_alive(struct iwl_priv *priv, ...@@ -841,7 +841,7 @@ static void iwl_rx_reply_alive(struct iwl_priv *priv,
queue_delayed_work(priv->workqueue, pwork, queue_delayed_work(priv->workqueue, pwork,
msecs_to_jiffies(5)); msecs_to_jiffies(5));
else else
IWL_WARNING("uCode did not respond OK.\n"); IWL_WARN(priv, "uCode did not respond OK.\n");
} }
static void iwl_rx_reply_error(struct iwl_priv *priv, static void iwl_rx_reply_error(struct iwl_priv *priv,
...@@ -1193,7 +1193,7 @@ void iwl_rx_handle(struct iwl_priv *priv) ...@@ -1193,7 +1193,7 @@ void iwl_rx_handle(struct iwl_priv *priv)
if (rxb && rxb->skb) if (rxb && rxb->skb)
iwl_tx_cmd_complete(priv, rxb); iwl_tx_cmd_complete(priv, rxb);
else else
IWL_WARNING("Claim null rxb?\n"); IWL_WARN(priv, "Claim null rxb?\n");
} }
/* For now we just don't re-use anything. We can tweak this /* For now we just don't re-use anything. We can tweak this
...@@ -1457,9 +1457,9 @@ static void iwl_irq_tasklet(struct iwl_priv *priv) ...@@ -1457,9 +1457,9 @@ static void iwl_irq_tasklet(struct iwl_priv *priv)
IWL_ERROR("Unhandled INTA bits 0x%08x\n", inta & ~handled); IWL_ERROR("Unhandled INTA bits 0x%08x\n", inta & ~handled);
if (inta & ~CSR_INI_SET_MASK) { if (inta & ~CSR_INI_SET_MASK) {
IWL_WARNING("Disabled INTA bits 0x%08x were pending\n", IWL_WARN(priv, "Disabled INTA bits 0x%08x were pending\n",
inta & ~CSR_INI_SET_MASK); inta & ~CSR_INI_SET_MASK);
IWL_WARNING(" with FH_INT = 0x%08x\n", inta_fh); IWL_WARN(priv, " with FH_INT = 0x%08x\n", inta_fh);
} }
/* Re-enable all interrupts */ /* Re-enable all interrupts */
...@@ -1511,7 +1511,7 @@ static irqreturn_t iwl_isr(int irq, void *data) ...@@ -1511,7 +1511,7 @@ static irqreturn_t iwl_isr(int irq, void *data)
if ((inta == 0xFFFFFFFF) || ((inta & 0xFFFFFFF0) == 0xa5a5a5a0)) { if ((inta == 0xFFFFFFFF) || ((inta & 0xFFFFFFF0) == 0xa5a5a5a0)) {
/* Hardware disappeared. It might have already raised /* Hardware disappeared. It might have already raised
* an interrupt */ * an interrupt */
IWL_WARNING("HARDWARE GONE?? INTA == 0x%08x\n", inta); IWL_WARN(priv, "HARDWARE GONE?? INTA == 0x%08x\n", inta);
goto unplugged; goto unplugged;
} }
...@@ -1833,8 +1833,8 @@ static void iwl_alive_start(struct iwl_priv *priv) ...@@ -1833,8 +1833,8 @@ static void iwl_alive_start(struct iwl_priv *priv)
iwl_clear_stations_table(priv); iwl_clear_stations_table(priv);
ret = priv->cfg->ops->lib->alive_notify(priv); ret = priv->cfg->ops->lib->alive_notify(priv);
if (ret) { if (ret) {
IWL_WARNING("Could not complete ALIVE transition [ntf]: %d\n", IWL_WARN(priv,
ret); "Could not complete ALIVE transition [ntf]: %d\n", ret);
goto restart; goto restart;
} }
...@@ -2020,7 +2020,7 @@ static int __iwl_up(struct iwl_priv *priv) ...@@ -2020,7 +2020,7 @@ static int __iwl_up(struct iwl_priv *priv)
int ret; int ret;
if (test_bit(STATUS_EXIT_PENDING, &priv->status)) { if (test_bit(STATUS_EXIT_PENDING, &priv->status)) {
IWL_WARNING("Exit pending; will not bring the NIC up\n"); IWL_WARN(priv, "Exit pending; will not bring the NIC up\n");
return -EIO; return -EIO;
} }
...@@ -2037,7 +2037,7 @@ static int __iwl_up(struct iwl_priv *priv) ...@@ -2037,7 +2037,7 @@ static int __iwl_up(struct iwl_priv *priv)
if (iwl_is_rfkill(priv)) { if (iwl_is_rfkill(priv)) {
iwl_enable_interrupts(priv); iwl_enable_interrupts(priv);
IWL_WARNING("Radio disabled by %s RF Kill switch\n", IWL_WARN(priv, "Radio disabled by %s RF Kill switch\n",
test_bit(STATUS_RF_KILL_HW, &priv->status) ? "HW" : "SW"); test_bit(STATUS_RF_KILL_HW, &priv->status) ? "HW" : "SW");
return 0; return 0;
} }
...@@ -2163,7 +2163,7 @@ static void iwl_bg_rf_kill(struct work_struct *work) ...@@ -2163,7 +2163,7 @@ static void iwl_bg_rf_kill(struct work_struct *work)
IWL_DEBUG_RF_KILL("Can not turn radio back on - " IWL_DEBUG_RF_KILL("Can not turn radio back on - "
"disabled by SW switch\n"); "disabled by SW switch\n");
else else
IWL_WARNING("Radio Frequency Kill Switch is On:\n" IWL_WARN(priv, "Radio Frequency Kill Switch is On:\n"
"Kill switch must be turned off for " "Kill switch must be turned off for "
"wireless networking to work.\n"); "wireless networking to work.\n");
} }
...@@ -2267,7 +2267,7 @@ static void iwl_post_associate(struct iwl_priv *priv) ...@@ -2267,7 +2267,7 @@ static void iwl_post_associate(struct iwl_priv *priv)
ret = iwl_send_cmd_pdu(priv, REPLY_RXON_TIMING, ret = iwl_send_cmd_pdu(priv, REPLY_RXON_TIMING,
sizeof(priv->rxon_timing), &priv->rxon_timing); sizeof(priv->rxon_timing), &priv->rxon_timing);
if (ret) if (ret)
IWL_WARNING("REPLY_RXON_TIMING failed - " IWL_WARN(priv, "REPLY_RXON_TIMING failed - "
"Attempting to continue.\n"); "Attempting to continue.\n");
priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK; priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK;
...@@ -2668,7 +2668,7 @@ static void iwl_config_ap(struct iwl_priv *priv) ...@@ -2668,7 +2668,7 @@ static void iwl_config_ap(struct iwl_priv *priv)
ret = iwl_send_cmd_pdu(priv, REPLY_RXON_TIMING, ret = iwl_send_cmd_pdu(priv, REPLY_RXON_TIMING,
sizeof(priv->rxon_timing), &priv->rxon_timing); sizeof(priv->rxon_timing), &priv->rxon_timing);
if (ret) if (ret)
IWL_WARNING("REPLY_RXON_TIMING failed - " IWL_WARN(priv, "REPLY_RXON_TIMING failed - "
"Attempting to continue.\n"); "Attempting to continue.\n");
iwl_set_rxon_chain(priv); iwl_set_rxon_chain(priv);
...@@ -2774,7 +2774,7 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, ...@@ -2774,7 +2774,7 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw,
/* If there is currently a HW scan going on in the background /* If there is currently a HW scan going on in the background
* then we need to cancel it else the RXON below will fail. */ * then we need to cancel it else the RXON below will fail. */
if (iwl_scan_cancel_timeout(priv, 100)) { if (iwl_scan_cancel_timeout(priv, 100)) {
IWL_WARNING("Aborted scan still in progress " IWL_WARN(priv, "Aborted scan still in progress "
"after 100ms\n"); "after 100ms\n");
IWL_DEBUG_MAC80211("leaving - scan abort failed.\n"); IWL_DEBUG_MAC80211("leaving - scan abort failed.\n");
mutex_unlock(&priv->mutex); mutex_unlock(&priv->mutex);
...@@ -3467,7 +3467,7 @@ static ssize_t store_flags(struct device *d, ...@@ -3467,7 +3467,7 @@ static ssize_t store_flags(struct device *d,
if (le32_to_cpu(priv->staging_rxon.flags) != flags) { if (le32_to_cpu(priv->staging_rxon.flags) != flags) {
/* Cancel any currently running scans... */ /* Cancel any currently running scans... */
if (iwl_scan_cancel_timeout(priv, 100)) if (iwl_scan_cancel_timeout(priv, 100))
IWL_WARNING("Could not cancel scan.\n"); IWL_WARN(priv, "Could not cancel scan.\n");
else { else {
IWL_DEBUG_INFO("Commit rxon.flags = 0x%04X\n", flags); IWL_DEBUG_INFO("Commit rxon.flags = 0x%04X\n", flags);
priv->staging_rxon.flags = cpu_to_le32(flags); priv->staging_rxon.flags = cpu_to_le32(flags);
...@@ -3506,7 +3506,7 @@ static ssize_t store_filter_flags(struct device *d, ...@@ -3506,7 +3506,7 @@ static ssize_t store_filter_flags(struct device *d,
if (le32_to_cpu(priv->staging_rxon.filter_flags) != filter_flags) { if (le32_to_cpu(priv->staging_rxon.filter_flags) != filter_flags) {
/* Cancel any currently running scans... */ /* Cancel any currently running scans... */
if (iwl_scan_cancel_timeout(priv, 100)) if (iwl_scan_cancel_timeout(priv, 100))
IWL_WARNING("Could not cancel scan.\n"); IWL_WARN(priv, "Could not cancel scan.\n");
else { else {
IWL_DEBUG_INFO("Committing rxon.filter_flags = " IWL_DEBUG_INFO("Committing rxon.filter_flags = "
"0x%04X\n", filter_flags); "0x%04X\n", filter_flags);
......
...@@ -924,13 +924,13 @@ int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force) ...@@ -924,13 +924,13 @@ int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force)
{ {
int ret = 0; int ret = 0;
if (tx_power < IWL_TX_POWER_TARGET_POWER_MIN) { if (tx_power < IWL_TX_POWER_TARGET_POWER_MIN) {
IWL_WARNING("Requested user TXPOWER %d below limit.\n", IWL_WARN(priv, "Requested user TXPOWER %d below limit.\n",
priv->tx_power_user_lmt); priv->tx_power_user_lmt);
return -EINVAL; return -EINVAL;
} }
if (tx_power > IWL_TX_POWER_TARGET_POWER_MAX) { if (tx_power > IWL_TX_POWER_TARGET_POWER_MAX) {
IWL_WARNING("Requested user TXPOWER %d above limit.\n", IWL_WARN(priv, "Requested user TXPOWER %d above limit.\n",
priv->tx_power_user_lmt); priv->tx_power_user_lmt);
return -EINVAL; return -EINVAL;
} }
...@@ -1193,7 +1193,7 @@ void iwl_dump_nic_error_log(struct iwl_priv *priv) ...@@ -1193,7 +1193,7 @@ void iwl_dump_nic_error_log(struct iwl_priv *priv)
ret = iwl_grab_nic_access(priv); ret = iwl_grab_nic_access(priv);
if (ret) { if (ret) {
IWL_WARNING("Can not read from adapter at this time.\n"); IWL_WARN(priv, "Can not read from adapter at this time.\n");
return; return;
} }
...@@ -1297,7 +1297,7 @@ void iwl_dump_nic_event_log(struct iwl_priv *priv) ...@@ -1297,7 +1297,7 @@ void iwl_dump_nic_event_log(struct iwl_priv *priv)
ret = iwl_grab_nic_access(priv); ret = iwl_grab_nic_access(priv);
if (ret) { if (ret) {
IWL_WARNING("Can not read from adapter at this time.\n"); IWL_WARN(priv, "Can not read from adapter at this time.\n");
return; return;
} }
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
struct iwl_priv; struct iwl_priv;
#define IWL_ERROR(f, a...) dev_err(&(priv->pci_dev->dev), f, ## a) #define IWL_ERROR(f, a...) dev_err(&(priv->pci_dev->dev), f, ## a)
#define IWL_WARNING(f, a...) dev_warn(&(priv->pci_dev->dev), f, ## a)
#define IWL_ERR(p, f, a...) dev_err(&((p)->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_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) #define IWL_INFO(p, f, a...) dev_info(&((p)->pci_dev->dev), f, ## a)
......
...@@ -62,7 +62,8 @@ static int iwl_rfkill_soft_rf_kill(void *data, enum rfkill_state state) ...@@ -62,7 +62,8 @@ static int iwl_rfkill_soft_rf_kill(void *data, enum rfkill_state state)
iwl_radio_kill_sw_disable_radio(priv); iwl_radio_kill_sw_disable_radio(priv);
break; break;
default: default:
IWL_WARNING("we received unexpected RFKILL state %d\n", state); IWL_WARN(priv, "we received unexpected RFKILL state %d\n",
state);
break; break;
} }
out_unlock: out_unlock:
......
...@@ -650,7 +650,7 @@ static void iwl_bg_request_scan(struct work_struct *data) ...@@ -650,7 +650,7 @@ static void iwl_bg_request_scan(struct work_struct *data)
mutex_lock(&priv->mutex); mutex_lock(&priv->mutex);
if (!iwl_is_ready(priv)) { if (!iwl_is_ready(priv)) {
IWL_WARNING("request scan called when driver not ready.\n"); IWL_WARN(priv, "request scan called when driver not ready.\n");
goto done; goto done;
} }
...@@ -773,7 +773,7 @@ static void iwl_bg_request_scan(struct work_struct *data) ...@@ -773,7 +773,7 @@ static void iwl_bg_request_scan(struct work_struct *data)
if ((priv->hw_rev & CSR_HW_REV_TYPE_MSK) == CSR_HW_REV_TYPE_4965) if ((priv->hw_rev & CSR_HW_REV_TYPE_MSK) == CSR_HW_REV_TYPE_4965)
rx_chain = 0x6; rx_chain = 0x6;
} else { } else {
IWL_WARNING("Invalid scan band count\n"); IWL_WARN(priv, "Invalid scan band count\n");
goto done; goto done;
} }
......
...@@ -168,7 +168,7 @@ static int iwl_send_add_sta(struct iwl_priv *priv, ...@@ -168,7 +168,7 @@ static int iwl_send_add_sta(struct iwl_priv *priv,
break; break;
default: default:
ret = -EIO; ret = -EIO;
IWL_WARNING("REPLY_ADD_STA failed\n"); IWL_WARN(priv, "REPLY_ADD_STA failed\n");
break; break;
} }
} }
...@@ -204,7 +204,7 @@ static void iwl_set_ht_add_station(struct iwl_priv *priv, u8 index, ...@@ -204,7 +204,7 @@ static void iwl_set_ht_add_station(struct iwl_priv *priv, u8 index,
case WLAN_HT_CAP_SM_PS_DISABLED: case WLAN_HT_CAP_SM_PS_DISABLED:
break; break;
default: default:
IWL_WARNING("Invalid MIMO PS mode %d\n", mimo_ps_mode); IWL_WARN(priv, "Invalid MIMO PS mode %d\n", mimo_ps_mode);
break; break;
} }
...@@ -812,7 +812,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv, ...@@ -812,7 +812,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
} }
if (priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET) { if (priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET) {
IWL_WARNING("Removing wrong key %d 0x%x\n", IWL_WARN(priv, "Removing wrong key %d 0x%x\n",
keyconf->keyidx, key_flags); keyconf->keyidx, key_flags);
spin_unlock_irqrestore(&priv->sta_lock, flags); spin_unlock_irqrestore(&priv->sta_lock, flags);
return 0; return 0;
...@@ -1069,7 +1069,8 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) ...@@ -1069,7 +1069,8 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
return priv->hw_params.bcast_sta_id; return priv->hw_params.bcast_sta_id;
default: default:
IWL_WARNING("Unknown mode of operation: %d\n", priv->iw_mode); IWL_WARN(priv, "Unknown mode of operation: %d\n",
priv->iw_mode);
return priv->hw_params.bcast_sta_id; return priv->hw_params.bcast_sta_id;
} }
} }
......
...@@ -1306,7 +1306,7 @@ int iwl_tx_agg_start(struct iwl_priv *priv, const u8 *ra, u16 tid, u16 *ssn) ...@@ -1306,7 +1306,7 @@ int iwl_tx_agg_start(struct iwl_priv *priv, const u8 *ra, u16 tid, u16 *ssn)
else else
return -EINVAL; return -EINVAL;
IWL_WARNING("%s on ra = %pM tid = %d\n", IWL_WARN(priv, "%s on ra = %pM tid = %d\n",
__func__, ra, tid); __func__, ra, tid);
sta_id = iwl_find_station(priv, ra); sta_id = iwl_find_station(priv, ra);
...@@ -1369,7 +1369,7 @@ int iwl_tx_agg_stop(struct iwl_priv *priv , const u8 *ra, u16 tid) ...@@ -1369,7 +1369,7 @@ int iwl_tx_agg_stop(struct iwl_priv *priv , const u8 *ra, u16 tid)
return -ENXIO; return -ENXIO;
if (priv->stations[sta_id].tid[tid].agg.state != IWL_AGG_ON) if (priv->stations[sta_id].tid[tid].agg.state != IWL_AGG_ON)
IWL_WARNING("Stopping AGG while state not IWL_AGG_ON\n"); IWL_WARN(priv, "Stopping AGG while state not IWL_AGG_ON\n");
tid_data = &priv->stations[sta_id].tid[tid]; tid_data = &priv->stations[sta_id].tid[tid];
ssn = (tid_data->seq_number & IEEE80211_SCTL_SEQ) >> 4; ssn = (tid_data->seq_number & IEEE80211_SCTL_SEQ) >> 4;
......
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