Skip to contentSkip to conversation

p54: re-enable power save feature

PATCH RESEND New Christian Lamparter 1 participant 1 message Jul 7, 2009 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 p54: re-enable power save feature

This patch re-enables p54's power save features and adds a workaround which temporarily alters the device's power state in order to allow ps-polls to be sent and buffered data to be retrieved during psm.

---

drivers/net/wireless/p54/fwio.c +4 -3
index 178efbc..9bff43d 100644
@@ -584,7 +584,8 @@ int p54_set_ps(struct p54_common *priv)
 	unsigned int i;
 	u16 mode;
 
-	if (priv->hw->conf.flags & IEEE80211_CONF_PS)
+	if (priv->hw->conf.flags & IEEE80211_CONF_PS &&
+	    !priv->powersave_override)
 		mode = P54_PSM | P54_PSM_BEACON_TIMEOUT | P54_PSM_DTIM |
 		       P54_PSM_CHECKSUM | P54_PSM_MCBC;
 	else
@@ -606,8 +607,8 @@ int p54_set_ps(struct p54_common *priv)
 
 	psm->beacon_rssi_skip_max = 200;
 	psm->rssi_delta_threshold = 0;
-	psm->nr = 10;
-	psm->exclude[0] = 0;
+	psm->nr = 1;
+	psm->exclude[0] = WLAN_EID_TIM;
 
 	p54_tx(priv, skb);
 	return 0;
drivers/net/wireless/p54/lmac.h +3 -0
index 0496cff..af35cfc 100644
@@ -548,4 +548,7 @@ int p54_upload_key(struct p54_common *priv, u8 algo, int slot,
 int p54_download_eeprom(struct p54_common *priv, void *buf,
 			u16 offset, u16 len);
 
+/* utility */
+u8 *p54_find_ie(struct sk_buff *skb, u8 ie);
+
 #endif /* LMAC_H */
drivers/net/wireless/p54/main.c +48 -29

111 lines not on this page · raw message

drivers/net/wireless/p54/p54.h +1 -0
index 19d085c..6772ed5 100644
@@ -208,6 +208,7 @@ struct p54_common {
 	u32 tsf_low32, tsf_high32;
 	u32 basic_rate_mask;
 	u16 aid;
+	bool powersave_override;
 	__le32 beacon_req_id;
 
 	/* cryptographic engine information */
drivers/net/wireless/p54/txrx.c +42 -0

54 lines not on this page · raw message