From patchwork Thu Oct 31 06:04:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chun-Yeow Yeoh X-Patchwork-Id: 3118801 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B3766BF924 for ; Thu, 31 Oct 2013 06:06:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E8BF4200FF for ; Thu, 31 Oct 2013 06:06:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0366F200E0 for ; Thu, 31 Oct 2013 06:06:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751726Ab3JaGGf (ORCPT ); Thu, 31 Oct 2013 02:06:35 -0400 Received: from mail-pd0-f182.google.com ([209.85.192.182]:45000 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750762Ab3JaGGe (ORCPT ); Thu, 31 Oct 2013 02:06:34 -0400 Received: by mail-pd0-f182.google.com with SMTP id q10so1918556pdj.13 for ; Wed, 30 Oct 2013 23:06:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=V4hML/t6z2X90GYyfE0cImaU4WkE7KyJD1K1IXLuS0Q=; b=f/hJp6FRuFSxi6cVCNZai69PT/eInRkNSgT88Pyu1o7fWV2tRiPGtJaxuO/2GgFknf XL5h7/KSjykN3DZEuZmLPTw1OT4dRqSXT0H1mwWI/+Gb7MfZIKPRYwjQvCsBZaUiEuEe mtaH0CNL9MnAOYxrsB9nrzPTf3RZKlhKoYOeESuCLX4WvcJ0lrJsegUK0cqjLDT9FGdO 4caFR3TaUc+coyPyJIaslVjrffn6xZgTnAm3MRtVD+Gw8XBcEmrye08nzAUSfE3LQo8w kwnQyFilhxo2XYtjD9k91Nkuiey52pK63Xb+QPJT6HzkyZQQHh0u2n+p88wxoGZDHDjZ fd8A== X-Received: by 10.68.236.103 with SMTP id ut7mr101527pbc.118.1383199594480; Wed, 30 Oct 2013 23:06:34 -0700 (PDT) Received: from localhost.localdomain ([203.106.67.32]) by mx.google.com with ESMTPSA id wp8sm1599849pbc.26.2013.10.30.23.05.43 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Oct 2013 23:06:33 -0700 (PDT) From: Chun-Yeow Yeoh To: linux-wireless@vger.kernel.org Cc: k.eugene.e@gmail.com, linville@tuxdriver.com, wcn36xx@lists.infradead.org, Chun-Yeow Yeoh , Chun-Yeow Yeoh Subject: [PATCH] wcn36xx: enable the beaconing in mesh mode Date: Thu, 31 Oct 2013 14:04:09 +0800 Message-Id: <1383199449-18310-1-git-send-email-yeohchunyeow@gmail.com> X-Mailer: git-send-email 1.7.9.5 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.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 Enable the beaconing in wnc36xx by tweaking the tim offset and force the use of AP-style beaconing. Otherwise, beaconing is not working. The tim offset is set to 256. Otherwise, this will overwrite mesh beacon submitted by mac80211. Signed-off-by: Chun-Yeow Yeoh --- drivers/net/wireless/ath/wcn36xx/smd.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index f8c3a10..19f43de 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1134,14 +1134,14 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif, /* STA */ bss->oper_mode = 1; bss->wcn36xx_hal_persona = WCN36XX_HAL_STA_MODE; - } else if (vif->type == NL80211_IFTYPE_AP) { + } else if (vif->type == NL80211_IFTYPE_AP || + vif->type == NL80211_IFTYPE_MESH_POINT) { bss->bss_type = WCN36XX_HAL_INFRA_AP_MODE; /* AP */ bss->oper_mode = 0; bss->wcn36xx_hal_persona = WCN36XX_HAL_STA_SAP_MODE; - } else if (vif->type == NL80211_IFTYPE_ADHOC || - vif->type == NL80211_IFTYPE_MESH_POINT) { + } else if (vif->type == NL80211_IFTYPE_ADHOC) { bss->bss_type = WCN36XX_HAL_IBSS_MODE; /* STA */ @@ -1291,7 +1291,11 @@ int wcn36xx_smd_send_beacon(struct wcn36xx *wcn, struct ieee80211_vif *vif, memcpy(msg_body.bssid, vif->addr, ETH_ALEN); /* TODO need to find out why this is needed? */ - msg_body.tim_ie_offset = tim_off+4; + if (vif->type == NL80211_IFTYPE_MESH_POINT) + /* mesh beacon don't need this, so push further down */ + msg_body.tim_ie_offset = 256; + else + msg_body.tim_ie_offset = tim_off+4; msg_body.p2p_ie_offset = p2p_off; PREPARE_HAL_BUF(wcn->hal_buf, msg_body);