Skip to contentSkip to conversation

pull request: iwlwifi 2014-09-08

PATCH New Emmanuel Grumbach 2 participants 14 messages Sep 8, 2014 – Sep 9, 2014 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

Hi John,

I think I have caught up completely now - and because I had quite a bit to cover this pull request is rather big for an -rc5. Sorry about that.

I re-enable scheduled scan on firmware that contain the fix for the bug that Linus reported.
A few trivial fixes: endianity issues, the same DTIM period fix that I did in mac80211.
Eyal fixes a few issues we identified with EAPOL, we now send them just as if they were management frames, this solves interrop issues. Johannes has another set of trivial fixes, while Luca fixes the way we configure the filters in the firmware. Last but not least, a new device is added by Oren.

The following changes since commit d88c8958dc13b4e4eb7fc57e3f06dc1c4abc7b1f:

iwlwifi: bump firmware API version to 10 for 7000 and 8000 (2014-09-01 09:50:14 +0300)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes.git for-john

for you to fetch changes up to 2cddddc56a1179aa71b460ad616176c237d4a243:

iwlwifi: mvm: fix an overflow in iwl_mvm_get_signal_strength (2014-09-08 19:47:22 +0300)

----------------------------------------------------------------
Eliad Peller (1):
iwlwifi: increase DEFAULT_MAX_TX_POWER

Emmanuel Grumbach (4):
iwlwifi: mvm: enable scheduled scan on newest firmware
iwlwifi: mvm: fix endianity issues with Smart Fifo commands
iwlwiwi: mvm: use bss_conf->dtim_period instead of conf.ps_dtim_period
iwlwifi: dvm: disable power save by default

Eyal Shapira (2):
iwlwifi: mvm: treat EAPOLs like mgmt frames wrt rate
iwlwifi: mvm: fix an overflow in iwl_mvm_get_signal_strength

Johannes Berg (3):
iwlwifi: mvm: BT Coex - remove shadowing variable
iwlwifi: mvm: correctly handle PM/QoS changes from mac80211
iwlwifi: mvm: BT Coex - always initialize smps_mode

Luciano Coelho (1):
iwlwifi: mvm: set MAC_FILTER_IN_BEACON correctly for STA/P2P client

Oren Givon (1):
iwlwifi: add PCI IDs and add then new 3165 series

 drivers/net/wireless/iwlwifi/dvm/power.c       |  2 +-
 drivers/net/wireless/iwlwifi/iwl-7000.c        | 16 ++++++++++++++++
 drivers/net/wireless/iwlwifi/iwl-config.h      |  3 +++
 drivers/net/wireless/iwlwifi/iwl-nvm-parse.c   |  4 +---
 drivers/net/wireless/iwlwifi/mvm/coex.c        |  9 +++------
 drivers/net/wireless/iwlwifi/mvm/debugfs-vif.c |  3 +--
 drivers/net/wireless/iwlwifi/mvm/fw-api.h      |  4 ++--
 drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c    | 10 +++++-----
 drivers/net/wireless/iwlwifi/mvm/mac80211.c    | 25 ++++++++++++++-----------
 drivers/net/wireless/iwlwifi/mvm/power.c       |  5 ++---
 drivers/net/wireless/iwlwifi/mvm/rx.c          |  6 +++---
 drivers/net/wireless/iwlwifi/mvm/sf.c          |  2 +-
 drivers/net/wireless/iwlwifi/mvm/tx.c          |  8 ++++++--
 drivers/net/wireless/iwlwifi/pcie/drv.c        |  7 +++++++
 14 files changed, 65 insertions(+), 39 deletions(-)
#1 lore raw

PATCH 1/12 iwlwifi: mvm: enable scheduled scan on newest firmware

From: Emmanuel Grumbach <[email protected]>

Scheduled scan was disabled because of a bug in the firmware. The firmware reported support for this feature, but enabling it led to assertions.
The bugs have been fixes in latest firmware versions, so that we can re-enable the feature on latest firmwares only.

---
 drivers/net/wireless/iwlwifi/mvm/mac80211.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
drivers/net/wireless/iwlwifi/mvm/mac80211.c +8 -6
index 7c87965..c4000a1 100644
@@ -396,12 +396,14 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
 	else
 		hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
 
-	/* TODO: enable that only for firmwares that don't crash */
-	/* hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN; */
-	hw->wiphy->max_sched_scan_ssids = PROBE_OPTION_MAX;
-	hw->wiphy->max_match_sets = IWL_SCAN_MAX_PROFILES;
-	/* we create the 802.11 header and zero length SSID IE. */
-	hw->wiphy->max_sched_scan_ie_len = SCAN_OFFLOAD_PROBE_REQ_SIZE - 24 - 2;
+	if (IWL_UCODE_API(mvm->fw->ucode_ver) >= 10) {
+		hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
+		hw->wiphy->max_sched_scan_ssids = PROBE_OPTION_MAX;
+		hw->wiphy->max_match_sets = IWL_SCAN_MAX_PROFILES;
+		/* we create the 802.11 header and zero length SSID IE. */
+		hw->wiphy->max_sched_scan_ie_len =
+			SCAN_OFFLOAD_PROBE_REQ_SIZE - 24 - 2;
+	}
 
 	hw->wiphy->features |= NL80211_FEATURE_P2P_GO_CTWIN |
 			       NL80211_FEATURE_LOW_PRIORITY_SCAN |
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/12 iwlwifi: mvm: BT Coex - remove shadowing variable

In reply to Emmanuel Grumbach

From: Johannes Berg <[email protected]>

The variable 'u32 mode' exists twice, the latter shadowing the former - remove the latter since there's no need for two variables.

---
 drivers/net/wireless/iwlwifi/mvm/coex.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/wireless/iwlwifi/mvm/coex.c +0 -2
index 2291bbc..75178f3 100644
@@ -585,8 +585,6 @@ int iwl_send_bt_init_conf(struct iwl_mvm *mvm)
 	lockdep_assert_held(&mvm->mutex);
 
 	if (unlikely(mvm->bt_force_ant_mode != BT_FORCE_ANT_DIS)) {
-		u32 mode;
-
 		switch (mvm->bt_force_ant_mode) {
 		case BT_FORCE_ANT_BT:
 			mode = BT_COEX_BT;
Signature · 1 line
1.9.1
#3 lore raw

PATCH 3/12 iwlwifi: mvm: set MAC_FILTER_IN_BEACON correctly for STA/P2P client

In reply to Emmanuel Grumbach

From: Luciano Coelho <[email protected]>

In commit cad3f08c (iwlwifi: mvm: enable MAC_FILTER_IN_BEACON when forced_assoc_off is set) the code to set the MAC_FILTER_IN_BEACON flag was accidentally moved to the main block of the if statement, while it should be in the else block instead. Move it to the right place.

Fixes cad3f08c23de ("iwlwifi: mvm: enable MAC_FILTER_IN_BEACON when forced_assoc_off is set")
---
 drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c +5 -5
index 0e523e2..8242e68 100644
@@ -721,11 +721,6 @@ static int iwl_mvm_mac_ctxt_cmd_sta(struct iwl_mvm *mvm,
 	    !force_assoc_off) {
 		u32 dtim_offs;
 
-		/* Allow beacons to pass through as long as we are not
-		 * associated, or we do not have dtim period information.
-		 */
-		cmd.filter_flags |= cpu_to_le32(MAC_FILTER_IN_BEACON);
-
 		/*
 		 * The DTIM count counts down, so when it is N that means N
 		 * more beacon intervals happen until the DTIM TBTT. Therefore
@@ -759,6 +754,11 @@ static int iwl_mvm_mac_ctxt_cmd_sta(struct iwl_mvm *mvm,
 		ctxt_sta->is_assoc = cpu_to_le32(1);
 	} else {
 		ctxt_sta->is_assoc = cpu_to_le32(0);
+
+		/* Allow beacons to pass through as long as we are not
+		 * associated, or we do not have dtim period information.
+		 */
+		cmd.filter_flags |= cpu_to_le32(MAC_FILTER_IN_BEACON);
 	}
 
 	ctxt_sta->bi = cpu_to_le32(vif->bss_conf.beacon_int);
Signature · 1 line
1.9.1
#4 lore raw

PATCH 4/12 iwlwifi: mvm: fix endianity issues with Smart Fifo commands

In reply to Emmanuel Grumbach

From: Emmanuel Grumbach <[email protected]>

This code was broken on big endian systems. Sparse didn't catch the bug since the firmware command was not tagged as little endian.
Fix the bug for big endian systems and tag the field in the firmware command to prevent such issues in the future.

Fixes 1f3b0ff8ec ("iwlwifi: mvm: Add Smart FIFO support")
---
 drivers/net/wireless/iwlwifi/mvm/fw-api.h | 4 ++--
 drivers/net/wireless/iwlwifi/mvm/sf.c     | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/iwlwifi/mvm/fw-api.h +2 -2
index 95f5b32..9a922f3 100644
@@ -1563,14 +1563,14 @@ enum iwl_sf_scenario {
 
 /**
  * Smart Fifo configuration command.
- * @state: smart fifo state, types listed in iwl_sf_sate.
+ * @state: smart fifo state, types listed in enum %iwl_sf_sate.
  * @watermark: Minimum allowed availabe free space in RXF for transient state.
  * @long_delay_timeouts: aging and idle timer values for each scenario
  * in long delay state.
  * @full_on_timeouts: timer values for each scenario in full on state.
  */
 struct iwl_sf_cfg_cmd {
-	enum iwl_sf_state state;
+	__le32 state;
 	__le32 watermark[SF_TRANSIENT_STATES_NUMBER];
 	__le32 long_delay_timeouts[SF_NUM_SCENARIO][SF_NUM_TIMEOUT_TYPES];
 	__le32 full_on_timeouts[SF_NUM_SCENARIO][SF_NUM_TIMEOUT_TYPES];
drivers/net/wireless/iwlwifi/mvm/sf.c +1 -1
index 7edfd15..e843b67 100644
@@ -172,7 +172,7 @@ static int iwl_mvm_sf_config(struct iwl_mvm *mvm, u8 sta_id,
 			     enum iwl_sf_state new_state)
 {
 	struct iwl_sf_cfg_cmd sf_cmd = {
-		.state = new_state,
+		.state = cpu_to_le32(new_state),
 	};
 	struct ieee80211_sta *sta;
 	int ret = 0;
Signature · 1 line
1.9.1
#5 lore raw

PATCH 5/12 iwlwifi: increase DEFAULT_MAX_TX_POWER

In reply to Emmanuel Grumbach

From: Eliad Peller <[email protected]>

The chip is able to transmit up to 22dBm, so set
the constant appropriately.

---
 drivers/net/wireless/iwlwifi/iwl-config.h    | 2 ++
 drivers/net/wireless/iwlwifi/iwl-nvm-parse.c | 4 +---
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/iwlwifi/iwl-config.h +2 -0
index 8da596d..942c99b 100644
@@ -120,6 +120,8 @@ enum iwl_led_mode {
 #define IWL_LONG_WD_TIMEOUT	10000
 #define IWL_MAX_WD_TIMEOUT	120000
 
+#define IWL_DEFAULT_MAX_TX_POWER 22
+
 /* Antenna presence definitions */
 #define	ANT_NONE	0x0
 #define	ANT_A		BIT(0)
drivers/net/wireless/iwlwifi/iwl-nvm-parse.c +1 -3
index 018af29..354255f 100644
@@ -146,8 +146,6 @@ static const u8 iwl_nvm_channels_family_8000[] = {
 #define LAST_2GHZ_HT_PLUS		9
 #define LAST_5GHZ_HT			161
 
-#define DEFAULT_MAX_TX_POWER 16
-
 /* rate data (static) */
 static struct ieee80211_rate iwl_cfg80211_rates[] = {
 	{ .bitrate = 1 * 10, .hw_value = 0, .hw_value_short = 0, },
@@ -295,7 +293,7 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg,
 		 * Default value - highest tx power value.  max_power
 		 * is not used in mvm, and is used for backwards compatibility
 		 */
-		channel->max_power = DEFAULT_MAX_TX_POWER;
+		channel->max_power = IWL_DEFAULT_MAX_TX_POWER;
 		is_5ghz = channel->band == IEEE80211_BAND_5GHZ;
 		IWL_DEBUG_EEPROM(dev,
 				 "Ch. %d [%sGHz] %s%s%s%s%s%s%s(0x%02x %ddBm): Ad-Hoc %ssupported\n",
Signature · 1 line
1.9.1
#6 lore raw

PATCH 6/12 iwlwifi: mvm: correctly handle PM/QoS changes from mac80211

In reply to Emmanuel Grumbach

From: Johannes Berg <[email protected]>

When mac80211 requests multiple BSS config changes, as for example while associating, we ignore power management and QoS changes and only apply them later. Fix that by removing the "else" and making the conditions independent.

Also move it after (potential) beacon filter enablement to have that already enabled when going into power management code.

---
 drivers/net/wireless/iwlwifi/mvm/mac80211.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/net/wireless/iwlwifi/mvm/mac80211.c +6 -5
index c4000a1..cdc272d 100644
@@ -1526,11 +1526,6 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm,
 		 */
 		iwl_mvm_remove_time_event(mvm, mvmvif,
 					  &mvmvif->time_event_data);
-	} else if (changes & (BSS_CHANGED_PS | BSS_CHANGED_P2P_PS |
-			      BSS_CHANGED_QOS)) {
-		ret = iwl_mvm_power_update_mac(mvm);
-		if (ret)
-			IWL_ERR(mvm, "failed to update power mode\n");
 	}
 
 	if (changes & BSS_CHANGED_BEACON_INFO) {
@@ -1538,6 +1533,12 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm,
 		WARN_ON(iwl_mvm_enable_beacon_filter(mvm, vif, 0));
 	}
 
+	if (changes & (BSS_CHANGED_PS | BSS_CHANGED_P2P_PS | BSS_CHANGED_QOS)) {
+		ret = iwl_mvm_power_update_mac(mvm);
+		if (ret)
+			IWL_ERR(mvm, "failed to update power mode\n");
+	}
+
 	if (changes & BSS_CHANGED_TXPOWER) {
 		IWL_DEBUG_CALIB(mvm, "Changing TX Power to %d\n",
 				bss_conf->txpower);
Signature · 1 line
1.9.1
#7 lore raw

PATCH 7/12 iwlwifi: mvm: treat EAPOLs like mgmt frames wrt rate

In reply to Emmanuel Grumbach

From: Eyal Shapira <[email protected]>

Using the LQ table which is initially set according to the rssi could lead to EAPOLs being sent in high legacy rates like 54mbps.
It's better to avoid sending EAPOLs in high rates as it reduces the chances of a successful 4-Way handshake.
Avoid this and treat them like other mgmt frames which would initially get sent at the basic rate.

---
 drivers/net/wireless/iwlwifi/mvm/tx.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/net/wireless/iwlwifi/mvm/tx.c +6 -2
index dbc8707..9ee410b 100644
@@ -168,10 +168,14 @@ static void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm,
 
 	/*
 	 * for data packets, rate info comes from the table inside the fw. This
-	 * table is controlled by LINK_QUALITY commands
+	 * table is controlled by LINK_QUALITY commands. Exclude ctrl port
+	 * frames like EAPOLs which should be treated as mgmt frames. This
+	 * avoids them being sent initially in high rates which increases the
+	 * chances for completion of the 4-Way handshake.
 	 */
 
-	if (ieee80211_is_data(fc) && sta) {
+	if (ieee80211_is_data(fc) && sta &&
+	    !(info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO)) {
 		tx_cmd->initial_rate_index = 0;
 		tx_cmd->tx_flags |= cpu_to_le32(TX_CMD_FLG_STA_RATE);
 		return;
Signature · 1 line
1.9.1
#8 lore raw

PATCH 8/12 iwlwiwi: mvm: use bss_conf->dtim_period instead of conf.ps_dtim_period

In reply to Emmanuel Grumbach

From: Emmanuel Grumbach <[email protected]>

The latter is meant for software implementation of power save and is not per-virtual interface. Since our driver supports multiple virtual interfaces, we need to use vif->bss_conf.dtim_period.

---
 drivers/net/wireless/iwlwifi/mvm/debugfs-vif.c | 3 +--
 drivers/net/wireless/iwlwifi/mvm/power.c       | 5 ++---
 2 files changed, 3 insertions(+), 5 deletions(-)
drivers/net/wireless/iwlwifi/mvm/debugfs-vif.c +1 -2
index 2e90ff7..87e517b 100644
@@ -74,8 +74,7 @@ static void iwl_dbgfs_update_pm(struct iwl_mvm *mvm,
 
 	switch (param) {
 	case MVM_DEBUGFS_PM_KEEP_ALIVE: {
-		struct ieee80211_hw *hw = mvm->hw;
-		int dtimper = hw->conf.ps_dtim_period ?: 1;
+		int dtimper = vif->bss_conf.dtim_period ?: 1;
 		int dtimper_msec = dtimper * vif->bss_conf.beacon_int;
 
 		IWL_DEBUG_POWER(mvm, "debugfs: set keep_alive= %d sec\n", val);
drivers/net/wireless/iwlwifi/mvm/power.c +2 -3
index 2b2d108..d9769a2 100644
@@ -281,7 +281,6 @@ static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm,
 				    struct ieee80211_vif *vif,
 				    struct iwl_mac_power_cmd *cmd)
 {
-	struct ieee80211_hw *hw = mvm->hw;
 	struct ieee80211_chanctx_conf *chanctx_conf;
 	struct ieee80211_channel *chan;
 	int dtimper, dtimper_msec;
@@ -292,7 +291,7 @@ static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm,
 
 	cmd->id_and_color = cpu_to_le32(FW_CMD_ID_AND_COLOR(mvmvif->id,
 							    mvmvif->color));
-	dtimper = hw->conf.ps_dtim_period ?: 1;
+	dtimper = vif->bss_conf.dtim_period;
 
 	/*
 	 * Regardless of power management state the driver must set
@@ -885,7 +884,7 @@ int iwl_mvm_update_d0i3_power_mode(struct iwl_mvm *mvm,
 	iwl_mvm_power_build_cmd(mvm, vif, &cmd);
 	if (enable) {
 		/* configure skip over dtim up to 300 msec */
-		int dtimper = mvm->hw->conf.ps_dtim_period ?: 1;
+		int dtimper = vif->bss_conf.dtim_period ?: 1;
 		int dtimper_msec = dtimper * vif->bss_conf.beacon_int;
 
 		if (WARN_ON(!dtimper_msec))
Signature · 1 line
1.9.1
#9 lore raw

PATCH 9/12 iwlwifi: mvm: BT Coex - always initialize smps_mode

In reply to Emmanuel Grumbach

From: Johannes Berg <[email protected]>

smps_mode is used uninitialized in a debug statement in AP mode, so always initialize it.

While at it, fix a typo.

---
 drivers/net/wireless/iwlwifi/mvm/coex.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/net/wireless/iwlwifi/mvm/coex.c +3 -4
index 75178f3..ce71625 100644
@@ -754,7 +754,8 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
 	struct iwl_bt_iterator_data *data = _data;
 	struct iwl_mvm *mvm = data->mvm;
 	struct ieee80211_chanctx_conf *chanctx_conf;
-	enum ieee80211_smps_mode smps_mode;
+	/* default smps_mode is AUTOMATIC - only used for client modes */
+	enum ieee80211_smps_mode smps_mode = IEEE80211_SMPS_AUTOMATIC;
 	u32 bt_activity_grading;
 	int ave_rssi;
 
@@ -762,8 +763,6 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
 
 	switch (vif->type) {
 	case NL80211_IFTYPE_STATION:
-		/* default smps_mode for BSS / P2P client is AUTOMATIC */
-		smps_mode = IEEE80211_SMPS_AUTOMATIC;
 		break;
 	case NL80211_IFTYPE_AP:
 		if (!mvmvif->ap_ibss_active)
@@ -795,7 +794,7 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
 	else if (bt_activity_grading >= BT_LOW_TRAFFIC)
 		smps_mode = IEEE80211_SMPS_DYNAMIC;
 
-	/* relax SMPS contraints for next association */
+	/* relax SMPS constraints for next association */
 	if (!vif->bss_conf.assoc)
 		smps_mode = IEEE80211_SMPS_AUTOMATIC;
 
Signature · 1 line
1.9.1
#10 lore raw

PATCH 10/12 iwlwifi: dvm: disable power save by default

In reply to Emmanuel Grumbach

From: Emmanuel Grumbach <[email protected]>

In
https://bugzilla.kernel.org/show_bug.cgi?id=84031,
the submitter said that disabling power saving helped, do just that.

---
 drivers/net/wireless/iwlwifi/dvm/power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/iwlwifi/dvm/power.c +1 -1
index 760c45c..1513dbc 100644
@@ -40,7 +40,7 @@
 #include "commands.h"
 #include "power.h"
 
-static bool force_cam;
+static bool force_cam = true;
 module_param(force_cam, bool, 0644);
 MODULE_PARM_DESC(force_cam, "force continuously aware mode (no power saving at all)");
 
Signature · 1 line
1.9.1
#11 lore raw

PATCH 11/12 iwlwifi: add PCI IDs and add then new 3165 series

In reply to Emmanuel Grumbach

From: Oren Givon <[email protected]>

This change does the following:
1) Add a new 7265 series PCI ID
2) Add two new 3160 series PCI IDs
3) Add the new 3165 series PCI IDs and configurations

---
 drivers/net/wireless/iwlwifi/iwl-7000.c   | 16 ++++++++++++++++
 drivers/net/wireless/iwlwifi/iwl-config.h |  1 +
 drivers/net/wireless/iwlwifi/pcie/drv.c   |  7 +++++++
 3 files changed, 24 insertions(+)
drivers/net/wireless/iwlwifi/iwl-7000.c +16 -0
index d67a37a..d53adc2 100644
@@ -83,6 +83,8 @@
 #define IWL7260_TX_POWER_VERSION	0xffff /* meaningless */
 #define IWL3160_NVM_VERSION		0x709
 #define IWL3160_TX_POWER_VERSION	0xffff /* meaningless */
+#define IWL3165_NVM_VERSION		0x709
+#define IWL3165_TX_POWER_VERSION	0xffff /* meaningless */
 #define IWL7265_NVM_VERSION		0x0a1d
 #define IWL7265_TX_POWER_VERSION	0xffff /* meaningless */
 
@@ -92,6 +94,9 @@
 #define IWL3160_FW_PRE "iwlwifi-3160-"
 #define IWL3160_MODULE_FIRMWARE(api) IWL3160_FW_PRE __stringify(api) ".ucode"
 
+#define IWL3165_FW_PRE "iwlwifi-3165-"
+#define IWL3165_MODULE_FIRMWARE(api) IWL3165_FW_PRE __stringify(api) ".ucode"
+
 #define IWL7265_FW_PRE "iwlwifi-7265-"
 #define IWL7265_MODULE_FIRMWARE(api) IWL7265_FW_PRE __stringify(api) ".ucode"
 
@@ -213,6 +218,16 @@ static const struct iwl_pwr_tx_backoff iwl7265_pwr_tx_backoffs[] = {
 	{0},
 };
 
+const struct iwl_cfg iwl3165_2ac_cfg = {
+	.name = "Intel(R) Dual Band Wireless AC 3165",
+	.fw_name_pre = IWL3165_FW_PRE,
+	IWL_DEVICE_7000,
+	.ht_params = &iwl7000_ht_params,
+	.nvm_ver = IWL3165_NVM_VERSION,
+	.nvm_calib_ver = IWL3165_TX_POWER_VERSION,
+	.pwr_tx_backoffs = iwl7265_pwr_tx_backoffs,
+};
+
 const struct iwl_cfg iwl7265_2ac_cfg = {
 	.name = "Intel(R) Dual Band Wireless AC 7265",
 	.fw_name_pre = IWL7265_FW_PRE,
@@ -245,4 +260,5 @@ const struct iwl_cfg iwl7265_n_cfg = {
 
 MODULE_FIRMWARE(IWL7260_MODULE_FIRMWARE(IWL7260_UCODE_API_OK));
 MODULE_FIRMWARE(IWL3160_MODULE_FIRMWARE(IWL3160_UCODE_API_OK));
+MODULE_FIRMWARE(IWL3165_MODULE_FIRMWARE(IWL3160_UCODE_API_OK));
 MODULE_FIRMWARE(IWL7265_MODULE_FIRMWARE(IWL7260_UCODE_API_OK));
drivers/net/wireless/iwlwifi/iwl-config.h +1 -0
index 942c99b..3d7cc37 100644
@@ -337,6 +337,7 @@ extern const struct iwl_cfg iwl7260_n_cfg;
 extern const struct iwl_cfg iwl3160_2ac_cfg;
 extern const struct iwl_cfg iwl3160_2n_cfg;
 extern const struct iwl_cfg iwl3160_n_cfg;
+extern const struct iwl_cfg iwl3165_2ac_cfg;
 extern const struct iwl_cfg iwl7265_2ac_cfg;
 extern const struct iwl_cfg iwl7265_2n_cfg;
 extern const struct iwl_cfg iwl7265_n_cfg;
drivers/net/wireless/iwlwifi/pcie/drv.c +7 -0
index 98950e4..8bb8305 100644
@@ -352,11 +352,17 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
 	{IWL_PCI_DEVICE(0x08B3, 0x8060, iwl3160_2n_cfg)},
 	{IWL_PCI_DEVICE(0x08B3, 0x8062, iwl3160_n_cfg)},
 	{IWL_PCI_DEVICE(0x08B4, 0x8270, iwl3160_2ac_cfg)},
+	{IWL_PCI_DEVICE(0x08B4, 0x8370, iwl3160_2ac_cfg)},
+	{IWL_PCI_DEVICE(0x08B4, 0x8272, iwl3160_2ac_cfg)},
 	{IWL_PCI_DEVICE(0x08B3, 0x8470, iwl3160_2ac_cfg)},
 	{IWL_PCI_DEVICE(0x08B3, 0x8570, iwl3160_2ac_cfg)},
 	{IWL_PCI_DEVICE(0x08B3, 0x1070, iwl3160_2ac_cfg)},
 	{IWL_PCI_DEVICE(0x08B3, 0x1170, iwl3160_2ac_cfg)},
 
+/* 3165 Series */
+	{IWL_PCI_DEVICE(0x3165, 0x4010, iwl3165_2ac_cfg)},
+	{IWL_PCI_DEVICE(0x3165, 0x4210, iwl3165_2ac_cfg)},
+
 /* 7265 Series */
 	{IWL_PCI_DEVICE(0x095A, 0x5010, iwl7265_2ac_cfg)},
 	{IWL_PCI_DEVICE(0x095A, 0x5110, iwl7265_2ac_cfg)},
@@ -378,6 +384,7 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
 	{IWL_PCI_DEVICE(0x095B, 0x5202, iwl7265_n_cfg)},
 	{IWL_PCI_DEVICE(0x095A, 0x9010, iwl7265_2ac_cfg)},
 	{IWL_PCI_DEVICE(0x095A, 0x9012, iwl7265_2ac_cfg)},
+	{IWL_PCI_DEVICE(0x095A, 0x900A, iwl7265_2ac_cfg)},
 	{IWL_PCI_DEVICE(0x095A, 0x9110, iwl7265_2ac_cfg)},
 	{IWL_PCI_DEVICE(0x095A, 0x9112, iwl7265_2ac_cfg)},
 	{IWL_PCI_DEVICE(0x095A, 0x9210, iwl7265_2ac_cfg)},
Signature · 1 line
1.9.1
#12 lore raw

PATCH 12/12 iwlwifi: mvm: fix an overflow in iwl_mvm_get_signal_strength

In reply to Emmanuel Grumbach

From: Eyal Shapira <[email protected]>

The idea here is to translate a value of 0 received from the firmware to the lowest rssi figure. As rx_status->chain_signal is a signed byte the lowest possible value is -128 and not -256. -256 was causing 0 to get stored in the signed byte.

---
 drivers/net/wireless/iwlwifi/mvm/rx.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/iwlwifi/mvm/rx.c +3 -3
index 4b98987..bf5cd8c 100644
@@ -149,13 +149,13 @@ static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm,
 	    le32_to_cpu(phy_info->non_cfg_phy[IWL_RX_INFO_ENERGY_ANT_ABC_IDX]);
 	energy_a = (val & IWL_RX_INFO_ENERGY_ANT_A_MSK) >>
 						IWL_RX_INFO_ENERGY_ANT_A_POS;
-	energy_a = energy_a ? -energy_a : -256;
+	energy_a = energy_a ? -energy_a : S8_MIN;
 	energy_b = (val & IWL_RX_INFO_ENERGY_ANT_B_MSK) >>
 						IWL_RX_INFO_ENERGY_ANT_B_POS;
-	energy_b = energy_b ? -energy_b : -256;
+	energy_b = energy_b ? -energy_b : S8_MIN;
 	energy_c = (val & IWL_RX_INFO_ENERGY_ANT_C_MSK) >>
 						IWL_RX_INFO_ENERGY_ANT_C_POS;
-	energy_c = energy_c ? -energy_c : -256;
+	energy_c = energy_c ? -energy_c : S8_MIN;
 	max_energy = max(energy_a, energy_b);
 	max_energy = max(max_energy, energy_c);
 
Signature · 1 line
1.9.1
#13 lore raw
In reply to Emmanuel Grumbach
Quoted 40 lines · Emmanuel Grumbach

Hi John,

I think I have caught up completely now - and because I had quite a bit to cover this pull request is rather big for an -rc5. Sorry about that.

I re-enable scheduled scan on firmware that contain the fix for the bug that Linus reported.
A few trivial fixes: endianity issues, the same DTIM period fix that I did in mac80211.
Eyal fixes a few issues we identified with EAPOL, we now send them just as if they were management frames, this solves interrop issues. Johannes has another set of trivial fixes, while Luca fixes the way we configure the filters in the firmware. Last but not least, a new device is added by Oren.

The following changes since commit d88c8958dc13b4e4eb7fc57e3f06dc1c4abc7b1f:

iwlwifi: bump firmware API version to 10 for 7000 and 8000 (2014-09-01 09:50:14 +0300)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes.git for-john

for you to fetch changes up to 2cddddc56a1179aa71b460ad616176c237d4a243:

iwlwifi: mvm: fix an overflow in iwl_mvm_get_signal_strength (2014-09-08 19:47:22 +0300)

----------------------------------------------------------------
Eliad Peller (1):
iwlwifi: increase DEFAULT_MAX_TX_POWER

Emmanuel Grumbach (4):
iwlwifi: mvm: enable scheduled scan on newest firmware
iwlwifi: mvm: fix endianity issues with Smart Fifo commands
iwlwiwi: mvm: use bss_conf->dtim_period instead of conf.ps_dtim_period
iwlwifi: dvm: disable power save by default

Eyal Shapira (2):
iwlwifi: mvm: treat EAPOLs like mgmt frames wrt rate
iwlwifi: mvm: fix an overflow in iwl_mvm_get_signal_strength

Johannes Berg (3):
iwlwifi: mvm: BT Coex - remove shadowing variable
iwlwifi: mvm: correctly handle PM/QoS changes from mac80211
iwlwifi: mvm: BT Coex - always initialize smps_mode

Quoted 5 lines

Luciano Coelho (1):
iwlwifi: mvm: set MAC_FILTER_IN_BEACON correctly for STA/P2P client

Oren Givon (1):
iwlwifi: add PCI IDs and add then new 3165 series

I'm pulling this, but some seem a bit questionable. Please limit any further pull requests for 3.17 to fixes for serious bugs only.

Thanks,

John

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.