[Xenial SRU][PATCH 0/4] Redpine: wowlan enhancements

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[Xenial SRU][PATCH 0/4] Redpine: wowlan enhancements

Amitkumar Karwar
From: Amitkumar Karwar <[hidden email]>

This patch series adds deep sleep power save feature. Device will be
put in low power state in disconnected state. It also includes fixes
for the issues observed during S4 suspend and resume

Prameela Rani Garnepudi (2):
  UBUNTU: SAUCE: Redpine: resolve race while resuming from S4
  UBUNTU: SAUCE: Redpine: Fix card write failure issue at S4 restore

Sanjay Kumar Konduri (2):
  UBUNTU: SAUCE: Redpine: Add deep sleep enable before connection
  UBUNTU: SAUCE: Redpine: resolve power save issue after S4 resume

 ubuntu/rsi/rsi_91x_mac80211.c | 19 ++++++++++++++++---
 ubuntu/rsi/rsi_91x_mgmt.c     | 21 +++++++++++++++------
 ubuntu/rsi/rsi_91x_ps.c       |  2 +-
 ubuntu/rsi/rsi_91x_sdio.c     |  3 +--
 ubuntu/rsi/rsi_main.h         |  1 +
 5 files changed, 34 insertions(+), 12 deletions(-)

--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[Xenial SRU][PATCH 1/4] UBUNTU: SAUCE: Redpine: resolve race while resuming from S4

Amitkumar Karwar
From: Prameela Rani Garnepudi <[hidden email]>

BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1753438
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1753439

At SDIO restore ieee80211_restart_hw() is getting called to
restart all MAC operations. This step is not required.
eturning 1 from mac80211_resume() will serve this purpose.
Above method adding up some races in calling functions because
of timing issues.

Signed-off-by: Prameela Rani Garnepudi <[hidden email]>
Signed-off-by: Amitkumar Karwar <[hidden email]>
---
 ubuntu/rsi/rsi_91x_mac80211.c | 5 ++++-
 ubuntu/rsi/rsi_91x_sdio.c     | 2 --
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/ubuntu/rsi/rsi_91x_mac80211.c b/ubuntu/rsi/rsi_91x_mac80211.c
index 2b18259..2983c73 100644
--- a/ubuntu/rsi/rsi_91x_mac80211.c
+++ b/ubuntu/rsi/rsi_91x_mac80211.c
@@ -2463,7 +2463,10 @@ static int rsi_mac80211_resume(struct ieee80211_hw *hw)
  if (common->hibernate_resume) {
  if (common->reinit_hw)
  wait_for_completion(&common->wlan_init_completion);
- return 0;
+ /* Device need a complete restart of all MAC operations.
+ * returning 1 will serve this purpose.
+ */
+ return 1;
  }
 
 #ifdef CONFIG_VEN_RSI_WOW
diff --git a/ubuntu/rsi/rsi_91x_sdio.c b/ubuntu/rsi/rsi_91x_sdio.c
index a2e25d0..49d46af 100644
--- a/ubuntu/rsi/rsi_91x_sdio.c
+++ b/ubuntu/rsi/rsi_91x_sdio.c
@@ -1506,10 +1506,8 @@ int rsi_restore(struct device *dev)
  adapter->priv->iface_down = true;
 
  adapter->sc_nvifs = 0;
- rsi_mac80211_hw_scan_cancel(adapter->hw, adapter->priv->scan_vif);
  flush_workqueue(adapter->priv->scan_workqueue);
  ieee80211_stop_queues(adapter->hw);
- ieee80211_restart_hw(adapter->hw);
 
  /* Initialize device again */
  adapter->priv->reinit_hw = true;
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[Xenial SRU][PATCH 2/4] UBUNTU: SAUCE: Redpine: Fix card write failure issue at S4 restore

Amitkumar Karwar
In reply to this post by Amitkumar Karwar
From: Prameela Rani Garnepudi <[hidden email]>

BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1753438
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1753439

In S4 regressions, at times card write failure issue is observed.
This is because of sending vap delete frame before peer delete.
Root cause of the issue is, adding peer notify frame to the head
of management queue. This is corrected and S4 is working fine.

Signed-off-by: Prameela Rani Garnepudi <[hidden email]>
Signed-off-by: Amitkumar Karwar <[hidden email]>
---
 ubuntu/rsi/rsi_91x_mgmt.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/ubuntu/rsi/rsi_91x_mgmt.c b/ubuntu/rsi/rsi_91x_mgmt.c
index 8a18c67..c66e14d 100644
--- a/ubuntu/rsi/rsi_91x_mgmt.c
+++ b/ubuntu/rsi/rsi_91x_mgmt.c
@@ -426,9 +426,6 @@ static int rsi_send_internal_mgmt_frame(struct rsi_common *common,
  tx_params = (struct skb_info *)&IEEE80211_SKB_CB(skb)->driver_data;
  tx_params->flags |= INTERNAL_MGMT_PKT;
  skb->priority = MGMT_SOFT_Q;
- if (skb->data[2] == PEER_NOTIFY)
- skb_queue_head(&common->tx_queue[MGMT_SOFT_Q], skb);
- else
  skb_queue_tail(&common->tx_queue[MGMT_SOFT_Q], skb);
  rsi_set_event(&common->tx_thread.event);
  return 0;
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[Xenial SRU][PATCH 3/4] UBUNTU: SAUCE: Redpine: Add deep sleep enable before connection

Amitkumar Karwar
In reply to this post by Amitkumar Karwar
From: Sanjay Kumar Konduri <[hidden email]>

BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1753438
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1753439

As in coex mode radio will be shared between BT and WLAN,
we need enable deep sleep before scan. Before scan deep
sleep can be disabled and re-enabed after scan. For any TX
frame before assoc, deep sleep shall be disable.

Signed-off-by: Sanjay Kumar Konduri <[hidden email]>
Signed-off-by: Amitkumar Karwar <[hidden email]>
---
 ubuntu/rsi/rsi_91x_mac80211.c |  7 ++++++-
 ubuntu/rsi/rsi_91x_mgmt.c     | 18 +++++++++++++++---
 ubuntu/rsi/rsi_91x_ps.c       |  2 +-
 3 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/ubuntu/rsi/rsi_91x_mac80211.c b/ubuntu/rsi/rsi_91x_mac80211.c
index 2983c73..36c0cfd 100644
--- a/ubuntu/rsi/rsi_91x_mac80211.c
+++ b/ubuntu/rsi/rsi_91x_mac80211.c
@@ -549,7 +549,8 @@ static void rsi_mac80211_tx(struct ieee80211_hw *hw,
  struct rsi_hw *adapter = hw->priv;
  struct rsi_common *common = adapter->priv;
  struct ieee80211_hdr *wlh = (struct ieee80211_hdr *)skb->data;
-  struct ieee80211_vif *vif = adapter->vifs[adapter->sc_nvifs - 1];
+ struct ieee80211_vif *vif = adapter->vifs[adapter->sc_nvifs - 1];
+ struct ieee80211_bss_conf *bss = &adapter->vifs[0]->bss_conf;
 
 #ifdef CONFIG_VEN_RSI_WOW
  if (common->wow_flags & RSI_WOW_ENABLED) {
@@ -561,6 +562,10 @@ static void rsi_mac80211_tx(struct ieee80211_hw *hw,
  ieee80211_free_txskb(common->priv->hw, skb);
  return;
  }
+ if ((!bss->assoc) &&
+    (adapter->ps_state == PS_ENABLED) &&
+    (vif->type == NL80211_IFTYPE_STATION))
+ rsi_disable_ps(adapter);
 
   if ((common->coex_mode == 4) &&
       (vif->type == NL80211_IFTYPE_STATION) &&
diff --git a/ubuntu/rsi/rsi_91x_mgmt.c b/ubuntu/rsi/rsi_91x_mgmt.c
index c66e14d..11b2046 100644
--- a/ubuntu/rsi/rsi_91x_mgmt.c
+++ b/ubuntu/rsi/rsi_91x_mgmt.c
@@ -2068,11 +2068,12 @@ EXPORT_SYMBOL_GPL(rsi_send_rx_filter_frame);
 int rsi_send_ps_request(struct rsi_hw *adapter, bool enable)
 {
  struct rsi_common *common = adapter->priv;
- struct ieee80211_bss_conf *bss = &adapter->vifs[0]->bss_conf;
+ struct ieee80211_bss_conf *bss;
  struct rsi_request_ps *ps = NULL;
  struct rsi_ps_info *ps_info = NULL;
  struct sk_buff *skb = NULL;
  int frame_len = sizeof(*ps);
+ bool assoc;
 
  skb = dev_alloc_skb(frame_len);
  if (!skb)
@@ -2110,7 +2111,16 @@ int rsi_send_ps_request(struct rsi_hw *adapter, bool enable)
  ps->ps_sleep.sleep_duration =
  cpu_to_le32(ps_info->deep_sleep_wakeup_period);
 
- if (bss->assoc)
+ if (adapter->sc_nvifs == 0) {
+ assoc = false;
+ } else {
+ bss = &adapter->vifs[0]->bss_conf;
+ if (bss->assoc)
+ assoc = true;
+ else
+ assoc = false;
+ }
+ if (assoc)
  ps->ps_sleep.connected_sleep = CONNECTED_SLEEP;
  else
  ps->ps_sleep.connected_sleep = DEEP_SLEEP;
@@ -2396,6 +2406,7 @@ void rsi_scan_start(struct work_struct *work)
  return;
 
  common->scan_in_prog = true;
+ rsi_disable_ps(common->priv);
 
  for (ii =0; ii < scan_req->n_channels ; ii++) {
  if (common->iface_down)
@@ -2458,7 +2469,7 @@ void rsi_scan_start(struct work_struct *work)
 
  del_timer(&common->scan_timer);
  common->scan_in_prog = false;
-
+ rsi_enable_ps(common->priv);
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0))
  info.aborted = false;
  ieee80211_scan_completed(common->priv->hw, &info);
@@ -2653,6 +2664,7 @@ static int rsi_handle_ta_confirm(struct rsi_common *common, u8 *msg)
  complete(&common->wlan_init_completion);
  common->reinit_hw = false;
  } else {
+ rsi_enable_ps(adapter);
  return rsi_mac80211_attach(common);
  }
  }
diff --git a/ubuntu/rsi/rsi_91x_ps.c b/ubuntu/rsi/rsi_91x_ps.c
index 61294a2..8fa1a3b 100644
--- a/ubuntu/rsi/rsi_91x_ps.c
+++ b/ubuntu/rsi/rsi_91x_ps.c
@@ -100,7 +100,7 @@ void rsi_default_ps_params(struct rsi_hw *adapter)
  ps_info->num_bcns_per_lis_int = 0;
  ps_info->dtim_interval_duration = 0;
  ps_info->num_dtims_per_sleep = 0;
- ps_info->deep_sleep_wakeup_period = 200;
+ ps_info->deep_sleep_wakeup_period = 0;
 }
 EXPORT_SYMBOL_GPL(rsi_default_ps_params);
 
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[Xenial SRU][PATCH 4/4] UBUNTU: SAUCE: Redpine: resolve power save issue after S4 resume

Amitkumar Karwar
In reply to this post by Amitkumar Karwar
From: Sanjay Kumar Konduri <[hidden email]>

BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1753438
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1753439

We are redownloading the firmware after S4 resume. We observed in
stress test that mac80211 sometimes gives power save request after
resume which causes the firmware in bad state.
mac_ops_resumed flag is added to skip that request until initialisation
is done.

Signed-off-by: Sanjay Kumar Konduri <[hidden email]>
Signed-off-by: Amitkumar Karwar <[hidden email]>
---
 ubuntu/rsi/rsi_91x_mac80211.c | 7 ++++++-
 ubuntu/rsi/rsi_91x_sdio.c     | 1 +
 ubuntu/rsi/rsi_main.h         | 1 +
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ubuntu/rsi/rsi_91x_mac80211.c b/ubuntu/rsi/rsi_91x_mac80211.c
index 36c0cfd..129859a 100644
--- a/ubuntu/rsi/rsi_91x_mac80211.c
+++ b/ubuntu/rsi/rsi_91x_mac80211.c
@@ -359,6 +359,7 @@ static int rsi_mac80211_hw_scan_start(struct ieee80211_hw *hw,
  int ii =0;
 
  ven_rsi_dbg(INFO_ZONE, "***** Hardware scan start *****\n");
+ common->mac_ops_resumed = false;
 
  if (common->fsm_state != FSM_MAC_INIT_DONE)
  return -ENODEV;
@@ -566,6 +567,8 @@ static void rsi_mac80211_tx(struct ieee80211_hw *hw,
     (adapter->ps_state == PS_ENABLED) &&
     (vif->type == NL80211_IFTYPE_STATION))
  rsi_disable_ps(adapter);
+ if (ieee80211_is_auth(wlh->frame_control))
+ common->mac_ops_resumed = false;
 
   if ((common->coex_mode == 4) &&
       (vif->type == NL80211_IFTYPE_STATION) &&
@@ -1078,7 +1081,8 @@ static int rsi_mac80211_config(struct ieee80211_hw *hw,
 
  /* Power save parameters */
  if ((changed & IEEE80211_CONF_CHANGE_PS) &&
-    (vif->type == NL80211_IFTYPE_STATION)) {
+    (vif->type == NL80211_IFTYPE_STATION) &&
+     !common->mac_ops_resumed) {
  unsigned long flags;
 
  spin_lock_irqsave(&adapter->ps_lock, flags);
@@ -2466,6 +2470,7 @@ static int rsi_mac80211_resume(struct ieee80211_hw *hw)
  ven_rsi_dbg(INFO_ZONE, "%s: mac80211 resume\n", __func__);
 
  if (common->hibernate_resume) {
+ common->mac_ops_resumed = true;
  if (common->reinit_hw)
  wait_for_completion(&common->wlan_init_completion);
  /* Device need a complete restart of all MAC operations.
diff --git a/ubuntu/rsi/rsi_91x_sdio.c b/ubuntu/rsi/rsi_91x_sdio.c
index 49d46af..06ebae8 100644
--- a/ubuntu/rsi/rsi_91x_sdio.c
+++ b/ubuntu/rsi/rsi_91x_sdio.c
@@ -1506,6 +1506,7 @@ int rsi_restore(struct device *dev)
  adapter->priv->iface_down = true;
 
  adapter->sc_nvifs = 0;
+ adapter->ps_state = PS_NONE;
  flush_workqueue(adapter->priv->scan_workqueue);
  ieee80211_stop_queues(adapter->hw);
 
diff --git a/ubuntu/rsi/rsi_main.h b/ubuntu/rsi/rsi_main.h
index 53b9245..2aad124 100644
--- a/ubuntu/rsi/rsi_main.h
+++ b/ubuntu/rsi/rsi_main.h
@@ -381,6 +381,7 @@ struct rsi_common {
  struct timer_list scan_timer;
  bool hw_scan_cancel;
 #endif
+ bool mac_ops_resumed;
 };
 
 enum host_intf {
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [Xenial SRU][PATCH 0/4] Redpine: wowlan enhancements

Shrirang Bagul
In reply to this post by Amitkumar Karwar
On Mon, 2018-03-05 at 18:10 +0530, Amitkumar Karwar wrote:

> From: Amitkumar Karwar <[hidden email]>
>
> This patch series adds deep sleep power save feature. Device will be
> put in low power state in disconnected state. It also includes fixes
> for the issues observed during S4 suspend and resume
>
> Prameela Rani Garnepudi (2):
>   UBUNTU: SAUCE: Redpine: resolve race while resuming from S4
>   UBUNTU: SAUCE: Redpine: Fix card write failure issue at S4 restore
>
> Sanjay Kumar Konduri (2):
>   UBUNTU: SAUCE: Redpine: Add deep sleep enable before connection
>   UBUNTU: SAUCE: Redpine: resolve power save issue after S4 resume
>
>  ubuntu/rsi/rsi_91x_mac80211.c | 19 ++++++++++++++++---
>  ubuntu/rsi/rsi_91x_mgmt.c     | 21 +++++++++++++++------
>  ubuntu/rsi/rsi_91x_ps.c       |  2 +-
>  ubuntu/rsi/rsi_91x_sdio.c     |  3 +--
>  ubuntu/rsi/rsi_main.h         |  1 +
>  5 files changed, 34 insertions(+), 12 deletions(-)
>
These patches have already been verified to work Dell 300x Edge gateways.

Acked-By: Shrirang Bagul <[hidden email]>
--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (817 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

ACK/cmnt: [Xenial SRU][PATCH 0/4] Redpine: wowlan enhancements

Stefan Bader-2
In reply to this post by Amitkumar Karwar
On 05.03.2018 13:40, Amitkumar Karwar wrote:

> From: Amitkumar Karwar <[hidden email]>
>
> This patch series adds deep sleep power save feature. Device will be
> put in low power state in disconnected state. It also includes fixes
> for the issues observed during S4 suspend and resume
>
> Prameela Rani Garnepudi (2):
>   UBUNTU: SAUCE: Redpine: resolve race while resuming from S4
>   UBUNTU: SAUCE: Redpine: Fix card write failure issue at S4 restore
>
> Sanjay Kumar Konduri (2):
>   UBUNTU: SAUCE: Redpine: Add deep sleep enable before connection
>   UBUNTU: SAUCE: Redpine: resolve power save issue after S4 resume
>
>  ubuntu/rsi/rsi_91x_mac80211.c | 19 ++++++++++++++++---
>  ubuntu/rsi/rsi_91x_mgmt.c     | 21 +++++++++++++++------
>  ubuntu/rsi/rsi_91x_ps.c       |  2 +-
>  ubuntu/rsi/rsi_91x_sdio.c     |  3 +--
>  ubuntu/rsi/rsi_main.h         |  1 +
>  5 files changed, 34 insertions(+), 12 deletions(-)
>
Since this is an additional driver which will not impact generic code I will not
insist on strict procedure. But the way that bug reports are used in this SRU
requests is very confusing to me who is not involved in the project that much.

Of the 4 patches, 3 seem to be very clearly related to s4 issues. And the short
description of the one other patch sounds like power states related, too. But
all 4 patches have BugLinks for an S4 issues (ok) and one about beacon scanning
frequency (no idea how that is related to the s4 issues or the patches).
Normal SRU requests try to fix one issue (possibly with multiple individual
patches). That one submissions refers to multiple bug reports should be a rare
case when one change fixes various symptoms.

Anyhow, as said, I do not think its worth more delay, ... this time.

Acked-by: Stefan Bader <[hidden email]>



--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

APPLIED: [Xenial SRU][PATCH 0/4] Redpine: wowlan enhancements

Stefan Bader-2
In reply to this post by Amitkumar Karwar
On 05.03.2018 13:40, Amitkumar Karwar wrote:

> From: Amitkumar Karwar <[hidden email]>
>
> This patch series adds deep sleep power save feature. Device will be
> put in low power state in disconnected state. It also includes fixes
> for the issues observed during S4 suspend and resume
>
> Prameela Rani Garnepudi (2):
>   UBUNTU: SAUCE: Redpine: resolve race while resuming from S4
>   UBUNTU: SAUCE: Redpine: Fix card write failure issue at S4 restore
>
> Sanjay Kumar Konduri (2):
>   UBUNTU: SAUCE: Redpine: Add deep sleep enable before connection
>   UBUNTU: SAUCE: Redpine: resolve power save issue after S4 resume
>
>  ubuntu/rsi/rsi_91x_mac80211.c | 19 ++++++++++++++++---
>  ubuntu/rsi/rsi_91x_mgmt.c     | 21 +++++++++++++++------
>  ubuntu/rsi/rsi_91x_ps.c       |  2 +-
>  ubuntu/rsi/rsi_91x_sdio.c     |  3 +--
>  ubuntu/rsi/rsi_main.h         |  1 +
>  5 files changed, 34 insertions(+), 12 deletions(-)
>
Applied to xenial/master-next


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment