diff options
author | Jason Mobarak <jam@cozybit.com> | 2014-03-11 15:49:01 -0700 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2016-01-25 18:17:55 -0800 |
commit | e87c8a353f4daa8e830b4b7714542d934b80f9be (patch) | |
tree | bb59bdc7932931c834153e6db818913f574e2391 | |
parent | b30e2b54bfa8f845ed84d0bd9d304d2589a5c645 (diff) |
wcn36xx: don't pad beacons for mesh
Patch "wcn36xx: Pad TIM PVM if needed" has caused a regression in mesh
beaconing. The field tim_off is always 0 for mesh mode, and thus
pvm_len (referring to the TIM length field) and pad are both incorrectly
calculated. Thus, msg_body.beacon_length is incorrectly calculated for
mesh mode. Fix this.
Signed-off-by: Jason Mobarak <jam@cozybit.com>
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
-rw-r--r-- | drivers/net/wireless/ath/wcn36xx/smd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 1692670bf365e..b8bebad8bbe65 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1394,6 +1394,11 @@ int wcn36xx_smd_send_beacon(struct wcn36xx *wcn, struct ieee80211_vif *vif, pvm_len = skb_beacon->data[tim_off + 1] - 3; pad = TIM_MIN_PVM_SIZE - pvm_len; + + /* Padding is irrelevant to mesh mode since tim_off is always 0. */ + if (vif->type == NL80211_IFTYPE_MESH_POINT) + pad = 0; + msg_body.beacon_length = skb_beacon->len + pad; /* TODO need to find out why + 6 is needed */ msg_body.beacon_length6 = msg_body.beacon_length + 6; |