aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-lib.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c11
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tx.c11
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-debug.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-devtrace.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-scan.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sta.c6
9 files changed, 29 insertions, 15 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
index f052c6d09b37..d706b8afbe5a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
@@ -980,7 +980,7 @@ ssize_t iwl_ucode_bt_stats_read(struct file *file,
980 le32_to_cpu(bt->lo_priority_tx_req_cnt), 980 le32_to_cpu(bt->lo_priority_tx_req_cnt),
981 accum_bt->lo_priority_tx_req_cnt); 981 accum_bt->lo_priority_tx_req_cnt);
982 pos += scnprintf(buf + pos, bufsz - pos, 982 pos += scnprintf(buf + pos, bufsz - pos,
983 "lo_priority_rx_denied_cnt:\t%u\t\t\t%u\n", 983 "lo_priority_tx_denied_cnt:\t%u\t\t\t%u\n",
984 le32_to_cpu(bt->lo_priority_tx_denied_cnt), 984 le32_to_cpu(bt->lo_priority_tx_denied_cnt),
985 accum_bt->lo_priority_tx_denied_cnt); 985 accum_bt->lo_priority_tx_denied_cnt);
986 pos += scnprintf(buf + pos, bufsz - pos, 986 pos += scnprintf(buf + pos, bufsz - pos,
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index a1b6d202d57c..9dd9e64c2b0b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -1429,7 +1429,7 @@ int iwlagn_manage_ibss_station(struct iwl_priv *priv,
1429void iwl_free_tfds_in_queue(struct iwl_priv *priv, 1429void iwl_free_tfds_in_queue(struct iwl_priv *priv,
1430 int sta_id, int tid, int freed) 1430 int sta_id, int tid, int freed)
1431{ 1431{
1432 WARN_ON(!spin_is_locked(&priv->sta_lock)); 1432 lockdep_assert_held(&priv->sta_lock);
1433 1433
1434 if (priv->stations[sta_id].tid[tid].tfds_in_queue >= freed) 1434 if (priv->stations[sta_id].tid[tid].tfds_in_queue >= freed)
1435 priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; 1435 priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 35c86d22b14b..23e5c42e7d7e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -300,8 +300,9 @@ static int rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv,
300 struct ieee80211_sta *sta) 300 struct ieee80211_sta *sta)
301{ 301{
302 int ret = -EAGAIN; 302 int ret = -EAGAIN;
303 u32 load = rs_tl_get_load(lq_data, tid);
303 304
304 if (rs_tl_get_load(lq_data, tid) > IWL_AGG_LOAD_THRESHOLD) { 305 if (load > IWL_AGG_LOAD_THRESHOLD) {
305 IWL_DEBUG_HT(priv, "Starting Tx agg: STA: %pM tid: %d\n", 306 IWL_DEBUG_HT(priv, "Starting Tx agg: STA: %pM tid: %d\n",
306 sta->addr, tid); 307 sta->addr, tid);
307 ret = ieee80211_start_tx_ba_session(sta, tid); 308 ret = ieee80211_start_tx_ba_session(sta, tid);
@@ -311,12 +312,14 @@ static int rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv,
311 * this might be cause by reloading firmware 312 * this might be cause by reloading firmware
312 * stop the tx ba session here 313 * stop the tx ba session here
313 */ 314 */
314 IWL_DEBUG_HT(priv, "Fail start Tx agg on tid: %d\n", 315 IWL_ERR(priv, "Fail start Tx agg on tid: %d\n",
315 tid); 316 tid);
316 ieee80211_stop_tx_ba_session(sta, tid); 317 ieee80211_stop_tx_ba_session(sta, tid);
317 } 318 }
318 } else 319 } else {
319 IWL_ERR(priv, "Fail finding valid aggregation tid: %d\n", tid); 320 IWL_ERR(priv, "Aggregation not enabled for tid %d "
321 "because load = %u\n", tid, load);
322 }
320 return ret; 323 return ret;
321} 324}
322 325
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index 55a1b31fd09a..d04502d54df3 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -1117,7 +1117,7 @@ int iwlagn_txq_check_empty(struct iwl_priv *priv,
1117 u8 *addr = priv->stations[sta_id].sta.sta.addr; 1117 u8 *addr = priv->stations[sta_id].sta.sta.addr;
1118 struct iwl_tid_data *tid_data = &priv->stations[sta_id].tid[tid]; 1118 struct iwl_tid_data *tid_data = &priv->stations[sta_id].tid[tid];
1119 1119
1120 WARN_ON(!spin_is_locked(&priv->sta_lock)); 1120 lockdep_assert_held(&priv->sta_lock);
1121 1121
1122 switch (priv->stations[sta_id].tid[tid].agg.state) { 1122 switch (priv->stations[sta_id].tid[tid].agg.state) {
1123 case IWL_EMPTYING_HW_QUEUE_DELBA: 1123 case IWL_EMPTYING_HW_QUEUE_DELBA:
@@ -1331,7 +1331,14 @@ void iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv,
1331 tid = ba_resp->tid; 1331 tid = ba_resp->tid;
1332 agg = &priv->stations[sta_id].tid[tid].agg; 1332 agg = &priv->stations[sta_id].tid[tid].agg;
1333 if (unlikely(agg->txq_id != scd_flow)) { 1333 if (unlikely(agg->txq_id != scd_flow)) {
1334 IWL_ERR(priv, "BA scd_flow %d does not match txq_id %d\n", 1334 /*
1335 * FIXME: this is a uCode bug which need to be addressed,
1336 * log the information and return for now!
1337 * since it is possible happen very often and in order
1338 * not to fill the syslog, don't enable the logging by default
1339 */
1340 IWL_DEBUG_TX_REPLY(priv,
1341 "BA scd_flow %d does not match txq_id %d\n",
1335 scd_flow, agg->txq_id); 1342 scd_flow, agg->txq_id);
1336 return; 1343 return;
1337 } 1344 }
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 8024d44ce4bb..8ccb6d205b6d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -2000,6 +2000,7 @@ void iwl_mac_remove_interface(struct ieee80211_hw *hw,
2000 struct ieee80211_vif *vif) 2000 struct ieee80211_vif *vif)
2001{ 2001{
2002 struct iwl_priv *priv = hw->priv; 2002 struct iwl_priv *priv = hw->priv;
2003 bool scan_completed = false;
2003 2004
2004 IWL_DEBUG_MAC80211(priv, "enter\n"); 2005 IWL_DEBUG_MAC80211(priv, "enter\n");
2005 2006
@@ -2013,7 +2014,7 @@ void iwl_mac_remove_interface(struct ieee80211_hw *hw,
2013 if (priv->vif == vif) { 2014 if (priv->vif == vif) {
2014 priv->vif = NULL; 2015 priv->vif = NULL;
2015 if (priv->scan_vif == vif) { 2016 if (priv->scan_vif == vif) {
2016 ieee80211_scan_completed(priv->hw, true); 2017 scan_completed = true;
2017 priv->scan_vif = NULL; 2018 priv->scan_vif = NULL;
2018 priv->scan_request = NULL; 2019 priv->scan_request = NULL;
2019 } 2020 }
@@ -2021,6 +2022,9 @@ void iwl_mac_remove_interface(struct ieee80211_hw *hw,
2021 } 2022 }
2022 mutex_unlock(&priv->mutex); 2023 mutex_unlock(&priv->mutex);
2023 2024
2025 if (scan_completed)
2026 ieee80211_scan_completed(priv->hw, true);
2027
2024 IWL_DEBUG_MAC80211(priv, "leave\n"); 2028 IWL_DEBUG_MAC80211(priv, "leave\n");
2025 2029
2026} 2030}
diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h
index 5c2bcef5df0c..0b961a353ff6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debug.h
+++ b/drivers/net/wireless/iwlwifi/iwl-debug.h
@@ -71,7 +71,7 @@ do { \
71#define IWL_DEBUG(__priv, level, fmt, args...) 71#define IWL_DEBUG(__priv, level, fmt, args...)
72#define IWL_DEBUG_LIMIT(__priv, level, fmt, args...) 72#define IWL_DEBUG_LIMIT(__priv, level, fmt, args...)
73static inline void iwl_print_hex_dump(struct iwl_priv *priv, int level, 73static inline void iwl_print_hex_dump(struct iwl_priv *priv, int level,
74 void *p, u32 len) 74 const void *p, u32 len)
75{} 75{}
76#endif /* CONFIG_IWLWIFI_DEBUG */ 76#endif /* CONFIG_IWLWIFI_DEBUG */
77 77
diff --git a/drivers/net/wireless/iwlwifi/iwl-devtrace.h b/drivers/net/wireless/iwlwifi/iwl-devtrace.h
index ae7319bb3a99..4cf864c664ee 100644
--- a/drivers/net/wireless/iwlwifi/iwl-devtrace.h
+++ b/drivers/net/wireless/iwlwifi/iwl-devtrace.h
@@ -193,7 +193,7 @@ TRACE_EVENT(iwlwifi_dev_tx,
193 __entry->framelen = buf0_len + buf1_len; 193 __entry->framelen = buf0_len + buf1_len;
194 memcpy(__get_dynamic_array(tfd), tfd, tfdlen); 194 memcpy(__get_dynamic_array(tfd), tfd, tfdlen);
195 memcpy(__get_dynamic_array(buf0), buf0, buf0_len); 195 memcpy(__get_dynamic_array(buf0), buf0, buf0_len);
196 memcpy(__get_dynamic_array(buf1), buf1, buf0_len); 196 memcpy(__get_dynamic_array(buf1), buf1, buf1_len);
197 ), 197 ),
198 TP_printk("[%p] TX %.2x (%zu bytes)", 198 TP_printk("[%p] TX %.2x (%zu bytes)",
199 __entry->priv, 199 __entry->priv,
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index b0c6b0473901..a4b3663a262f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -298,7 +298,7 @@ EXPORT_SYMBOL(iwl_init_scan_params);
298 298
299static int iwl_scan_initiate(struct iwl_priv *priv, struct ieee80211_vif *vif) 299static int iwl_scan_initiate(struct iwl_priv *priv, struct ieee80211_vif *vif)
300{ 300{
301 WARN_ON(!mutex_is_locked(&priv->mutex)); 301 lockdep_assert_held(&priv->mutex);
302 302
303 IWL_DEBUG_INFO(priv, "Starting scan...\n"); 303 IWL_DEBUG_INFO(priv, "Starting scan...\n");
304 set_bit(STATUS_SCANNING, &priv->status); 304 set_bit(STATUS_SCANNING, &priv->status);
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index 9511f03f07e0..7e0829be5e78 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -773,7 +773,7 @@ static int iwl_send_static_wepkey_cmd(struct iwl_priv *priv, u8 send_if_empty)
773 773
774int iwl_restore_default_wep_keys(struct iwl_priv *priv) 774int iwl_restore_default_wep_keys(struct iwl_priv *priv)
775{ 775{
776 WARN_ON(!mutex_is_locked(&priv->mutex)); 776 lockdep_assert_held(&priv->mutex);
777 777
778 return iwl_send_static_wepkey_cmd(priv, 0); 778 return iwl_send_static_wepkey_cmd(priv, 0);
779} 779}
@@ -784,7 +784,7 @@ int iwl_remove_default_wep_key(struct iwl_priv *priv,
784{ 784{
785 int ret; 785 int ret;
786 786
787 WARN_ON(!mutex_is_locked(&priv->mutex)); 787 lockdep_assert_held(&priv->mutex);
788 788
789 IWL_DEBUG_WEP(priv, "Removing default WEP key: idx=%d\n", 789 IWL_DEBUG_WEP(priv, "Removing default WEP key: idx=%d\n",
790 keyconf->keyidx); 790 keyconf->keyidx);
@@ -808,7 +808,7 @@ int iwl_set_default_wep_key(struct iwl_priv *priv,
808{ 808{
809 int ret; 809 int ret;
810 810
811 WARN_ON(!mutex_is_locked(&priv->mutex)); 811 lockdep_assert_held(&priv->mutex);
812 812
813 if (keyconf->keylen != WEP_KEY_LEN_128 && 813 if (keyconf->keylen != WEP_KEY_LEN_128 &&
814 keyconf->keylen != WEP_KEY_LEN_64) { 814 keyconf->keylen != WEP_KEY_LEN_64) {