From patchwork Tue Jun 2 18:27:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krishna Chaitanya X-Patchwork-Id: 6530591 X-Patchwork-Delegate: johannes@sipsolutions.net 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DA1B9C0020 for ; Tue, 2 Jun 2015 18:28:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 16BD92053C for ; Tue, 2 Jun 2015 18:28:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EC01F20531 for ; Tue, 2 Jun 2015 18:28:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753574AbbFBS2O (ORCPT ); Tue, 2 Jun 2015 14:28:14 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:36861 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754236AbbFBS2L (ORCPT ); Tue, 2 Jun 2015 14:28:11 -0400 Received: by pabqy3 with SMTP id qy3so17791281pab.3 for ; Tue, 02 Jun 2015 11:28:11 -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=Q2m41sRLLZ5yO6+tivg2shrGAMJ+OuxcDhxJXtL6Wgo=; b=EX7OeISdVx9UehFrL+25KHsVzX9ftmMnTutwu5TG1NUt5A//I8gRKuBgVTrGmplUfT bGDGRutyKqNkbR/KOXruQe+uUnPDL5cZAWFkkDaWz3vI+dd0U/AImOqdGJqjyqFhEF7+ azt+7UYyAChEJJuy5lAFSvjDiGEmd4IaJw/tGKnkiZEaoA6u0tEt9cySdt5v/m2naJjY LAlfHjMUSzXwFw3XRekPRBCUR8J1oAD1sXBuezYYpS+wMoqjH83yVuj/AHqyqML1vf4W C66XWS95hcutnoHf1nbhQvCITJsRbiKdZCSdwo3dTr2hHMyyc/eA714PmWzmZMYB4fTn l2eA== X-Received: by 10.70.37.167 with SMTP id z7mr52552094pdj.55.1433269691417; Tue, 02 Jun 2015 11:28:11 -0700 (PDT) Received: from localhost.localdomain ([183.82.211.120]) by mx.google.com with ESMTPSA id bi4sm18207021pbc.56.2015.06.02.11.28.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Jun 2015 11:28:10 -0700 (PDT) From: Chaitanya T K To: Felix Fietkau , johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Chaitanya Tata Subject: [PATCH] mac80211: Minstrel HT: Handle all SMPS states of the peer STA. Date: Tue, 2 Jun 2015 23:57:47 +0530 Message-Id: <1433269667-9588-1-git-send-email-chaitanya.mgit@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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: Chaitanya Tata In case of Dynamic SMPS enable RTS/CTS for all rates. In case of Static SMPS mark the Nss > 1 rates as not supported. --- net/mac80211/rc80211_minstrel_ht.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 7430a1d..fdc08d0 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -1176,9 +1176,16 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband, nss = minstrel_mcs_groups[i].streams; - /* Mark MCS > 7 as unsupported if STA is in static SMPS mode */ - if (sta->smps_mode == IEEE80211_SMPS_STATIC && nss > 1) - continue; + /* Handle STA's SMPS State, if Nss > 1. + * a. Use RTS_CTS, if STA is in Dynamic SMPS Mode + * b. Mark Nss > 1 as unsupported, if STA is in static SMPS mode + */ + if (nss > 1) { + if (sta->smps_mode == IEEE80211_SMPS_DYNAMIC) + gflags |= IEEE80211_TX_RC_USE_RTS_CTS; + else if (sta->smps_mode == IEEE80211_SMPS_STATIC) + continue; + } /* HT rate */ if (gflags & IEEE80211_TX_RC_MCS) {