[PATCH 1/2] Revert "wcn36xx: Pad TIM PVM if needed"
Jason Mobarak
jam at cozybit.com
Thu Mar 6 20:31:01 EST 2014
This reverts commit 4e7f5ff0e6e820681fd0f8096a5b43107cf2c9f9.
---
Reverting this patch is necessary to run the mesh rejoin tests. If this
patch is not reverted, then "mesh join" is broken as well.
hal.h | 3 ---
smd.c | 22 ++--------------------
2 files changed, 2 insertions(+), 23 deletions(-)
diff --git a/hal.h b/hal.h
index 180d458..57b0391 100644
--- a/hal.h
+++ b/hal.h
@@ -55,9 +55,6 @@
/* Default Beacon template size. */
#define BEACON_TEMPLATE_SIZE 0x17C
-/* Minimum PVM size that the FW expects. See comment in smd.c for details. */
-#define TIM_MIN_PVM_SIZE 6
-
/* Param Change Bitmap sent to HAL */
#define PARAM_BCN_INTERVAL_CHANGED (1 << 0)
#define PARAM_SHORT_PREAMBLE_CHANGED (1 << 1)
diff --git a/smd.c b/smd.c
index 1301f4c..e01933a 100644
--- a/smd.c
+++ b/smd.c
@@ -1296,14 +1296,12 @@ int wcn36xx_smd_send_beacon(struct wcn36xx *wcn, struct ieee80211_vif *vif,
u16 p2p_off)
{
struct wcn36xx_hal_send_beacon_req_msg msg_body;
- int ret = 0, pad, pvm_len;
+ int ret = 0;
mutex_lock(&wcn->hal_mutex);
INIT_HAL_MSG(msg_body, WCN36XX_HAL_SEND_BEACON_REQ);
- pvm_len = skb_beacon->data[tim_off + 1] - 3;
- pad = TIM_MIN_PVM_SIZE - pvm_len;
- msg_body.beacon_length = skb_beacon->len + pad;
+ msg_body.beacon_length = skb_beacon->len;
/* TODO need to find out why + 6 is needed */
msg_body.beacon_length6 = msg_body.beacon_length + 6;
@@ -1316,22 +1314,6 @@ int wcn36xx_smd_send_beacon(struct wcn36xx *wcn, struct ieee80211_vif *vif,
memcpy(msg_body.beacon, skb_beacon->data, skb_beacon->len);
memcpy(msg_body.bssid, vif->addr, ETH_ALEN);
- if (pad > 0) {
- /*
- * The wcn36xx FW has a fixed size for the PVM in the TIM. If
- * given the beacon template from mac80211 with a PVM shorter
- * than the FW expectes it will overwrite the data after the
- * TIM.
- */
- wcn36xx_dbg(WCN36XX_DBG_HAL, "Pad TIM PVM. %d bytes at %d\n",
- pad, pvm_len);
- memmove(&msg_body.beacon[tim_off + 5 + pvm_len + pad],
- &msg_body.beacon[tim_off + 5 + pvm_len],
- skb_beacon->len - (tim_off + 5 + pvm_len));
- memset(&msg_body.beacon[tim_off + 5 + pvm_len], 0, pad);
- msg_body.beacon[tim_off + 1] += pad;
- }
-
/* TODO need to find out why this is needed? */
if (vif->type == NL80211_IFTYPE_MESH_POINT)
/* mesh beacon don't need this, so push further down */
--
1.9.0
More information about the wcn36xx
mailing list