Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 918128
Collapse All | Expand All

(-)a/drivers/net/wireless/intel/iwlwifi/pcie/internal.h (-3 / +3 lines)
Lines 770-776 static inline void iwl_enable_rfkill_int(struct iwl_trans *trans) Link Here
770
	}
770
	}
771
}
771
}
772
772
773
void iwl_pcie_handle_rfkill_irq(struct iwl_trans *trans);
773
void iwl_pcie_handle_rfkill_irq(struct iwl_trans *trans, bool from_irq);
774
774
775
static inline bool iwl_is_rfkill_set(struct iwl_trans *trans)
775
static inline bool iwl_is_rfkill_set(struct iwl_trans *trans)
776
{
776
{
Lines 817-823 static inline bool iwl_pcie_dbg_on(struct iwl_trans *trans) Link Here
817
	return (trans->dbg.dest_tlv || iwl_trans_dbg_ini_valid(trans));
817
	return (trans->dbg.dest_tlv || iwl_trans_dbg_ini_valid(trans));
818
}
818
}
819
819
820
void iwl_trans_pcie_rf_kill(struct iwl_trans *trans, bool state);
820
void iwl_trans_pcie_rf_kill(struct iwl_trans *trans, bool state, bool from_irq);
821
void iwl_trans_pcie_dump_regs(struct iwl_trans *trans);
821
void iwl_trans_pcie_dump_regs(struct iwl_trans *trans);
822
822
823
#ifdef CONFIG_IWLWIFI_DEBUGFS
823
#ifdef CONFIG_IWLWIFI_DEBUGFS
Lines 853-859 void iwl_trans_pcie_gen2_fw_alive(struct iwl_trans *trans, u32 scd_addr); Link Here
853
int iwl_trans_pcie_gen2_send_hcmd(struct iwl_trans *trans,
853
int iwl_trans_pcie_gen2_send_hcmd(struct iwl_trans *trans,
854
				  struct iwl_host_cmd *cmd);
854
				  struct iwl_host_cmd *cmd);
855
void iwl_trans_pcie_gen2_stop_device(struct iwl_trans *trans);
855
void iwl_trans_pcie_gen2_stop_device(struct iwl_trans *trans);
856
void _iwl_trans_pcie_gen2_stop_device(struct iwl_trans *trans);
856
void _iwl_trans_pcie_gen2_stop_device(struct iwl_trans *trans, bool from_irq);
857
void iwl_pcie_d3_complete_suspend(struct iwl_trans *trans,
857
void iwl_pcie_d3_complete_suspend(struct iwl_trans *trans,
858
				  bool test, bool reset);
858
				  bool test, bool reset);
859
int iwl_pcie_gen2_enqueue_hcmd(struct iwl_trans *trans,
859
int iwl_pcie_gen2_enqueue_hcmd(struct iwl_trans *trans,
(-)a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c (-4 / +4 lines)
Lines 1783-1789 static u32 iwl_pcie_int_cause_ict(struct iwl_trans *trans) Link Here
1783
	return inta;
1783
	return inta;
1784
}
1784
}
1785
1785
1786
void iwl_pcie_handle_rfkill_irq(struct iwl_trans *trans)
1786
void iwl_pcie_handle_rfkill_irq(struct iwl_trans *trans, bool from_irq)
1787
{
1787
{
1788
	struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
1788
	struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
1789
	struct isr_statistics *isr_stats = &trans_pcie->isr_stats;
1789
	struct isr_statistics *isr_stats = &trans_pcie->isr_stats;
Lines 1807-1813 void iwl_pcie_handle_rfkill_irq(struct iwl_trans *trans) Link Here
1807
	isr_stats->rfkill++;
1807
	isr_stats->rfkill++;
1808
1808
1809
	if (prev != report)
1809
	if (prev != report)
1810
		iwl_trans_pcie_rf_kill(trans, report);
1810
		iwl_trans_pcie_rf_kill(trans, report, from_irq);
1811
	mutex_unlock(&trans_pcie->mutex);
1811
	mutex_unlock(&trans_pcie->mutex);
1812
1812
1813
	if (hw_rfkill) {
1813
	if (hw_rfkill) {
Lines 1947-1953 irqreturn_t iwl_pcie_irq_handler(int irq, void *dev_id) Link Here
1947
1947
1948
	/* HW RF KILL switch toggled */
1948
	/* HW RF KILL switch toggled */
1949
	if (inta & CSR_INT_BIT_RF_KILL) {
1949
	if (inta & CSR_INT_BIT_RF_KILL) {
1950
		iwl_pcie_handle_rfkill_irq(trans);
1950
		iwl_pcie_handle_rfkill_irq(trans, true);
1951
		handled |= CSR_INT_BIT_RF_KILL;
1951
		handled |= CSR_INT_BIT_RF_KILL;
1952
	}
1952
	}
1953
1953
Lines 2370-2376 irqreturn_t iwl_pcie_irq_msix_handler(int irq, void *dev_id) Link Here
2370
2370
2371
	/* HW RF KILL switch toggled */
2371
	/* HW RF KILL switch toggled */
2372
	if (inta_hw & MSIX_HW_INT_CAUSES_REG_RF_KILL)
2372
	if (inta_hw & MSIX_HW_INT_CAUSES_REG_RF_KILL)
2373
		iwl_pcie_handle_rfkill_irq(trans);
2373
		iwl_pcie_handle_rfkill_irq(trans, true);
2374
2374
2375
	if (inta_hw & MSIX_HW_INT_CAUSES_REG_HW_ERR) {
2375
	if (inta_hw & MSIX_HW_INT_CAUSES_REG_HW_ERR) {
2376
		IWL_ERR(trans,
2376
		IWL_ERR(trans,
(-)a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c (-2 / +2 lines)
Lines 130-136 static void iwl_trans_pcie_fw_reset_handshake(struct iwl_trans *trans) Link Here
130
	trans_pcie->fw_reset_state = FW_RESET_IDLE;
130
	trans_pcie->fw_reset_state = FW_RESET_IDLE;
131
}
131
}
132
132
133
void _iwl_trans_pcie_gen2_stop_device(struct iwl_trans *trans)
133
void _iwl_trans_pcie_gen2_stop_device(struct iwl_trans *trans, bool from_irq)
134
{
134
{
135
	struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
135
	struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
136
136
Lines 221-227 void iwl_trans_pcie_gen2_stop_device(struct iwl_trans *trans) Link Here
221
	mutex_lock(&trans_pcie->mutex);
221
	mutex_lock(&trans_pcie->mutex);
222
	trans_pcie->opmode_down = true;
222
	trans_pcie->opmode_down = true;
223
	was_in_rfkill = test_bit(STATUS_RFKILL_OPMODE, &trans->status);
223
	was_in_rfkill = test_bit(STATUS_RFKILL_OPMODE, &trans->status);
224
	_iwl_trans_pcie_gen2_stop_device(trans);
224
	_iwl_trans_pcie_gen2_stop_device(trans, false);
225
	iwl_trans_pcie_handle_stop_rfkill(trans, was_in_rfkill);
225
	iwl_trans_pcie_handle_stop_rfkill(trans, was_in_rfkill);
226
	mutex_unlock(&trans_pcie->mutex);
226
	mutex_unlock(&trans_pcie->mutex);
227
}
227
}
(-)a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c (-9 / +10 lines)
Lines 1082-1088 bool iwl_pcie_check_hw_rf_kill(struct iwl_trans *trans) Link Here
1082
	report = test_bit(STATUS_RFKILL_OPMODE, &trans->status);
1082
	report = test_bit(STATUS_RFKILL_OPMODE, &trans->status);
1083
1083
1084
	if (prev != report)
1084
	if (prev != report)
1085
		iwl_trans_pcie_rf_kill(trans, report);
1085
		iwl_trans_pcie_rf_kill(trans, report, false);
1086
1086
1087
	return hw_rfkill;
1087
	return hw_rfkill;
1088
}
1088
}
Lines 1237-1243 static void iwl_pcie_init_msix(struct iwl_trans_pcie *trans_pcie) Link Here
1237
	trans_pcie->hw_mask = trans_pcie->hw_init_mask;
1237
	trans_pcie->hw_mask = trans_pcie->hw_init_mask;
1238
}
1238
}
1239
1239
1240
static void _iwl_trans_pcie_stop_device(struct iwl_trans *trans)
1240
static void _iwl_trans_pcie_stop_device(struct iwl_trans *trans, bool from_irq)
1241
{
1241
{
1242
	struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
1242
	struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
1243
1243
Lines 1264-1270 static void _iwl_trans_pcie_stop_device(struct iwl_trans *trans) Link Here
1264
	if (test_and_clear_bit(STATUS_DEVICE_ENABLED, &trans->status)) {
1264
	if (test_and_clear_bit(STATUS_DEVICE_ENABLED, &trans->status)) {
1265
		IWL_DEBUG_INFO(trans,
1265
		IWL_DEBUG_INFO(trans,
1266
			       "DEVICE_ENABLED bit was set and is now cleared\n");
1266
			       "DEVICE_ENABLED bit was set and is now cleared\n");
1267
		iwl_pcie_synchronize_irqs(trans);
1267
		if (!from_irq)
1268
			iwl_pcie_synchronize_irqs(trans);
1268
		iwl_pcie_rx_napi_sync(trans);
1269
		iwl_pcie_rx_napi_sync(trans);
1269
		iwl_pcie_tx_stop(trans);
1270
		iwl_pcie_tx_stop(trans);
1270
		iwl_pcie_rx_stop(trans);
1271
		iwl_pcie_rx_stop(trans);
Lines 1454-1460 void iwl_trans_pcie_handle_stop_rfkill(struct iwl_trans *trans, Link Here
1454
		clear_bit(STATUS_RFKILL_OPMODE, &trans->status);
1455
		clear_bit(STATUS_RFKILL_OPMODE, &trans->status);
1455
	}
1456
	}
1456
	if (hw_rfkill != was_in_rfkill)
1457
	if (hw_rfkill != was_in_rfkill)
1457
		iwl_trans_pcie_rf_kill(trans, hw_rfkill);
1458
		iwl_trans_pcie_rf_kill(trans, hw_rfkill, false);
1458
}
1459
}
1459
1460
1460
static void iwl_trans_pcie_stop_device(struct iwl_trans *trans)
1461
static void iwl_trans_pcie_stop_device(struct iwl_trans *trans)
Lines 1469-1480 static void iwl_trans_pcie_stop_device(struct iwl_trans *trans) Link Here
1469
	mutex_lock(&trans_pcie->mutex);
1470
	mutex_lock(&trans_pcie->mutex);
1470
	trans_pcie->opmode_down = true;
1471
	trans_pcie->opmode_down = true;
1471
	was_in_rfkill = test_bit(STATUS_RFKILL_OPMODE, &trans->status);
1472
	was_in_rfkill = test_bit(STATUS_RFKILL_OPMODE, &trans->status);
1472
	_iwl_trans_pcie_stop_device(trans);
1473
	_iwl_trans_pcie_stop_device(trans, false);
1473
	iwl_trans_pcie_handle_stop_rfkill(trans, was_in_rfkill);
1474
	iwl_trans_pcie_handle_stop_rfkill(trans, was_in_rfkill);
1474
	mutex_unlock(&trans_pcie->mutex);
1475
	mutex_unlock(&trans_pcie->mutex);
1475
}
1476
}
1476
1477
1477
void iwl_trans_pcie_rf_kill(struct iwl_trans *trans, bool state)
1478
void iwl_trans_pcie_rf_kill(struct iwl_trans *trans, bool state, bool from_irq)
1478
{
1479
{
1479
	struct iwl_trans_pcie __maybe_unused *trans_pcie =
1480
	struct iwl_trans_pcie __maybe_unused *trans_pcie =
1480
		IWL_TRANS_GET_PCIE_TRANS(trans);
1481
		IWL_TRANS_GET_PCIE_TRANS(trans);
Lines 1485-1493 void iwl_trans_pcie_rf_kill(struct iwl_trans *trans, bool state) Link Here
1485
		 state ? "disabled" : "enabled");
1486
		 state ? "disabled" : "enabled");
1486
	if (iwl_op_mode_hw_rf_kill(trans->op_mode, state)) {
1487
	if (iwl_op_mode_hw_rf_kill(trans->op_mode, state)) {
1487
		if (trans->trans_cfg->gen2)
1488
		if (trans->trans_cfg->gen2)
1488
			_iwl_trans_pcie_gen2_stop_device(trans);
1489
			_iwl_trans_pcie_gen2_stop_device(trans, from_irq);
1489
		else
1490
		else
1490
			_iwl_trans_pcie_stop_device(trans);
1491
			_iwl_trans_pcie_stop_device(trans, from_irq);
1491
	}
1492
	}
1492
}
1493
}
1493
1494
Lines 2887-2893 static ssize_t iwl_dbgfs_rfkill_write(struct file *file, Link Here
2887
	IWL_WARN(trans, "changing debug rfkill %d->%d\n",
2888
	IWL_WARN(trans, "changing debug rfkill %d->%d\n",
2888
		 trans_pcie->debug_rfkill, new_value);
2889
		 trans_pcie->debug_rfkill, new_value);
2889
	trans_pcie->debug_rfkill = new_value;
2890
	trans_pcie->debug_rfkill = new_value;
2890
	iwl_pcie_handle_rfkill_irq(trans);
2891
	iwl_pcie_handle_rfkill_irq(trans, false);
2891
2892
2892
	return count;
2893
	return count;
2893
}
2894
}

Return to bug 918128