[PATCH 1/2] wcn36xx: don't pad beacons for mesh

Eugene Krasnikov k.eugene.e at gmail.com
Mon Mar 24 05:05:32 EDT 2014


Looks good to me!

2014-03-19 18:56 GMT+00:00 Jason Mobarak <jam at cozybit.com>:
> 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 at cozybit.com>
> Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow at cozybit.com>
> ---
>
> v2: Address comments form Kalle Valo and Bob Copeland: improve the commit
> message and add a comment explaining the "pad = 0" line.
>
>  smd.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/smd.c b/smd.c
> index 1301f4c..a2bf694 100644
> --- a/smd.c
> +++ b/smd.c
> @@ -1303,6 +1303,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;
> --
> 1.9.0
>
>
> _______________________________________________
> wcn36xx mailing list
> wcn36xx at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/wcn36xx



-- 
Best regards,
Eugene



More information about the wcn36xx mailing list