* [PATCH 3.10 2/8] iwlwifi: mvm: fix MCAST in AP mode
2013-08-21 6:04 [PATCH 3.10 1/8] iwlwifi: mvm: correctly configure MCAST in AP mode Emmanuel Grumbach
@ 2013-08-21 6:04 ` Emmanuel Grumbach
2013-08-21 6:04 ` [PATCH 3.10 3/8] iwlwifi: mvm: properly tell the fw that a STA is awake Emmanuel Grumbach
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Emmanuel Grumbach @ 2013-08-21 6:04 UTC (permalink / raw)
To: Greg KH; +Cc: stable, linux-wireless, Emmanuel Grumbach, Johannes Berg
commit 9116a3683902583a302ac5dcb283416d504d9bb4 upstream.
In multicast, there is no retries nor RTS since there is no
specific recipient that can ACK or send CTS. This means
that we must not use the rate scale table for multicast
frames.
This true for any frame that doesn't have a valid
ieee80211_sta pointer.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/iwlwifi/mvm/tx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c
index 48c1891..b9ba4e7 100644
--- a/drivers/net/wireless/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/iwlwifi/mvm/tx.c
@@ -175,7 +175,7 @@ static void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm,
* table is controlled by LINK_QUALITY commands
*/
- if (ieee80211_is_data(fc)) {
+ if (ieee80211_is_data(fc) && sta) {
tx_cmd->initial_rate_index = 0;
tx_cmd->tx_flags |= cpu_to_le32(TX_CMD_FLG_STA_RATE);
return;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 3.10 3/8] iwlwifi: mvm: properly tell the fw that a STA is awake
2013-08-21 6:04 [PATCH 3.10 1/8] iwlwifi: mvm: correctly configure MCAST in AP mode Emmanuel Grumbach
2013-08-21 6:04 ` [PATCH 3.10 2/8] iwlwifi: mvm: fix " Emmanuel Grumbach
@ 2013-08-21 6:04 ` Emmanuel Grumbach
2013-08-21 6:04 ` [PATCH 3.10 4/8] iwlwifi: mvm: don't set the MCAST queue in STA's queue list Emmanuel Grumbach
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Emmanuel Grumbach @ 2013-08-21 6:04 UTC (permalink / raw)
To: Greg KH; +Cc: stable, linux-wireless, Emmanuel Grumbach, Johannes Berg
commit 5af01772ee1d6e96849adf728ff837bd71b119c0 upstream.
The firmware API wasn't being used correctly, fix that.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/iwlwifi/mvm/sta.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/mvm/sta.c b/drivers/net/wireless/iwlwifi/mvm/sta.c
index 736b50b..35c8ed5 100644
--- a/drivers/net/wireless/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/iwlwifi/mvm/sta.c
@@ -1296,17 +1296,11 @@ void iwl_mvm_sta_modify_ps_wake(struct iwl_mvm *mvm,
struct iwl_mvm_add_sta_cmd cmd = {
.add_modify = STA_MODE_MODIFY,
.sta_id = mvmsta->sta_id,
- .modify_mask = STA_MODIFY_SLEEPING_STA_TX_COUNT,
- .sleep_state_flags = cpu_to_le16(STA_SLEEP_STATE_AWAKE),
+ .station_flags_msk = cpu_to_le32(STA_FLG_PS),
.mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color),
};
int ret;
- /*
- * Same modify mask for sleep_tx_count and sleep_state_flags but this
- * should be fine since if we set the STA as "awake", then
- * sleep_tx_count is not relevant.
- */
ret = iwl_mvm_send_cmd_pdu(mvm, ADD_STA, CMD_ASYNC, sizeof(cmd), &cmd);
if (ret)
IWL_ERR(mvm, "Failed to send ADD_STA command (%d)\n", ret);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 3.10 4/8] iwlwifi: mvm: don't set the MCAST queue in STA's queue list
2013-08-21 6:04 [PATCH 3.10 1/8] iwlwifi: mvm: correctly configure MCAST in AP mode Emmanuel Grumbach
2013-08-21 6:04 ` [PATCH 3.10 2/8] iwlwifi: mvm: fix " Emmanuel Grumbach
2013-08-21 6:04 ` [PATCH 3.10 3/8] iwlwifi: mvm: properly tell the fw that a STA is awake Emmanuel Grumbach
@ 2013-08-21 6:04 ` Emmanuel Grumbach
2013-08-21 6:04 ` [PATCH 3.10 5/8] iwlwifi: mvm: take the seqno from packet if transmit failed Emmanuel Grumbach
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Emmanuel Grumbach @ 2013-08-21 6:04 UTC (permalink / raw)
To: Greg KH; +Cc: stable, linux-wireless, Emmanuel Grumbach, Johannes Berg
commit 837fb69f10588caafc883c4473a864660e1403ce upstream.
The MCAST queue should be enabled after DTIM only.
According to fw API, the MCAST must not be attached to any
station, but should appear in the mcast_qid of the AP's
mac context only.
This bug induces packet loss on MCAST frames since the
firmware was sending them while the peer is asleep.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | 5 +----
drivers/net/wireless/iwlwifi/mvm/sta.c | 3 ---
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
index 3b69045..d8e858c 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
@@ -193,14 +193,11 @@ static void iwl_mvm_mac_iface_iterator(void *_data, u8 *mac,
u32 iwl_mvm_mac_get_queues_mask(struct iwl_mvm *mvm,
struct ieee80211_vif *vif)
{
- u32 qmask, ac;
+ u32 qmask = 0, ac;
if (vif->type == NL80211_IFTYPE_P2P_DEVICE)
return BIT(IWL_MVM_OFFCHANNEL_QUEUE);
- qmask = (vif->cab_queue != IEEE80211_INVAL_HW_QUEUE) ?
- BIT(vif->cab_queue) : 0;
-
for (ac = 0; ac < IEEE80211_NUM_ACS; ac++)
if (vif->hw_queue[ac] != IEEE80211_INVAL_HW_QUEUE)
qmask |= BIT(vif->hw_queue[ac]);
diff --git a/drivers/net/wireless/iwlwifi/mvm/sta.c b/drivers/net/wireless/iwlwifi/mvm/sta.c
index 35c8ed5..68f0bbe 100644
--- a/drivers/net/wireless/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/iwlwifi/mvm/sta.c
@@ -226,9 +226,6 @@ int iwl_mvm_add_sta(struct iwl_mvm *mvm,
if (vif->hw_queue[i] != IEEE80211_INVAL_HW_QUEUE)
mvm_sta->tfd_queue_msk |= BIT(vif->hw_queue[i]);
- if (vif->cab_queue != IEEE80211_INVAL_HW_QUEUE)
- mvm_sta->tfd_queue_msk |= BIT(vif->cab_queue);
-
/* for HW restart - need to reset the seq_number etc... */
memset(mvm_sta->tid_data, 0, sizeof(mvm_sta->tid_data));
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 3.10 5/8] iwlwifi: mvm: take the seqno from packet if transmit failed
2013-08-21 6:04 [PATCH 3.10 1/8] iwlwifi: mvm: correctly configure MCAST in AP mode Emmanuel Grumbach
` (2 preceding siblings ...)
2013-08-21 6:04 ` [PATCH 3.10 4/8] iwlwifi: mvm: don't set the MCAST queue in STA's queue list Emmanuel Grumbach
@ 2013-08-21 6:04 ` Emmanuel Grumbach
2013-08-21 6:04 ` [PATCH 3.10 6/8] iwlwifi: mvm: unregister leds when registration failed Emmanuel Grumbach
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Emmanuel Grumbach @ 2013-08-21 6:04 UTC (permalink / raw)
To: Greg KH; +Cc: stable, linux-wireless, Emmanuel Grumbach, Johannes Berg
commit ebea2f32e814445f94f9e087b646f1cf4d55fa5a upstream.
The fw is unreliable in all the cases in which the packet
wasn't sent.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/iwlwifi/mvm/tx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c
index b9ba4e7..a2e6112e 100644
--- a/drivers/net/wireless/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/iwlwifi/mvm/tx.c
@@ -610,8 +610,8 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm,
!(info->flags & IEEE80211_TX_STAT_ACK))
info->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK;
- /* W/A FW bug: seq_ctl is wrong when the queue is flushed */
- if (status == TX_STATUS_FAIL_FIFO_FLUSHED) {
+ /* W/A FW bug: seq_ctl is wrong when the status isn't success */
+ if (status != TX_STATUS_SUCCESS) {
struct ieee80211_hdr *hdr = (void *)skb->data;
seq_ctl = le16_to_cpu(hdr->seq_ctrl);
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 3.10 6/8] iwlwifi: mvm: unregister leds when registration failed
2013-08-21 6:04 [PATCH 3.10 1/8] iwlwifi: mvm: correctly configure MCAST in AP mode Emmanuel Grumbach
` (3 preceding siblings ...)
2013-08-21 6:04 ` [PATCH 3.10 5/8] iwlwifi: mvm: take the seqno from packet if transmit failed Emmanuel Grumbach
@ 2013-08-21 6:04 ` Emmanuel Grumbach
2013-08-21 6:04 ` [PATCH 3.10 7/8] iwlwifi: bump required firmware API version for 3160/7260 Emmanuel Grumbach
2013-08-21 6:04 ` [PATCH 3.10 8/8] iwlwifi: mvm: adjust firmware D3 configuration API Emmanuel Grumbach
6 siblings, 0 replies; 8+ messages in thread
From: Emmanuel Grumbach @ 2013-08-21 6:04 UTC (permalink / raw)
To: Greg KH; +Cc: stable, linux-wireless, Emmanuel Grumbach, Johannes Berg
commit b7327d89ae694a89f9934d428bde520b77b31 upstream.
This was missing and prevented any further attempts
to load the module.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
drivers/net/wireless/iwlwifi/mvm/mac80211.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index b7e95b0..f7545e0 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -243,7 +243,11 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
if (ret)
return ret;
- return ieee80211_register_hw(mvm->hw);
+ ret = ieee80211_register_hw(mvm->hw);
+ if (ret)
+ iwl_mvm_leds_exit(mvm);
+
+ return ret;
}
static void iwl_mvm_mac_tx(struct ieee80211_hw *hw,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 3.10 7/8] iwlwifi: bump required firmware API version for 3160/7260
2013-08-21 6:04 [PATCH 3.10 1/8] iwlwifi: mvm: correctly configure MCAST in AP mode Emmanuel Grumbach
` (4 preceding siblings ...)
2013-08-21 6:04 ` [PATCH 3.10 6/8] iwlwifi: mvm: unregister leds when registration failed Emmanuel Grumbach
@ 2013-08-21 6:04 ` Emmanuel Grumbach
2013-08-21 6:04 ` [PATCH 3.10 8/8] iwlwifi: mvm: adjust firmware D3 configuration API Emmanuel Grumbach
6 siblings, 0 replies; 8+ messages in thread
From: Emmanuel Grumbach @ 2013-08-21 6:04 UTC (permalink / raw)
To: Greg KH; +Cc: stable, linux-wireless, Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
commit a2d0909a687b4d250cc2b7481072e361678745ba upstream.
As the firmware API has changed significantly and we don't
have support code for the old APIs, bump the version to be
able to release the version 7 API firmware. Unfortunately
this means that the driver in 3.9 and 3.10 can't work, but
that's still better than crashing the device/driver there.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/iwlwifi/iwl-7000.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-7000.c b/drivers/net/wireless/iwlwifi/iwl-7000.c
index 50263e8..dc94d44 100644
--- a/drivers/net/wireless/iwlwifi/iwl-7000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-7000.c
@@ -67,16 +67,16 @@
#include "iwl-agn-hw.h"
/* Highest firmware API version supported */
-#define IWL7260_UCODE_API_MAX 6
-#define IWL3160_UCODE_API_MAX 6
+#define IWL7260_UCODE_API_MAX 7
+#define IWL3160_UCODE_API_MAX 7
/* Oldest version we won't warn about */
-#define IWL7260_UCODE_API_OK 6
-#define IWL3160_UCODE_API_OK 6
+#define IWL7260_UCODE_API_OK 7
+#define IWL3160_UCODE_API_OK 7
/* Lowest firmware API version supported */
-#define IWL7260_UCODE_API_MIN 6
-#define IWL3160_UCODE_API_MIN 6
+#define IWL7260_UCODE_API_MIN 7
+#define IWL3160_UCODE_API_MIN 7
/* NVM versions */
#define IWL7260_NVM_VERSION 0x0a1d
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 3.10 8/8] iwlwifi: mvm: adjust firmware D3 configuration API
2013-08-21 6:04 [PATCH 3.10 1/8] iwlwifi: mvm: correctly configure MCAST in AP mode Emmanuel Grumbach
` (5 preceding siblings ...)
2013-08-21 6:04 ` [PATCH 3.10 7/8] iwlwifi: bump required firmware API version for 3160/7260 Emmanuel Grumbach
@ 2013-08-21 6:04 ` Emmanuel Grumbach
6 siblings, 0 replies; 8+ messages in thread
From: Emmanuel Grumbach @ 2013-08-21 6:04 UTC (permalink / raw)
To: Greg KH; +Cc: stable, linux-wireless, Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
commit dfcb4c3aacedee6838e436fb575b31e138505203 upstream.
The D3 firmware API changed to include a new field, adjust
the driver to it to avoid getting an NMI when configuring.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h b/drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h
index 51e015d..6f8b2c1 100644
--- a/drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h
+++ b/drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h
@@ -75,13 +75,15 @@ enum iwl_d3_wakeup_flags {
* struct iwl_d3_manager_config - D3 manager configuration command
* @min_sleep_time: minimum sleep time (in usec)
* @wakeup_flags: wakeup flags, see &enum iwl_d3_wakeup_flags
+ * @wakeup_host_timer: force wakeup after this many seconds
*
* The structure is used for the D3_CONFIG_CMD command.
*/
struct iwl_d3_manager_config {
__le32 min_sleep_time;
__le32 wakeup_flags;
-} __packed; /* D3_MANAGER_CONFIG_CMD_S_VER_3 */
+ __le32 wakeup_host_timer;
+} __packed; /* D3_MANAGER_CONFIG_CMD_S_VER_4 */
/* TODO: OFFLOADS_QUERY_API_S_VER_1 */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread