From patchwork Tue Oct 27 07:38:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz.Dziedzic@tieto.com X-Patchwork-Id: 7494351 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 02DFABEEA4 for ; Tue, 27 Oct 2015 07:38:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 20D752083F for ; Tue, 27 Oct 2015 07:38:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 320712082F for ; Tue, 27 Oct 2015 07:38:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752261AbbJ0Hir (ORCPT ); Tue, 27 Oct 2015 03:38:47 -0400 Received: from mail-lb0-f175.google.com ([209.85.217.175]:33298 "EHLO mail-lb0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751005AbbJ0Hiq (ORCPT ); Tue, 27 Oct 2015 03:38:46 -0400 Received: by lbbec13 with SMTP id ec13so54971112lbb.0 for ; Tue, 27 Oct 2015 00:38:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id; bh=tfe/IznQ0t+FLkUmFLCOtbO3xv/yYPfZMz/Di9MFeP8=; b=YJMtoosAyYR4nFXe65gLnVumgtJxIycuKibAHroQlJlATsyMeqgzeMTOuccylNu9Z/ l+P3Q+6/qDjOLRRLndZDDtgyh4x3pA0BWcVtw8i5+EokQnqHQZYcAjtoDCPRF8dhTkXR 34frcowua+05M/hgslitqISkFEUkMiHFcrMmU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=tfe/IznQ0t+FLkUmFLCOtbO3xv/yYPfZMz/Di9MFeP8=; b=mTR+bYU6+RFOrdAgE9P5f3+rqhlngcpKqZmRPG/Zu+o7fM9aoeOHiRoLvyb2Gp1CBv dW8LIzZ/lFKnBTdGPT1gWC+ugrS3QWtbBjpylw5qoZ2l/cM5cuAdWMjL7fbe1HZjo+G4 ECzxikKd1xwcw1BkljIOOEGjH82GJhVOm88uiB+naANJNoP8LxM81Zt3NsIcVwevVk3c skLvRkC7I7DxbMZQw3PLjAMQ08AM1EHrqzBJUSYDhqNgVFBaVe9p1zKH3u4dXcKoE34G EYiRxE2Aiwp+QUcLORyHcBGn31u7KOvhKKdFBGC9oyVzCmvRovANm1o1f8vPGptJk7dp MXcA== X-Gm-Message-State: ALoCoQlZoxIpIjAn/sdV1y6sVnm0dcSfRW8DDXEgzZzTlksqoOZm/z+nCWB7xQQeUz73LWWwPVrqgkZ0IRvHOe9mjfhGsrpyh5/KsmICi9yLPuGIW5sho1iOQa62fpEu74Y0NJxWJit4QFd97GcauZ53rHg+cj0DMw1/DTSy8sa4M/bbB/E3WSuZhvoDDWSVMT5OvF0d5+eX X-Received: by 10.112.189.193 with SMTP id gk1mr9725161lbc.98.1445931525405; Tue, 27 Oct 2015 00:38:45 -0700 (PDT) Received: from localhost.localdomain ([91.198.246.8]) by smtp.gmail.com with ESMTPSA id ar7sm6631979lbc.24.2015.10.27.00.38.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Oct 2015 00:38:44 -0700 (PDT) From: Janusz Dziedzic To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, Janusz Dziedzic Subject: [PATCH] mac80211: add new IEEE80211_VIF_GET_NOA_UPDATE flag Date: Tue, 27 Oct 2015 08:38:40 +0100 Message-Id: <1445931520-14509-1-git-send-email-janusz.dziedzic@tieto.com> X-Mailer: git-send-email 1.9.1 X-DomainID: tieto.com 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,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 Add new VIF flag, that will allow get NOA update notification when driver will request this, even this is not pure P2P vif (eg. STA vif). Signed-off-by: Janusz Dziedzic --- include/net/mac80211.h | 4 ++++ net/mac80211/mlme.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 4ec6fed..1173c63 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -1325,11 +1325,15 @@ struct ieee80211_channel_switch { * interface. This flag should be set during interface addition, * but may be set/cleared as late as authentication to an AP. It is * only valid for managed/station mode interfaces. + * @IEEE80211_VIF_GET_NOA_UPDATE: request to handle NOA attributes + * and send P2P_PS notification to the driver if NOA changed, even + * this is not pure P2P vif. */ enum ieee80211_vif_flags { IEEE80211_VIF_BEACON_FILTER = BIT(0), IEEE80211_VIF_SUPPORTS_CQM_RSSI = BIT(1), IEEE80211_VIF_SUPPORTS_UAPSD = BIT(2), + IEEE80211_VIF_GET_NOA_UPDATE = BIT(3), }; /** diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 56ef9a8..5bafd1e 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1941,7 +1941,8 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata, sdata->u.mgd.flags |= IEEE80211_STA_RESET_SIGNAL_AVE; - if (sdata->vif.p2p) { + if (sdata->vif.p2p || + sdata->vif.driver_flags & IEEE80211_VIF_GET_NOA_UPDATE) { const struct cfg80211_bss_ies *ies; rcu_read_lock(); @@ -3461,7 +3462,8 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, } } - if (sdata->vif.p2p) { + if (sdata->vif.p2p || + sdata->vif.driver_flags & IEEE80211_VIF_GET_NOA_UPDATE) { struct ieee80211_p2p_noa_attr noa = {}; int ret;