All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] staging: vt6655: Fix missing power saving support
@ 2015-06-21 10:05 Malcolm Priestley
  2015-06-21 10:05 ` [PATCH 2/3] staging: vt6655: vnt_tx_packet don't wakeup from power saving Malcolm Priestley
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Malcolm Priestley @ 2015-06-21 10:05 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

Add IEEE80211_HW_SUPPORTS_PS to ieee80211_hw flags
enabling this feature.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6655/device_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 0bfc939..b1357af 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -1819,7 +1819,8 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
 	priv->hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
 		IEEE80211_HW_REPORTS_TX_ACK_STATUS |
 		IEEE80211_HW_SIGNAL_DBM |
-		IEEE80211_HW_TIMING_BEACON_ONLY;
+		IEEE80211_HW_TIMING_BEACON_ONLY |
+		IEEE80211_HW_SUPPORTS_PS;
 
 	priv->hw->max_signal = 100;
 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] staging: vt6655: vnt_tx_packet don't wakeup from power saving.
  2015-06-21 10:05 [PATCH 1/3] staging: vt6655: Fix missing power saving support Malcolm Priestley
@ 2015-06-21 10:05 ` Malcolm Priestley
  2015-06-21 10:05 ` [PATCH 3/3] staging: vt6655: Correct listen interval TBTT wake up Malcolm Priestley
  2015-07-15  2:26 ` [PATCH 1/3] staging: vt6655: Fix missing power saving support Greg KH
  2 siblings, 0 replies; 4+ messages in thread
From: Malcolm Priestley @ 2015-06-21 10:05 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

mac80211 changes the wake state before attempting to tx data

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6655/device_main.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index b1357af..c421f78 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -1211,9 +1211,6 @@ static int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
 
 	vnt_generate_fifo_header(priv, dma_idx, head_td, skb);
 
-	if (MACbIsRegBitsOn(priv->PortOffset, MAC_REG_PSCTL, PSCTL_PS))
-		MACbPSWakeup(priv->PortOffset);
-
 	spin_lock_irqsave(&priv->lock, flags);
 
 	priv->bPWBitOn = false;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] staging: vt6655: Correct listen interval TBTT wake up
  2015-06-21 10:05 [PATCH 1/3] staging: vt6655: Fix missing power saving support Malcolm Priestley
  2015-06-21 10:05 ` [PATCH 2/3] staging: vt6655: vnt_tx_packet don't wakeup from power saving Malcolm Priestley
@ 2015-06-21 10:05 ` Malcolm Priestley
  2015-07-15  2:26 ` [PATCH 1/3] staging: vt6655: Fix missing power saving support Greg KH
  2 siblings, 0 replies; 4+ messages in thread
From: Malcolm Priestley @ 2015-06-21 10:05 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

PSbIsNextTBTTWakeUp is called at beacon intervals.

The should listen to next beacon on count down of wake_up_count == 1.

This restores this back to vendors code but modified for mac80211.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6655/device.h |  1 +
 drivers/staging/vt6655/power.c  | 16 ++++++++++++----
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index 5cf1b33..6aebb49 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -403,6 +403,7 @@ struct vnt_private {
 	unsigned char abyEEPROM[EEP_MAX_CONTEXT_SIZE]; /* unsigned long alignment */
 
 	unsigned short wBeaconInterval;
+	u16 wake_up_count;
 
 	struct work_struct interrupt_work;
 
diff --git a/drivers/staging/vt6655/power.c b/drivers/staging/vt6655/power.c
index be3c4e9..06e6b9d 100644
--- a/drivers/staging/vt6655/power.c
+++ b/drivers/staging/vt6655/power.c
@@ -157,10 +157,18 @@ PSbIsNextTBTTWakeUp(
 	struct ieee80211_conf *conf = &hw->conf;
 	bool bWakeUp = false;
 
-	if (conf->listen_interval == 1) {
-		/* Turn on wake up to listen next beacon */
-		MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_LNBCN);
-		bWakeUp = true;
+	if (conf->listen_interval > 1) {
+		if (!pDevice->wake_up_count)
+			pDevice->wake_up_count = conf->listen_interval;
+
+		--pDevice->wake_up_count;
+
+		if (pDevice->wake_up_count == 1) {
+			/* Turn on wake up to listen next beacon */
+			MACvRegBitsOn(pDevice->PortOffset,
+				      MAC_REG_PSCTL, PSCTL_LNBCN);
+			bWakeUp = true;
+		}
 	}
 
 	return bWakeUp;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] staging: vt6655: Fix missing power saving support
  2015-06-21 10:05 [PATCH 1/3] staging: vt6655: Fix missing power saving support Malcolm Priestley
  2015-06-21 10:05 ` [PATCH 2/3] staging: vt6655: vnt_tx_packet don't wakeup from power saving Malcolm Priestley
  2015-06-21 10:05 ` [PATCH 3/3] staging: vt6655: Correct listen interval TBTT wake up Malcolm Priestley
@ 2015-07-15  2:26 ` Greg KH
  2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2015-07-15  2:26 UTC (permalink / raw)
  To: Malcolm Priestley; +Cc: linux-wireless

On Sun, Jun 21, 2015 at 11:05:53AM +0100, Malcolm Priestley wrote:
> Add IEEE80211_HW_SUPPORTS_PS to ieee80211_hw flags
> enabling this feature.
> 
> Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
> ---
>  drivers/staging/vt6655/device_main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
> index 0bfc939..b1357af 100644
> --- a/drivers/staging/vt6655/device_main.c
> +++ b/drivers/staging/vt6655/device_main.c
> @@ -1819,7 +1819,8 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
>  	priv->hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
>  		IEEE80211_HW_REPORTS_TX_ACK_STATUS |
>  		IEEE80211_HW_SIGNAL_DBM |
> -		IEEE80211_HW_TIMING_BEACON_ONLY;
> +		IEEE80211_HW_TIMING_BEACON_ONLY |
> +		IEEE80211_HW_SUPPORTS_PS;
>  
>  	priv->hw->max_signal = 100;

The api changed here, and this patch doesn't apply.  Can you respin it
against the latest -rc tree and resend?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-15  2:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-21 10:05 [PATCH 1/3] staging: vt6655: Fix missing power saving support Malcolm Priestley
2015-06-21 10:05 ` [PATCH 2/3] staging: vt6655: vnt_tx_packet don't wakeup from power saving Malcolm Priestley
2015-06-21 10:05 ` [PATCH 3/3] staging: vt6655: Correct listen interval TBTT wake up Malcolm Priestley
2015-07-15  2:26 ` [PATCH 1/3] staging: vt6655: Fix missing power saving support Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.