From patchwork Thu May 14 10:47:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 6404431 X-Patchwork-Delegate: johannes@sipsolutions.net 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 3856B9F374 for ; Thu, 14 May 2015 10:49:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5BBB920451 for ; Thu, 14 May 2015 10:49:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2E6B8203AE for ; Thu, 14 May 2015 10:49:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932858AbbENKtE (ORCPT ); Thu, 14 May 2015 06:49:04 -0400 Received: from sabertooth02.qualcomm.com ([65.197.215.38]:56123 "EHLO sabertooth02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932746AbbENKtD (ORCPT ); Thu, 14 May 2015 06:49:03 -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=1431600543; x=1463136543; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=1W5wb1Nx08WaEZr373zTQj7fpuhk4FqT6aM5/EtrS/Q=; b=bOqAqla5chNdePxhkxbdeJZL1MMRRGBlcVtZOOVdVdies8XivsheOPoZ opMV2egyCwVQH/2l+w17RucpkgTwsw1y7vwNE4fOvdNoXfsBEAZpYtL9Y bi8awNW26IqzQbyX4ryjWe7CBoZI0LrX6IVEsXhh1Zfm1HVqW5DcsbCEb k=; X-IronPort-AV: E=McAfee;i="5700,7163,7800"; a="89962702" Received: from ironmsg03-l.qualcomm.com ([172.30.48.18]) by sabertooth02.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 May 2015 03:48:48 -0700 X-IronPort-AV: E=Sophos;i="5.13,427,1427785200"; d="scan'208";a="910362143" Received: from nasanexm01b.na.qualcomm.com ([10.85.0.82]) by Ironmsg03-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 14 May 2015 03:48:14 -0700 Received: from aphydexm01b.ap.qualcomm.com (10.252.127.11) by NASANEXM01B.na.qualcomm.com (10.85.0.82) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Thu, 14 May 2015 03:48:13 -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, 14 May 2015 16:18:04 +0530 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Thu, 14 May 2015 16:17:57 +0530 From: Rajkumar Manoharan To: CC: , Rajkumar Manoharan Subject: [PATCH 2/2] mac80211: store low ack threshold in bss config Date: Thu, 14 May 2015 16:17:36 +0530 Message-ID: <1431600456-10697-2-git-send-email-rmanohar@qti.qualcomm.com> X-Mailer: git-send-email 2.4.0 In-Reply-To: <1431600456-10697-1-git-send-email-rmanohar@qti.qualcomm.com> References: <1431600456-10697-1-git-send-email-rmanohar@qti.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01E.na.qualcomm.com (10.85.0.31) 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 --- include/net/mac80211.h | 3 +++ net/mac80211/cfg.c | 1 + net/mac80211/status.c | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 8e3668b..76cb0e4 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -488,6 +488,8 @@ struct ieee80211_event { * userspace), whereas TPC is disabled if %txpower_type is set to * NL80211_TX_POWER_FIXED (use value configured from userspace) * @p2p_noa_attr: P2P NoA attribute for P2P powersave + * @low_ack_threshold: Number of consecutive packet loss to trigger low ack + * event by driver. */ struct ieee80211_bss_conf { const u8 *bssid; @@ -524,6 +526,7 @@ struct ieee80211_bss_conf { int txpower; enum nl80211_tx_power_setting txpower_type; struct ieee80211_p2p_noa_attr p2p_noa_attr; + u16 low_ack_threshold; }; /** diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 265e427..b207e46 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -773,6 +773,7 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, sdata->vif.bss_conf.beacon_int = params->beacon_interval; sdata->vif.bss_conf.dtim_period = params->dtim_period; sdata->vif.bss_conf.enable_beacon = true; + sdata->vif.bss_conf.low_ack_threshold = params->low_ack_threshold; sdata->vif.bss_conf.ssid_len = params->ssid_len; if (params->ssid_len) diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 005fdbe..2a8cdac 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->sdata->vif.bss_conf.low_ack_threshold) return; /*