Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp257187imm; Sat, 1 Sep 2018 01:40:58 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY1QucBOH5XaX4HGS494GgyGHv2rxbwS7aR+y7NVjD3q2nZQ+EZakP9Gj46FGzdNCbQov8w X-Received: by 2002:a17:902:1101:: with SMTP id d1-v6mr19356021pla.131.1535791258009; Sat, 01 Sep 2018 01:40:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535791257; cv=none; d=google.com; s=arc-20160816; b=pHQrxvvpR9MrYhPNZy36HnZw+wkbChCWXNq5k3Z5xB9RmJhh/6kC/GeDZJAR7dDMfS 1zzde93IDtX9aKMd3ve1n9RFWSpONFI0aMNpERIRrGc+xm3gkwJMEp35Z1HyvT7LRJYD CIMteuSQrBEQxSgLE0dU/KuKvuuz3vgE63aCkapS6Mx//WmneCL7xQFAGJJvbdi/U8Ap xaoSRrt/iH5Tcs4UFwhWRq5QKNJzXo4qpBlh56bkwzamAIkfzUripghRQrsFQ7EO2mzc 1UflWhoZiGpaZoVpzSk/PDutQauCYWtWCerswSS+uTp7hr/jQz3jACloIy2X5YwoaMuO R+3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=O7Tjqcj/rIwztbOo0PVgR+qbyuzZ9PZ2BchzrTsHhb8=; b=xIjnbmbUHi1sbgtt+xRz/O1+9h2mogmppgMFoNDScYuX7CgLb/1rJCCDSMkXRdX5VW 7/NW6v1w98tL/nuiaFpA6Zfwzlg7ikw/XCT7CxetRZaAZwg1ZE004tA4E42Q9wPA+M5y 8Dzqeljn45clxs73AdzmY6XXrdCXjpHggfFjMSyDLpdkuVXQHgtra+aY8gc7neho1gL/ 82ipFMfKRXda3Jfenjpuy7hju+OAFWK0qLaTpvdOZc17Le0tGY1vPUf6Oh/KjsxvS5xS N5mK7W90uhRN+elqp6o36W3NAz3K+oOmy2FvySqpO4jN3UECrdCm+lE09i2WYPiQWLAe polg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TzxaVSwx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u134-v6si13317829pfc.244.2018.09.01.01.40.31; Sat, 01 Sep 2018 01:40:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TzxaVSwx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727357AbeIAMt4 (ORCPT + 99 others); Sat, 1 Sep 2018 08:49:56 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:36741 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725973AbeIAMt4 (ORCPT ); Sat, 1 Sep 2018 08:49:56 -0400 Received: by mail-lj1-f193.google.com with SMTP id v26-v6so11790297ljj.3; Sat, 01 Sep 2018 01:38:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=O7Tjqcj/rIwztbOo0PVgR+qbyuzZ9PZ2BchzrTsHhb8=; b=TzxaVSwxixugQYPNA2TIHNCR9bMD9fMlRiKHJmSzxrSNOeFR+vvB4wH5WcAcRHzWm/ JRIj6HdqWKkJHY2vaqvDGRLUGGY1rZUk1QTJg1c+NUKUj0oLbsz7Blq7ZlqyH32sMyEb VGszl7u/dJUFflancHkXYZ/PY8nH/+edIMkE2/E9xqKSnIgz/GB/oKINndEC2G05ljvR l75JZPdoyt5n75r98mjOpFaoxxnupau07c4hAX404Vrut1ZB8TSccwYI1RJxR2dSdtlt slMWPigJP6tY8ukELYMuvP92ts3LN4mMS88aEebERpuYFYQ3t2wn+ReS94XXQG2Gk+UC h+dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=O7Tjqcj/rIwztbOo0PVgR+qbyuzZ9PZ2BchzrTsHhb8=; b=asj/tIiS/GdC7tyu1+FWi9BH8iArah2J5HJXRf+kvOY7gAaBeHW40uOk9/ffHsVjcO Udqs9svvlGp5inCQb+jEvRbVCBAMcw9SWmGuPGs98nMpJ/ZE89nhSP58EBY53QvfB8Pk VpVj7+i05Xsg9BU+XZ3LBXmNVE4B0ImyZC871ORSxafDv1MAOfFyo6hPLQUraHD2eA9T /GGPp+1CxYx/7JUYEpYXj65EKBShrkXTx5AJ19yRBVjG9jmJVV76NBuLQx3ZRA79KF3y c86vWZKDPxj20AXjJQZvNbU8cfjfp8xWK98PeYI8QckRq4eX5sGrguXHr1mZUsMzudzc +mKA== X-Gm-Message-State: APzg51DCHeRgUv/D0OtgqMO4gMFlAUYkG/+ipYq7iHjNcnu5PTu7zU1F 9GZBoGIwjbHGvwedfGjUC9S0eHFon1M= X-Received: by 2002:a2e:350b:: with SMTP id z11-v6mr13021545ljz.55.1535791119984; Sat, 01 Sep 2018 01:38:39 -0700 (PDT) Received: from kristrev-ThinkPad-X1-Carbon-2nd.lan (155.51-175-192.customer.lyse.net. [51.175.192.155]) by smtp.gmail.com with ESMTPSA id n17-v6sm2152162ljb.82.2018.09.01.01.38.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Sep 2018 01:38:39 -0700 (PDT) From: Kristian Evensen To: linux-wireless@vger.kernel.org, kvalo@codeaurora.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Kristian Evensen Subject: [PATCH v2] mt76: Enable NL80211_EXT_FEATURE_CQM_RSSI_LIST Date: Sat, 1 Sep 2018 10:38:34 +0200 Message-Id: <20180901083834.11201-1-kristian.evensen@gmail.com> X-Mailer: git-send-email 2.14.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Enable the use of CQM_RSSI_LIST with mt76-devices. The change has been tested with the mt7602, mt7603 and mt7621 PCI wifi-cards. I passed a list of RSSI thresholds to the driver, and when disconnecting/connecting the antenna(s) I got an event each time the RSSI went above/below a threshold. While I have not been able to test the change with any of the mt76 USB-devices (no access to a device), the RX RSSI management code is shared between the two device types. Thus, CQM should also work with the mt76 USB-devices. v1->v2: * Updated commit message. Thanks Kalle Valo, Arend van Spriel, Lorenzo Bianconi and Andrew Zaborowski. Signed-off-by: Kristian Evensen --- drivers/net/wireless/mediatek/mt76/mac80211.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c index 029d54bce9e8..3eb328ff8c0d 100644 --- a/drivers/net/wireless/mediatek/mt76/mac80211.c +++ b/drivers/net/wireless/mediatek/mt76/mac80211.c @@ -305,6 +305,8 @@ int mt76_register_device(struct mt76_dev *dev, bool vht, wiphy->features |= NL80211_FEATURE_ACTIVE_MONITOR; + wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); + wiphy->available_antennas_tx = dev->antenna_mask; wiphy->available_antennas_rx = dev->antenna_mask; -- 2.14.1