* [PATCH 1/4] staging: vt6655: check ieee80211_bss_conf bssid not NULL
@ 2015-07-09 16:01 Malcolm Priestley
2015-07-09 16:01 ` [PATCH 2/4 v2] staging: vt6655: Fix missing power saving support Malcolm Priestley
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Malcolm Priestley @ 2015-07-09 16:01 UTC (permalink / raw)
To: gregkh; +Cc: linux-wireless, Malcolm Priestley, stable
Sometimes bssid can go null on failed association.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: <stable@vger.kernel.org> # v3.19+
---
drivers/staging/vt6655/device_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index ed040fb..b0c8e23 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -1418,7 +1418,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,
priv->current_aid = conf->aid;
- if (changed & BSS_CHANGED_BSSID) {
+ if (changed & BSS_CHANGED_BSSID && conf->bssid) {
unsigned long flags;
spin_lock_irqsave(&priv->lock, flags);
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4 v2] staging: vt6655: Fix missing power saving support
2015-07-09 16:01 [PATCH 1/4] staging: vt6655: check ieee80211_bss_conf bssid not NULL Malcolm Priestley
@ 2015-07-09 16:01 ` Malcolm Priestley
2015-07-15 2:28 ` Greg KH
2015-07-09 16:01 ` [PATCH 3/4] staging: vt6655: vnt_tx_packet don't wakeup from power saving Malcolm Priestley
2015-07-09 16:01 ` [PATCH 4/4] staging: vt6655: Correct listen interval TBTT wake up Malcolm Priestley
2 siblings, 1 reply; 5+ messages in thread
From: Malcolm Priestley @ 2015-07-09 16:01 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>
---
v2 rebased for 4.2
drivers/staging/vt6655/device_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index b0c8e23..e78bd5e 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -1811,6 +1811,7 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
ieee80211_hw_set(priv->hw, SIGNAL_DBM);
ieee80211_hw_set(priv->hw, RX_INCLUDES_FCS);
ieee80211_hw_set(priv->hw, REPORTS_TX_ACK_STATUS);
+ ieee80211_hw_set(priv->hw, SUPPORTS_PS);
priv->hw->max_signal = 100;
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] staging: vt6655: vnt_tx_packet don't wakeup from power saving.
2015-07-09 16:01 [PATCH 1/4] staging: vt6655: check ieee80211_bss_conf bssid not NULL Malcolm Priestley
2015-07-09 16:01 ` [PATCH 2/4 v2] staging: vt6655: Fix missing power saving support Malcolm Priestley
@ 2015-07-09 16:01 ` Malcolm Priestley
2015-07-09 16:01 ` [PATCH 4/4] staging: vt6655: Correct listen interval TBTT wake up Malcolm Priestley
2 siblings, 0 replies; 5+ messages in thread
From: Malcolm Priestley @ 2015-07-09 16:01 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 e78bd5e..c245dea 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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] staging: vt6655: Correct listen interval TBTT wake up
2015-07-09 16:01 [PATCH 1/4] staging: vt6655: check ieee80211_bss_conf bssid not NULL Malcolm Priestley
2015-07-09 16:01 ` [PATCH 2/4 v2] staging: vt6655: Fix missing power saving support Malcolm Priestley
2015-07-09 16:01 ` [PATCH 3/4] staging: vt6655: vnt_tx_packet don't wakeup from power saving Malcolm Priestley
@ 2015-07-09 16:01 ` Malcolm Priestley
2 siblings, 0 replies; 5+ messages in thread
From: Malcolm Priestley @ 2015-07-09 16:01 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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/4 v2] staging: vt6655: Fix missing power saving support
2015-07-09 16:01 ` [PATCH 2/4 v2] staging: vt6655: Fix missing power saving support Malcolm Priestley
@ 2015-07-15 2:28 ` Greg KH
0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2015-07-15 2:28 UTC (permalink / raw)
To: Malcolm Priestley; +Cc: linux-wireless
On Thu, Jul 09, 2015 at 05:01:25PM +0100, Malcolm Priestley wrote:
> Add IEEE80211_HW_SUPPORTS_PS to ieee80211_hw flags
> enabling this feature.
>
> Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
>
> ---
> v2 rebased for 4.2
Ah, nevermind, you did this already, now applied.
Sorry for the noise,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-07-15 2:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-09 16:01 [PATCH 1/4] staging: vt6655: check ieee80211_bss_conf bssid not NULL Malcolm Priestley
2015-07-09 16:01 ` [PATCH 2/4 v2] staging: vt6655: Fix missing power saving support Malcolm Priestley
2015-07-15 2:28 ` Greg KH
2015-07-09 16:01 ` [PATCH 3/4] staging: vt6655: vnt_tx_packet don't wakeup from power saving Malcolm Priestley
2015-07-09 16:01 ` [PATCH 4/4] staging: vt6655: Correct listen interval TBTT wake up Malcolm Priestley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).