Commit dfbebe14 authored by John W. Linville's avatar John W. Linville
Browse files
Conflicts:
	drivers/net/wireless/iwlwifi/pcie/trans.c
parents 0f622485 d18aa87f
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -133,12 +133,3 @@ config IWLWIFI_P2P
	  support when it is loaded.

	  Say Y only if you want to experiment with P2P.

config IWLWIFI_EXPERIMENTAL_MFP
	bool "support MFP (802.11w) even if uCode doesn't advertise"
	depends on IWLWIFI
	help
	  This option enables experimental MFP (802.11W) support
	  even if the microcode doesn't advertise it.

	  Say Y only if you want to experiment with MFP.
+2 −2
Original line number Diff line number Diff line
@@ -176,8 +176,8 @@ int iwlagn_hw_valid_rtc_data_addr(u32 addr);
/* lib */
int iwlagn_send_tx_power(struct iwl_priv *priv);
void iwlagn_temperature(struct iwl_priv *priv);
int iwlagn_txfifo_flush(struct iwl_priv *priv, u16 flush_control);
void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control);
int iwlagn_txfifo_flush(struct iwl_priv *priv);
void iwlagn_dev_txfifo_flush(struct iwl_priv *priv);
int iwlagn_send_beacon_cmd(struct iwl_priv *priv);
int iwl_send_statistics_request(struct iwl_priv *priv,
				u8 flags, bool clear);
+3 −4
Original line number Diff line number Diff line
@@ -986,8 +986,7 @@ struct iwl_rem_sta_cmd {

#define IWL_AGG_TX_QUEUE_MSK		cpu_to_le32(0xffc00)

#define IWL_DROP_SINGLE		0
#define IWL_DROP_ALL		(BIT(IWL_RXON_CTX_BSS) | BIT(IWL_RXON_CTX_PAN))
#define IWL_DROP_ALL			BIT(1)

/*
 * REPLY_TXFIFO_FLUSH = 0x1e(command and response)
@@ -1004,14 +1003,14 @@ struct iwl_rem_sta_cmd {
 * the flush operation ends when both the scheduler DMA done and TXFIFO empty
 * are set.
 *
 * @fifo_control: bit mask for which queues to flush
 * @queue_control: bit mask for which queues to flush
 * @flush_control: flush controls
 *	0: Dump single MSDU
 *	1: Dump multiple MSDU according to PS, INVALID STA, TTL, TID disable.
 *	2: Dump all FIFO
 */
struct iwl_txfifo_flush_cmd {
	__le32 fifo_control;
	__le32 queue_control;
	__le16 flush_control;
	__le16 reserved;
} __packed;
+1 −1
Original line number Diff line number Diff line
@@ -2101,7 +2101,7 @@ static ssize_t iwl_dbgfs_txfifo_flush_write(struct file *file,
	if (iwl_is_rfkill(priv))
		return -EFAULT;

	iwlagn_dev_txfifo_flush(priv, IWL_DROP_ALL);
	iwlagn_dev_txfifo_flush(priv);

	return count;
}
+18 −19
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@ int iwlagn_manage_ibss_station(struct iwl_priv *priv,
 *  1. acquire mutex before calling
 *  2. make sure rf is on and not in exit state
 */
int iwlagn_txfifo_flush(struct iwl_priv *priv, u16 flush_control)
int iwlagn_txfifo_flush(struct iwl_priv *priv)
{
	struct iwl_txfifo_flush_cmd flush_cmd;
	struct iwl_host_cmd cmd = {
@@ -146,35 +146,34 @@ int iwlagn_txfifo_flush(struct iwl_priv *priv, u16 flush_control)
		.data = { &flush_cmd, },
	};

	might_sleep();

	memset(&flush_cmd, 0, sizeof(flush_cmd));
	if (flush_control & BIT(IWL_RXON_CTX_BSS))
		flush_cmd.fifo_control = IWL_SCD_VO_MSK | IWL_SCD_VI_MSK |

	flush_cmd.queue_control = IWL_SCD_VO_MSK | IWL_SCD_VI_MSK |
				  IWL_SCD_BE_MSK | IWL_SCD_BK_MSK |
				  IWL_SCD_MGMT_MSK;
	if ((flush_control & BIT(IWL_RXON_CTX_PAN)) &&
	    (priv->valid_contexts != BIT(IWL_RXON_CTX_BSS)))
		flush_cmd.fifo_control |= IWL_PAN_SCD_VO_MSK |
				IWL_PAN_SCD_VI_MSK | IWL_PAN_SCD_BE_MSK |
				IWL_PAN_SCD_BK_MSK | IWL_PAN_SCD_MGMT_MSK |
	if ((priv->valid_contexts != BIT(IWL_RXON_CTX_BSS)))
		flush_cmd.queue_control |= IWL_PAN_SCD_VO_MSK |
					   IWL_PAN_SCD_VI_MSK |
					   IWL_PAN_SCD_BE_MSK |
					   IWL_PAN_SCD_BK_MSK |
					   IWL_PAN_SCD_MGMT_MSK |
					   IWL_PAN_SCD_MULTICAST_MSK;

	if (priv->eeprom_data->sku & EEPROM_SKU_CAP_11N_ENABLE)
		flush_cmd.fifo_control |= IWL_AGG_TX_QUEUE_MSK;
		flush_cmd.queue_control |= IWL_AGG_TX_QUEUE_MSK;

	IWL_DEBUG_INFO(priv, "fifo queue control: 0X%x\n",
		       flush_cmd.fifo_control);
	flush_cmd.flush_control = cpu_to_le16(flush_control);
	IWL_DEBUG_INFO(priv, "queue control: 0x%x\n",
		       flush_cmd.queue_control);
	flush_cmd.flush_control = cpu_to_le16(IWL_DROP_ALL);

	return iwl_dvm_send_cmd(priv, &cmd);
}

void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control)
void iwlagn_dev_txfifo_flush(struct iwl_priv *priv)
{
	mutex_lock(&priv->mutex);
	ieee80211_stop_queues(priv->hw);
	if (iwlagn_txfifo_flush(priv, IWL_DROP_ALL)) {
	if (iwlagn_txfifo_flush(priv)) {
		IWL_ERR(priv, "flush request fail\n");
		goto done;
	}
Loading