From patchwork Thu Jul 17 14:14:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arik Nemtsov X-Patchwork-Id: 4575781 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A3283C0515 for ; Thu, 17 Jul 2014 14:15:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D239120120 for ; Thu, 17 Jul 2014 14:14:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 561D3201BA for ; Thu, 17 Jul 2014 14:14:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933804AbaGQOOe (ORCPT ); Thu, 17 Jul 2014 10:14:34 -0400 Received: from mail-we0-f170.google.com ([74.125.82.170]:64397 "EHLO mail-we0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933849AbaGQOOW (ORCPT ); Thu, 17 Jul 2014 10:14:22 -0400 Received: by mail-we0-f170.google.com with SMTP id w62so3136676wes.1 for ; Thu, 17 Jul 2014 07:14:21 -0700 (PDT) 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:in-reply-to :references; bh=uA1tmxr0lYOqQ9xYu/4LXo/lJnCNJXuWp5ykbRMc8BA=; b=Mvngtsq/e6GS1sETxVuQz8lupgjMJxZTmlRfjNUKhKzfHcqY3iiEJrHJ2dJvnHVjKF iEj/hOMb4uVHvn/CVX0HATv2NvwH4CC3rFpkuTP6X960SkKeCJj7wV+FTv3zciC6GNpf wxGST0vAHCdX5MHflewyBhHzocgLuj4jxUuIvBOztgZM13SREGkqgPsZJtxYXlqds2i6 IpI9CG9J8OqyKhmI1vW8gRVeweGxX9BIgQZ52GBoETAsUSays8TWF21xnws2kBQESNr7 5D/jJL5uuZlqXARZZV2/eShRK3Y2rs6oIS0idprr25wJSzxVCE1SP14qrQ+8trzj+r4r +9pg== X-Gm-Message-State: ALoCoQmN9Mahw8Zw13ZN3GthtP+HUoVwQ1HbeV/RzL2xUkkiwSLQp/XDu8ldkr5RcmfIZ4J4OvyX X-Received: by 10.194.90.201 with SMTP id by9mr37220793wjb.94.1405606460955; Thu, 17 Jul 2014 07:14:20 -0700 (PDT) Received: from athena.amr.corp.intel.com (46-116-100-31.bb.netvision.net.il. [46.116.100.31]) by mx.google.com with ESMTPSA id ft6sm17691865wic.0.2014.07.17.07.14.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Jul 2014 07:14:20 -0700 (PDT) From: Arik Nemtsov To: Cc: Johannes Berg , Arik Nemtsov Subject: [PATCH 12/15] mac80211: disable VHT for TDLS Date: Thu, 17 Jul 2014 17:14:28 +0300 Message-Id: <1405606471-30128-13-git-send-email-arik@wizery.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1405606471-30128-1-git-send-email-arik@wizery.com> References: <1405606471-30128-1-git-send-email-arik@wizery.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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 TDLS VHT support requires some more information elements during setup. While these are not there, mask out the peer's VHT capabilities so that VHT rates are not mistakenly used. Signed-off-by: Arik Nemtsov Reviewed-by: Emmanuel Grumbach --- net/mac80211/vht.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/mac80211/vht.c b/net/mac80211/vht.c index 9265adf..671ce0d 100644 --- a/net/mac80211/vht.c +++ b/net/mac80211/vht.c @@ -129,6 +129,10 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(struct ieee80211_sub_if_data *sdata, if (!vht_cap_ie || !sband->vht_cap.vht_supported) return; + /* don't support VHT for TDLS peers for now */ + if (test_sta_flag(sta, WLAN_STA_TDLS_PEER)) + return; + /* * A VHT STA must support 40 MHz, but if we verify that here * then we break a few things - some APs (e.g. Netgear R6300v2