From patchwork Tue Mar 29 21:41:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 8691301 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8E12F9F3D1 for ; Tue, 29 Mar 2016 21:41:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B505920357 for ; Tue, 29 Mar 2016 21:41:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C411B2035D for ; Tue, 29 Mar 2016 21:41:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758280AbcC2VlR (ORCPT ); Tue, 29 Mar 2016 17:41:17 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:35373 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758191AbcC2VlP (ORCPT ); Tue, 29 Mar 2016 17:41:15 -0400 Received: by mail-pa0-f48.google.com with SMTP id td3so23367803pab.2 for ; Tue, 29 Mar 2016 14:41:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to; bh=dMVdMz0uDa4aY84ME2GxmLewaDUtAuPa2pIy6cy1Ok0=; b=FCt5xD2hpHQYWZz62Ua6qM07T59kEeoESaVe9BQ4UWz7pdoSahA08GOMF68sW6oyV3 rMO9PrygWOwspp22RDUyXQMzNR17zouP8hfDGowzdvNuQLkQOcDaCvJ8zaikKKXmBgQa 2y40ksrGhyxhTBBruAn3oHi6v+BVJpt/zlWgA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to; bh=dMVdMz0uDa4aY84ME2GxmLewaDUtAuPa2pIy6cy1Ok0=; b=Y0rAzCUr+kU6q+eYjwwg5LlH1GEwP1keZ0JHz0AT5Hbm4V3Smw3B8gUvVzl62KsA4Y DX+ZfAipOe/yUKh2untsO3zg4roWs+gd0RV3WH2X9kAu5pxKsECDFjPBByLmfhsZymg+ zM/Ul9NTgenmuBi647CQ5NKhmKSG/IAmbPuz4pPLD76QEiUobDKjwLh6dHblCXzMjFmv Sd45Z7T07k53fneMS4rUnmYyRA1Z11/IderHlWkAeXu2FnmEzaR/OguEmJ/Q8YRoGGbB e63tf/O7gugG/Q6SBIswk0HX0jrS2+klk6oyU409/XPU8MeZjBvZ5OhxjT4KcR2B53ex 3evQ== X-Gm-Message-State: AD7BkJIcYXZ+411awn1YIApgI0BVJKPOMigzHNXVPRQOsQUMJ8gUUCjmE5twTvmvTloQQpC5 X-Received: by 10.67.1.237 with SMTP id bj13mr7158944pad.130.1459287674872; Tue, 29 Mar 2016 14:41:14 -0700 (PDT) Received: from localhost.localdomain (ip68-111-223-48.sd.sd.cox.net. [68.111.223.48]) by smtp.gmail.com with ESMTPSA id fn3sm559591pab.20.2016.03.29.14.41.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Mar 2016 14:41:14 -0700 (PDT) From: Bjorn Andersson To: Eugene Krasnikov , Kalle Valo Cc: Sergei Shtylyov , wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jason Mobarak , Chun-Yeow Yeoh Subject: [RESEND PATCH 15/16] wcn36xx: don't pad beacons for mesh Date: Tue, 29 Mar 2016 14:41:12 -0700 Message-Id: <1459287672-3324-1-git-send-email-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1459231593-360-16-git-send-email-bjorn.andersson@linaro.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jason Mobarak 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. Fixes: 8ad99a4e3ee5 ("wcn36xx: Pad TIM PVM if needed") Signed-off-by: Jason Mobarak Signed-off-by: Chun-Yeow Yeoh Signed-off-by: Bjorn Andersson --- Resend this single patch with included Fixes tag. drivers/net/wireless/ath/wcn36xx/smd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index a57d158298a1..b1bdc229e560 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1410,6 +1410,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;