diff options
author | Kalle Valo <kvalo@codeaurora.org> | 2016-10-27 11:00:21 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-10-27 11:00:21 -0400 |
commit | e604d9124b4c9b405e058a8495f28ce6a652efb2 (patch) | |
tree | 3d998a07c57132166c0265aac9b97458153dc3f4 /drivers/net/wireless/intel/iwlwifi | |
parent | 67f0160fe34ec5391a428603b9832c9f99d8f3a1 (diff) | |
parent | 5a143db8c4a28dab6423cb6197e9f1389da375f2 (diff) |
Merge tag 'iwlwifi-for-kalle-2015-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes
* some fixes for suspend/resume with unified FW images;
* a fix for a false-positive lockdep report;
* a fix for multi-queue that caused an unnecessary 1 second latency;
* a fix for an ACPI parsing bug that caused a misleading error message;
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 49 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 33 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 79 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 8 |
9 files changed, 128 insertions, 53 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c index 4fdc3dad3e85..b88e2048ae0b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c | |||
@@ -1087,6 +1087,15 @@ iwl_mvm_netdetect_config(struct iwl_mvm *mvm, | |||
1087 | ret = iwl_mvm_switch_to_d3(mvm); | 1087 | ret = iwl_mvm_switch_to_d3(mvm); |
1088 | if (ret) | 1088 | if (ret) |
1089 | return ret; | 1089 | return ret; |
1090 | } else { | ||
1091 | /* In theory, we wouldn't have to stop a running sched | ||
1092 | * scan in order to start another one (for | ||
1093 | * net-detect). But in practice this doesn't seem to | ||
1094 | * work properly, so stop any running sched_scan now. | ||
1095 | */ | ||
1096 | ret = iwl_mvm_scan_stop(mvm, IWL_MVM_SCAN_SCHED, true); | ||
1097 | if (ret) | ||
1098 | return ret; | ||
1090 | } | 1099 | } |
1091 | 1100 | ||
1092 | /* rfkill release can be either for wowlan or netdetect */ | 1101 | /* rfkill release can be either for wowlan or netdetect */ |
@@ -1254,7 +1263,10 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw, | |||
1254 | out: | 1263 | out: |
1255 | if (ret < 0) { | 1264 | if (ret < 0) { |
1256 | iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN); | 1265 | iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN); |
1257 | ieee80211_restart_hw(mvm->hw); | 1266 | if (mvm->restart_fw > 0) { |
1267 | mvm->restart_fw--; | ||
1268 | ieee80211_restart_hw(mvm->hw); | ||
1269 | } | ||
1258 | iwl_mvm_free_nd(mvm); | 1270 | iwl_mvm_free_nd(mvm); |
1259 | } | 1271 | } |
1260 | out_noreset: | 1272 | out_noreset: |
@@ -2088,6 +2100,16 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test) | |||
2088 | iwl_mvm_update_changed_regdom(mvm); | 2100 | iwl_mvm_update_changed_regdom(mvm); |
2089 | 2101 | ||
2090 | if (mvm->net_detect) { | 2102 | if (mvm->net_detect) { |
2103 | /* If this is a non-unified image, we restart the FW, | ||
2104 | * so no need to stop the netdetect scan. If that | ||
2105 | * fails, continue and try to get the wake-up reasons, | ||
2106 | * but trigger a HW restart by keeping a failure code | ||
2107 | * in ret. | ||
2108 | */ | ||
2109 | if (unified_image) | ||
2110 | ret = iwl_mvm_scan_stop(mvm, IWL_MVM_SCAN_NETDETECT, | ||
2111 | false); | ||
2112 | |||
2091 | iwl_mvm_query_netdetect_reasons(mvm, vif); | 2113 | iwl_mvm_query_netdetect_reasons(mvm, vif); |
2092 | /* has unlocked the mutex, so skip that */ | 2114 | /* has unlocked the mutex, so skip that */ |
2093 | goto out; | 2115 | goto out; |
@@ -2271,7 +2293,8 @@ static void iwl_mvm_d3_test_disconn_work_iter(void *_data, u8 *mac, | |||
2271 | static int iwl_mvm_d3_test_release(struct inode *inode, struct file *file) | 2293 | static int iwl_mvm_d3_test_release(struct inode *inode, struct file *file) |
2272 | { | 2294 | { |
2273 | struct iwl_mvm *mvm = inode->i_private; | 2295 | struct iwl_mvm *mvm = inode->i_private; |
2274 | int remaining_time = 10; | 2296 | bool unified_image = fw_has_capa(&mvm->fw->ucode_capa, |
2297 | IWL_UCODE_TLV_CAPA_CNSLDTD_D3_D0_IMG); | ||
2275 | 2298 | ||
2276 | mvm->d3_test_active = false; | 2299 | mvm->d3_test_active = false; |
2277 | 2300 | ||
@@ -2282,17 +2305,21 @@ static int iwl_mvm_d3_test_release(struct inode *inode, struct file *file) | |||
2282 | mvm->trans->system_pm_mode = IWL_PLAT_PM_MODE_DISABLED; | 2305 | mvm->trans->system_pm_mode = IWL_PLAT_PM_MODE_DISABLED; |
2283 | 2306 | ||
2284 | iwl_abort_notification_waits(&mvm->notif_wait); | 2307 | iwl_abort_notification_waits(&mvm->notif_wait); |
2285 | ieee80211_restart_hw(mvm->hw); | 2308 | if (!unified_image) { |
2309 | int remaining_time = 10; | ||
2286 | 2310 | ||
2287 | /* wait for restart and disconnect all interfaces */ | 2311 | ieee80211_restart_hw(mvm->hw); |
2288 | while (test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status) && | 2312 | |
2289 | remaining_time > 0) { | 2313 | /* wait for restart and disconnect all interfaces */ |
2290 | remaining_time--; | 2314 | while (test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status) && |
2291 | msleep(1000); | 2315 | remaining_time > 0) { |
2292 | } | 2316 | remaining_time--; |
2317 | msleep(1000); | ||
2318 | } | ||
2293 | 2319 | ||
2294 | if (remaining_time == 0) | 2320 | if (remaining_time == 0) |
2295 | IWL_ERR(mvm, "Timed out waiting for HW restart to finish!\n"); | 2321 | IWL_ERR(mvm, "Timed out waiting for HW restart!\n"); |
2322 | } | ||
2296 | 2323 | ||
2297 | ieee80211_iterate_active_interfaces_atomic( | 2324 | ieee80211_iterate_active_interfaces_atomic( |
2298 | mvm->hw, IEEE80211_IFACE_ITER_NORMAL, | 2325 | mvm->hw, IEEE80211_IFACE_ITER_NORMAL, |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c index 07da4efe8458..7b7d2a146e30 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | |||
@@ -1529,8 +1529,8 @@ static ssize_t iwl_dbgfs_mem_read(struct file *file, char __user *user_buf, | |||
1529 | .data = { &cmd, }, | 1529 | .data = { &cmd, }, |
1530 | .len = { sizeof(cmd) }, | 1530 | .len = { sizeof(cmd) }, |
1531 | }; | 1531 | }; |
1532 | size_t delta, len; | 1532 | size_t delta; |
1533 | ssize_t ret; | 1533 | ssize_t ret, len; |
1534 | 1534 | ||
1535 | hcmd.id = iwl_cmd_id(*ppos >> 24 ? UMAC_RD_WR : LMAC_RD_WR, | 1535 | hcmd.id = iwl_cmd_id(*ppos >> 24 ? UMAC_RD_WR : LMAC_RD_WR, |
1536 | DEBUG_GROUP, 0); | 1536 | DEBUG_GROUP, 0); |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 318efd814037..1db1dc13e988 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | |||
@@ -4121,7 +4121,6 @@ void iwl_mvm_sync_rx_queues_internal(struct iwl_mvm *mvm, | |||
4121 | struct iwl_mvm_internal_rxq_notif *notif, | 4121 | struct iwl_mvm_internal_rxq_notif *notif, |
4122 | u32 size) | 4122 | u32 size) |
4123 | { | 4123 | { |
4124 | DECLARE_WAIT_QUEUE_HEAD_ONSTACK(notif_waitq); | ||
4125 | u32 qmask = BIT(mvm->trans->num_rx_queues) - 1; | 4124 | u32 qmask = BIT(mvm->trans->num_rx_queues) - 1; |
4126 | int ret; | 4125 | int ret; |
4127 | 4126 | ||
@@ -4143,7 +4142,7 @@ void iwl_mvm_sync_rx_queues_internal(struct iwl_mvm *mvm, | |||
4143 | } | 4142 | } |
4144 | 4143 | ||
4145 | if (notif->sync) | 4144 | if (notif->sync) |
4146 | ret = wait_event_timeout(notif_waitq, | 4145 | ret = wait_event_timeout(mvm->rx_sync_waitq, |
4147 | atomic_read(&mvm->queue_sync_counter) == 0, | 4146 | atomic_read(&mvm->queue_sync_counter) == 0, |
4148 | HZ); | 4147 | HZ); |
4149 | WARN_ON_ONCE(!ret); | 4148 | WARN_ON_ONCE(!ret); |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index d17cbf603f7c..c60703e0c246 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | |||
@@ -937,6 +937,7 @@ struct iwl_mvm { | |||
937 | /* sync d0i3_tx queue and IWL_MVM_STATUS_IN_D0I3 status flag */ | 937 | /* sync d0i3_tx queue and IWL_MVM_STATUS_IN_D0I3 status flag */ |
938 | spinlock_t d0i3_tx_lock; | 938 | spinlock_t d0i3_tx_lock; |
939 | wait_queue_head_t d0i3_exit_waitq; | 939 | wait_queue_head_t d0i3_exit_waitq; |
940 | wait_queue_head_t rx_sync_waitq; | ||
940 | 941 | ||
941 | /* BT-Coex */ | 942 | /* BT-Coex */ |
942 | struct iwl_bt_coex_profile_notif last_bt_notif; | 943 | struct iwl_bt_coex_profile_notif last_bt_notif; |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c index 05fe6dd1a2c8..4d35deb628bc 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c | |||
@@ -619,6 +619,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, | |||
619 | spin_lock_init(&mvm->refs_lock); | 619 | spin_lock_init(&mvm->refs_lock); |
620 | skb_queue_head_init(&mvm->d0i3_tx); | 620 | skb_queue_head_init(&mvm->d0i3_tx); |
621 | init_waitqueue_head(&mvm->d0i3_exit_waitq); | 621 | init_waitqueue_head(&mvm->d0i3_exit_waitq); |
622 | init_waitqueue_head(&mvm->rx_sync_waitq); | ||
622 | 623 | ||
623 | atomic_set(&mvm->queue_sync_counter, 0); | 624 | atomic_set(&mvm->queue_sync_counter, 0); |
624 | 625 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index a57c6ef5bc14..6c802cee900c 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | |||
@@ -547,7 +547,8 @@ void iwl_mvm_rx_queue_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb, | |||
547 | "Received expired RX queue sync message\n"); | 547 | "Received expired RX queue sync message\n"); |
548 | return; | 548 | return; |
549 | } | 549 | } |
550 | atomic_dec(&mvm->queue_sync_counter); | 550 | if (!atomic_dec_return(&mvm->queue_sync_counter)) |
551 | wake_up(&mvm->rx_sync_waitq); | ||
551 | } | 552 | } |
552 | 553 | ||
553 | switch (internal_notif->type) { | 554 | switch (internal_notif->type) { |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c index f279fdd6eb44..fa9743205491 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c | |||
@@ -1199,6 +1199,9 @@ static int iwl_mvm_num_scans(struct iwl_mvm *mvm) | |||
1199 | 1199 | ||
1200 | static int iwl_mvm_check_running_scans(struct iwl_mvm *mvm, int type) | 1200 | static int iwl_mvm_check_running_scans(struct iwl_mvm *mvm, int type) |
1201 | { | 1201 | { |
1202 | bool unified_image = fw_has_capa(&mvm->fw->ucode_capa, | ||
1203 | IWL_UCODE_TLV_CAPA_CNSLDTD_D3_D0_IMG); | ||
1204 | |||
1202 | /* This looks a bit arbitrary, but the idea is that if we run | 1205 | /* This looks a bit arbitrary, but the idea is that if we run |
1203 | * out of possible simultaneous scans and the userspace is | 1206 | * out of possible simultaneous scans and the userspace is |
1204 | * trying to run a scan type that is already running, we | 1207 | * trying to run a scan type that is already running, we |
@@ -1225,12 +1228,30 @@ static int iwl_mvm_check_running_scans(struct iwl_mvm *mvm, int type) | |||
1225 | return -EBUSY; | 1228 | return -EBUSY; |
1226 | return iwl_mvm_scan_stop(mvm, IWL_MVM_SCAN_REGULAR, true); | 1229 | return iwl_mvm_scan_stop(mvm, IWL_MVM_SCAN_REGULAR, true); |
1227 | case IWL_MVM_SCAN_NETDETECT: | 1230 | case IWL_MVM_SCAN_NETDETECT: |
1228 | /* No need to stop anything for net-detect since the | 1231 | /* For non-unified images, there's no need to stop |
1229 | * firmware is restarted anyway. This way, any sched | 1232 | * anything for net-detect since the firmware is |
1230 | * scans that were running will be restarted when we | 1233 | * restarted anyway. This way, any sched scans that |
1231 | * resume. | 1234 | * were running will be restarted when we resume. |
1232 | */ | 1235 | */ |
1233 | return 0; | 1236 | if (!unified_image) |
1237 | return 0; | ||
1238 | |||
1239 | /* If this is a unified image and we ran out of scans, | ||
1240 | * we need to stop something. Prefer stopping regular | ||
1241 | * scans, because the results are useless at this | ||
1242 | * point, and we should be able to keep running | ||
1243 | * another scheduled scan while suspended. | ||
1244 | */ | ||
1245 | if (mvm->scan_status & IWL_MVM_SCAN_REGULAR_MASK) | ||
1246 | return iwl_mvm_scan_stop(mvm, IWL_MVM_SCAN_REGULAR, | ||
1247 | true); | ||
1248 | if (mvm->scan_status & IWL_MVM_SCAN_SCHED_MASK) | ||
1249 | return iwl_mvm_scan_stop(mvm, IWL_MVM_SCAN_SCHED, | ||
1250 | true); | ||
1251 | |||
1252 | /* fall through, something is wrong if no scan was | ||
1253 | * running but we ran out of scans. | ||
1254 | */ | ||
1234 | default: | 1255 | default: |
1235 | WARN_ON(1); | 1256 | WARN_ON(1); |
1236 | break; | 1257 | break; |
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index 001be406a3d3..2f8134b2a504 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c | |||
@@ -541,48 +541,64 @@ static const struct pci_device_id iwl_hw_card_ids[] = { | |||
541 | MODULE_DEVICE_TABLE(pci, iwl_hw_card_ids); | 541 | MODULE_DEVICE_TABLE(pci, iwl_hw_card_ids); |
542 | 542 | ||
543 | #ifdef CONFIG_ACPI | 543 | #ifdef CONFIG_ACPI |
544 | #define SPL_METHOD "SPLC" | 544 | #define ACPI_SPLC_METHOD "SPLC" |
545 | #define SPL_DOMAINTYPE_MODULE BIT(0) | 545 | #define ACPI_SPLC_DOMAIN_WIFI (0x07) |
546 | #define SPL_DOMAINTYPE_WIFI BIT(1) | ||
547 | #define SPL_DOMAINTYPE_WIGIG BIT(2) | ||
548 | #define SPL_DOMAINTYPE_RFEM BIT(3) | ||
549 | 546 | ||
550 | static u64 splx_get_pwr_limit(struct iwl_trans *trans, union acpi_object *splx) | 547 | static u64 splc_get_pwr_limit(struct iwl_trans *trans, union acpi_object *splc) |
551 | { | 548 | { |
552 | union acpi_object *limits, *domain_type, *power_limit; | 549 | union acpi_object *data_pkg, *dflt_pwr_limit; |
553 | 550 | int i; | |
554 | if (splx->type != ACPI_TYPE_PACKAGE || | 551 | |
555 | splx->package.count != 2 || | 552 | /* We need at least two elements, one for the revision and one |
556 | splx->package.elements[0].type != ACPI_TYPE_INTEGER || | 553 | * for the data itself. Also check that the revision is |
557 | splx->package.elements[0].integer.value != 0) { | 554 | * supported (currently only revision 0). |
558 | IWL_ERR(trans, "Unsupported splx structure\n"); | 555 | */ |
556 | if (splc->type != ACPI_TYPE_PACKAGE || | ||
557 | splc->package.count < 2 || | ||
558 | splc->package.elements[0].type != ACPI_TYPE_INTEGER || | ||
559 | splc->package.elements[0].integer.value != 0) { | ||
560 | IWL_DEBUG_INFO(trans, | ||
561 | "Unsupported structure returned by the SPLC method. Ignoring.\n"); | ||
559 | return 0; | 562 | return 0; |
560 | } | 563 | } |
561 | 564 | ||
562 | limits = &splx->package.elements[1]; | 565 | /* loop through all the packages to find the one for WiFi */ |
563 | if (limits->type != ACPI_TYPE_PACKAGE || | 566 | for (i = 1; i < splc->package.count; i++) { |
564 | limits->package.count < 2 || | 567 | union acpi_object *domain; |
565 | limits->package.elements[0].type != ACPI_TYPE_INTEGER || | 568 | |
566 | limits->package.elements[1].type != ACPI_TYPE_INTEGER) { | 569 | data_pkg = &splc->package.elements[i]; |
567 | IWL_ERR(trans, "Invalid limits element\n"); | 570 | |
568 | return 0; | 571 | /* Skip anything that is not a package with the right |
572 | * amount of elements (i.e. at least 2 integers). | ||
573 | */ | ||
574 | if (data_pkg->type != ACPI_TYPE_PACKAGE || | ||
575 | data_pkg->package.count < 2 || | ||
576 | data_pkg->package.elements[0].type != ACPI_TYPE_INTEGER || | ||
577 | data_pkg->package.elements[1].type != ACPI_TYPE_INTEGER) | ||
578 | continue; | ||
579 | |||
580 | domain = &data_pkg->package.elements[0]; | ||
581 | if (domain->integer.value == ACPI_SPLC_DOMAIN_WIFI) | ||
582 | break; | ||
583 | |||
584 | data_pkg = NULL; | ||
569 | } | 585 | } |
570 | 586 | ||
571 | domain_type = &limits->package.elements[0]; | 587 | if (!data_pkg) { |
572 | power_limit = &limits->package.elements[1]; | 588 | IWL_DEBUG_INFO(trans, |
573 | if (!(domain_type->integer.value & SPL_DOMAINTYPE_WIFI)) { | 589 | "No element for the WiFi domain returned by the SPLC method.\n"); |
574 | IWL_DEBUG_INFO(trans, "WiFi power is not limited\n"); | ||
575 | return 0; | 590 | return 0; |
576 | } | 591 | } |
577 | 592 | ||
578 | return power_limit->integer.value; | 593 | dflt_pwr_limit = &data_pkg->package.elements[1]; |
594 | return dflt_pwr_limit->integer.value; | ||
579 | } | 595 | } |
580 | 596 | ||
581 | static void set_dflt_pwr_limit(struct iwl_trans *trans, struct pci_dev *pdev) | 597 | static void set_dflt_pwr_limit(struct iwl_trans *trans, struct pci_dev *pdev) |
582 | { | 598 | { |
583 | acpi_handle pxsx_handle; | 599 | acpi_handle pxsx_handle; |
584 | acpi_handle handle; | 600 | acpi_handle handle; |
585 | struct acpi_buffer splx = {ACPI_ALLOCATE_BUFFER, NULL}; | 601 | struct acpi_buffer splc = {ACPI_ALLOCATE_BUFFER, NULL}; |
586 | acpi_status status; | 602 | acpi_status status; |
587 | 603 | ||
588 | pxsx_handle = ACPI_HANDLE(&pdev->dev); | 604 | pxsx_handle = ACPI_HANDLE(&pdev->dev); |
@@ -593,23 +609,24 @@ static void set_dflt_pwr_limit(struct iwl_trans *trans, struct pci_dev *pdev) | |||
593 | } | 609 | } |
594 | 610 | ||
595 | /* Get the method's handle */ | 611 | /* Get the method's handle */ |
596 | status = acpi_get_handle(pxsx_handle, (acpi_string)SPL_METHOD, &handle); | 612 | status = acpi_get_handle(pxsx_handle, (acpi_string)ACPI_SPLC_METHOD, |
613 | &handle); | ||
597 | if (ACPI_FAILURE(status)) { | 614 | if (ACPI_FAILURE(status)) { |
598 | IWL_DEBUG_INFO(trans, "SPL method not found\n"); | 615 | IWL_DEBUG_INFO(trans, "SPLC method not found\n"); |
599 | return; | 616 | return; |
600 | } | 617 | } |
601 | 618 | ||
602 | /* Call SPLC with no arguments */ | 619 | /* Call SPLC with no arguments */ |
603 | status = acpi_evaluate_object(handle, NULL, NULL, &splx); | 620 | status = acpi_evaluate_object(handle, NULL, NULL, &splc); |
604 | if (ACPI_FAILURE(status)) { | 621 | if (ACPI_FAILURE(status)) { |
605 | IWL_ERR(trans, "SPLC invocation failed (0x%x)\n", status); | 622 | IWL_ERR(trans, "SPLC invocation failed (0x%x)\n", status); |
606 | return; | 623 | return; |
607 | } | 624 | } |
608 | 625 | ||
609 | trans->dflt_pwr_limit = splx_get_pwr_limit(trans, splx.pointer); | 626 | trans->dflt_pwr_limit = splc_get_pwr_limit(trans, splc.pointer); |
610 | IWL_DEBUG_INFO(trans, "Default power limit set to %lld\n", | 627 | IWL_DEBUG_INFO(trans, "Default power limit set to %lld\n", |
611 | trans->dflt_pwr_limit); | 628 | trans->dflt_pwr_limit); |
612 | kfree(splx.pointer); | 629 | kfree(splc.pointer); |
613 | } | 630 | } |
614 | 631 | ||
615 | #else /* CONFIG_ACPI */ | 632 | #else /* CONFIG_ACPI */ |
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c index e9a278b60dfd..5f840f16f40b 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c | |||
@@ -592,6 +592,7 @@ error: | |||
592 | static int iwl_pcie_txq_init(struct iwl_trans *trans, struct iwl_txq *txq, | 592 | static int iwl_pcie_txq_init(struct iwl_trans *trans, struct iwl_txq *txq, |
593 | int slots_num, u32 txq_id) | 593 | int slots_num, u32 txq_id) |
594 | { | 594 | { |
595 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); | ||
595 | int ret; | 596 | int ret; |
596 | 597 | ||
597 | txq->need_update = false; | 598 | txq->need_update = false; |
@@ -606,6 +607,13 @@ static int iwl_pcie_txq_init(struct iwl_trans *trans, struct iwl_txq *txq, | |||
606 | return ret; | 607 | return ret; |
607 | 608 | ||
608 | spin_lock_init(&txq->lock); | 609 | spin_lock_init(&txq->lock); |
610 | |||
611 | if (txq_id == trans_pcie->cmd_queue) { | ||
612 | static struct lock_class_key iwl_pcie_cmd_queue_lock_class; | ||
613 | |||
614 | lockdep_set_class(&txq->lock, &iwl_pcie_cmd_queue_lock_class); | ||
615 | } | ||
616 | |||
609 | __skb_queue_head_init(&txq->overflow_q); | 617 | __skb_queue_head_init(&txq->overflow_q); |
610 | 618 | ||
611 | /* | 619 | /* |