From patchwork Tue Oct 31 00:29:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 10033495 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DDFB060291 for ; Tue, 31 Oct 2017 00:29:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C4D5F287F5 for ; Tue, 31 Oct 2017 00:29:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7B332886A; Tue, 31 Oct 2017 00:29:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D0B8287F5 for ; Tue, 31 Oct 2017 00:29:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753341AbdJaA3K (ORCPT ); Mon, 30 Oct 2017 20:29:10 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:41645 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752126AbdJaA3J (ORCPT ); Mon, 30 Oct 2017 20:29:09 -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=1509409750; x=1540945750; h=from:to:cc:subject:date:message-id:mime-version; bh=TMP6aUYfNDMHnAIDhXlr41sVuigZai70CavrYbZkr5c=; b=PuPgY5Fn7C0DcTrDIip25aTcsUpxQSS/5S6TEfGfNwvM/l79jwGUb29S Fqe//LQXAsIyN1aysygw99sGWgeBcQDHTI7HiaFrDLopeeCvOxMkd9soc bz6QvGV2Olax3xh8zhbFcM0FAN2S60MRS/Cq+hnIqm432AhDwoO1HREL5 Y=; Received: from ironmsg08-lv.qualcomm.com ([10.47.202.152]) by alexa-out.qualcomm.com with ESMTP; 30 Oct 2017 17:29:09 -0700 X-IronPort-AV: E=McAfee;i="5900,7806,8700"; a="16347781" X-MGA-submission: =?us-ascii?q?MDHO8kpkcdYWdcQRTEifUWcPVvRAaictvu23IP?= =?us-ascii?q?OENtMa4Ohc5x3Uy0/CJMz6Fvus8g8d3COkOyUlO8WxXlcbtTOCR8oWuC?= =?us-ascii?q?PSRlRqxWgcrrFhbMNMLFKPKY7BK0iagQqGreijom/GVLCiGrkJkNLqaQ?= =?us-ascii?q?ds?= Received: from nalasexr01h.na.qualcomm.com ([10.49.56.54]) by ironmsg08-lv.qualcomm.com with ESMTP/TLS/AES256-SHA; 30 Oct 2017 17:29:09 -0700 Received: from qcmail1.qualcomm.com (10.80.80.8) by NALASEXR01H.na.qualcomm.com (10.49.56.54) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Mon, 30 Oct 2017 17:29:08 -0700 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Mon, 30 Oct 2017 17:29:07 -0700 From: Rajkumar Manoharan To: CC: , , Rajkumar Manoharan Subject: [PATCH] mac80211: Update last_ack status for all except probing frames Date: Mon, 30 Oct 2017 17:29:06 -0700 Message-ID: <1509409746-26592-1-git-send-email-rmanohar@qti.qualcomm.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01B.na.qualcomm.com (10.85.0.82) To NALASEXR01H.na.qualcomm.com (10.49.56.54) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Update last_ack status for all except station probing frames (i.e null data). Otherwise the station inactivity duration is cleared whenever AP is checking presence of idle stations by sending null data frame for every inactive threshold (ap_max_inactivity). Though the station is idle for longer period, the inactive time in station dump is restricted ap_max_inactivity threshold. Signed-off-by: Rajkumar Manoharan --- net/mac80211/status.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/net/mac80211/status.c b/net/mac80211/status.c index da7427a41529..24ce416f74cd 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -185,10 +185,21 @@ static void ieee80211_check_pending_bar(struct sta_info *sta, u8 *addr, u8 tid) static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb) { struct ieee80211_mgmt *mgmt = (void *) skb->data; + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_local *local = sta->local; struct ieee80211_sub_if_data *sdata = sta->sdata; - if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) + /* Update last_ack status for all except station probing frames + * (i.e null data). Otherwise the station inactivity duration is cleared + * whenever AP is checking presence of idle stations by sending + * null data frame for every inactive threshold (ap_max_inactivity). + * Though the station is idle for longer period, the inactive time in + * station dump is restricted ap_max_inactivity threshold. + */ + if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS) && + !((info->flags & IEEE80211_TX_INTFL_NL80211_FRAME_TX) && + (ieee80211_is_nullfunc(mgmt->frame_control) || + ieee80211_is_qos_nullfunc(mgmt->frame_control)))) sta->status_stats.last_ack = jiffies; if (ieee80211_is_data_qos(mgmt->frame_control)) {