From patchwork Wed Nov 20 09:57:01 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: 3212551 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 978E9C045B for ; Wed, 20 Nov 2013 09:57:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B00C82064B for ; Wed, 20 Nov 2013 09:57:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A0D7920648 for ; Wed, 20 Nov 2013 09:57:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753147Ab3KTJ5f (ORCPT ); Wed, 20 Nov 2013 04:57:35 -0500 Received: from mail-pd0-f180.google.com ([209.85.192.180]:40653 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752932Ab3KTJ5Z (ORCPT ); Wed, 20 Nov 2013 04:57:25 -0500 Received: by mail-pd0-f180.google.com with SMTP id q10so4185007pdj.25 for ; Wed, 20 Nov 2013 01:57:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=gmOYbKAN1tgLRLNWsAD+OMdVlzopSlP11VQsPx7NhwM=; b=illfl5sHxijxhiCpBgN49wwHyt1MmUjyoTKnsDMn9p0h5FyBa5H1iH7pvhwj+smz2L vkAfofpWfXhQnQOA9PDuEQxRWdFEuwtLH9t5athuCJ0kFACM5xmYvbCofORxT//mpenz ZzPZZdqRAb5ATU4Beo69ZciTfQJl+K+Ik70RTsJfiy65kHRH7SqBvIA4Ct/J3S7Tqy0A 4DNg/gyKabc/p7cPbIRrwnMvOaKRIfokKQk3KODIYvc8dREtU6yRbr9MMvpMHWVKXEtS fAdbXNkHwG36Dz7Nba2YM05JM3k9iHZ9jv3xBxQGQynPEuFfWyAj85PhUOzA6T6i8EfV gU5A== X-Received: by 10.66.121.131 with SMTP id lk3mr31176496pab.61.1384941442535; Wed, 20 Nov 2013 01:57:22 -0800 (PST) Received: from localhost.localdomain ([58.26.233.145]) by mx.google.com with ESMTPSA id ha10sm36614254pbd.17.2013.11.20.01.57.20 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 Nov 2013 01:57:21 -0800 (PST) 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 Subject: [PATCH v2] wcn36xx: set self STA default HT parameters Date: Wed, 20 Nov 2013 17:57:01 +0800 Message-Id: <1384941421-8786-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 These default HT parameters are required for self STA entry. In example, set the HT capable of self STA entry for bss configuration in mesh allows the MCS rate to be used. Otherwise, only legacy rate will be used. Signed-off-by: Chun-Yeow Yeoh --- v2: set all the default self STA HT parameters (Eugene Krasnikov) drivers/net/wireless/ath/wcn36xx/smd.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 19f43de..2f58a7d 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -115,6 +115,22 @@ static void wcn36xx_smd_set_sta_ht_params(struct ieee80211_sta *sta, } } +static void wcn36xx_smd_set_sta_default_ht_params( + struct wcn36xx_hal_config_sta_params *sta_params) +{ + sta_params->ht_capable = 1; + sta_params->tx_channel_width_set = 1; + sta_params->lsig_txop_protection = 1; + sta_params->max_ampdu_size = 3; + sta_params->max_ampdu_density = 5; + sta_params->max_amsdu_size = 0; + sta_params->sgi_20Mhz = 1; + sta_params->sgi_40mhz = 1; + sta_params->green_field_capable = 1; + sta_params->delayed_ba_support = 0; + sta_params->dsss_cck_mode_40mhz = 1; +} + static void wcn36xx_smd_set_sta_params(struct wcn36xx *wcn, struct ieee80211_vif *vif, struct ieee80211_sta *sta, @@ -172,6 +188,7 @@ static void wcn36xx_smd_set_sta_params(struct wcn36xx *wcn, sizeof(priv_sta->supported_rates)); } else { wcn36xx_set_default_rates(&sta_params->supported_rates); + wcn36xx_smd_set_sta_default_ht_params(sta_params); } }