From patchwork Thu May 28 06:25:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 6496271 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 A092DC0020 for ; Thu, 28 May 2015 06:26:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A5C5206B5 for ; Thu, 28 May 2015 06:26:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AB42C206FF for ; Thu, 28 May 2015 06:26:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752605AbbE1G0p (ORCPT ); Thu, 28 May 2015 02:26:45 -0400 Received: from sabertooth01.qualcomm.com ([65.197.215.72]:26111 "EHLO sabertooth01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752555AbbE1G0h (ORCPT ); Thu, 28 May 2015 02:26:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1432794397; x=1464330397; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=5q+0o+Ah25Jlug29HDlWgRnqLgbiarrHSR6DAsi82lI=; b=W2ywjVzsPMISEe6UNY1zb3bd+jVOiP1yscAF5rCpEkUpHLGug1cpmyEi dHeXAkbWQhtw/qbVkR+CQ603Hy5QhzwNPIOZKyMH0hyw9nGzhlT3ukpYF wcS70aU+HR//MREnu9cOn/PXwqcaYO84hYtUDuH6KYol+PVyw1v1XkQsF U=; X-IronPort-AV: E=McAfee;i="5700,7163,7814"; a="89906308" Received: from ironmsg03-r.qualcomm.com ([172.30.46.17]) by sabertooth01.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 May 2015 23:26:36 -0700 X-IronPort-AV: E=Sophos;i="5.13,511,1427785200"; d="scan'208";a="927770998" Received: from nasanexm01h.na.qualcomm.com ([10.85.0.34]) by Ironmsg03-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 27 May 2015 23:26:36 -0700 Received: from aphydexm01b.ap.qualcomm.com (10.252.127.11) by NASANEXM01H.na.qualcomm.com (10.85.0.34) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Wed, 27 May 2015 23:26:35 -0700 Received: from qcmail1.qualcomm.com (10.80.80.8) by aphydexm01b.ap.qualcomm.com (10.252.127.11) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Thu, 28 May 2015 11:56:27 +0530 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Thu, 28 May 2015 11:56:19 +0530 From: Rajkumar Manoharan To: CC: , Rajkumar Manoharan Subject: [PATCH v2 2/2] mac80211: store low ack threshold in bss config Date: Thu, 28 May 2015 11:55:55 +0530 Message-ID: <1432794355-3639-2-git-send-email-rmanohar@qti.qualcomm.com> X-Mailer: git-send-email 2.4.1 In-Reply-To: <1432794355-3639-1-git-send-email-rmanohar@qti.qualcomm.com> References: <1432794355-3639-1-git-send-email-rmanohar@qti.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01C.na.qualcomm.com (10.85.0.83) To aphydexm01b.ap.qualcomm.com (10.252.127.11) 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_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable 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 Store the low ack threshold configured by user in BSS config. This will be used by driver for triggering low ack event whenever the station is not ACKing the number of frames mentioned in threshold. Signed-off-by: Rajkumar Manoharan --- net/mac80211/cfg.c | 1 + net/mac80211/sta_info.h | 3 +++ net/mac80211/status.c | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index ff347a0..be0e310 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1145,6 +1145,7 @@ static int sta_apply_parameters(struct ieee80211_local *local, params->opmode_notif, band, false); } + sta->low_ack_threshold = params->low_ack_threshold; if (ieee80211_vif_is_mesh(&sdata->vif)) { #ifdef CONFIG_MAC80211_MESH diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index 5c164fb..ab6af72 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h @@ -338,6 +338,8 @@ struct sta_ampdu_mlme { * using IEEE80211_NUM_TID entry for non-QoS frames * @rx_msdu: MSDUs received from this station, using IEEE80211_NUM_TID * entry for non-QoS frames + * @low_ack_threshold: Number of consecutive packet loss to trigger low ack + * event by driver. */ struct sta_info { /* General information, mostly static */ @@ -459,6 +461,7 @@ struct sta_info { unsigned long last_tdls_pkt_time; u8 reserved_tid; + u16 low_ack_threshold; /* keep last! */ struct ieee80211_sta sta; diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 005fdbe..f78f8f1 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -520,7 +520,6 @@ static void ieee80211_report_used_skb(struct ieee80211_local *local, * - on # of retransmissions * - current throughput (higher value for higher tpt)? */ -#define STA_LOST_PKT_THRESHOLD 50 #define STA_LOST_TDLS_PKT_THRESHOLD 10 #define STA_LOST_TDLS_PKT_TIME (10*HZ) /* 10secs since last ACK */ @@ -533,7 +532,8 @@ static void ieee80211_lost_packet(struct sta_info *sta, return; sta->lost_packets++; - if (!sta->sta.tdls && sta->lost_packets < STA_LOST_PKT_THRESHOLD) + if (!sta->sta.tdls && + sta->lost_packets < sta->low_ack_threshold) return; /*