From patchwork Thu Jul 17 14:14:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arik Nemtsov X-Patchwork-Id: 4575751 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BDBE59F26C for ; Thu, 17 Jul 2014 14:14:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 55ACD2018E for ; Thu, 17 Jul 2014 14:14:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 34E2F20120 for ; Thu, 17 Jul 2014 14:14:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933918AbaGQOOf (ORCPT ); Thu, 17 Jul 2014 10:14:35 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:45097 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933851AbaGQOOX (ORCPT ); Thu, 17 Jul 2014 10:14:23 -0400 Received: by mail-wi0-f173.google.com with SMTP id f8so6806748wiw.6 for ; Thu, 17 Jul 2014 07:14:22 -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=U5/Ze08t3CKqQ9aKBS8LVZI0KnA/s4POg60Jtpl3o/s=; b=mYf8fRJjPkZyhSEs+VvydiEwf7nKMDM9tdiWZiUZVwk+08Hl1gx4jpx45+BtNvGAOV RXq6d57MaVrHY5J8ENSU8aIOgEvFC2tVQk6O3oJv3cTNEeqTrJMS0rn0fVgRZ1cZg9HJ 8CRyJBx1637ks4aALjlUBm/Vg4WRv4hLPnH71KTwsny0cVV3oQwgRKWXIuQETZd8VbfJ kjQUhsnjgWz0ntJmDE5T8HgjYKkSCnQe4676PTx4g8bCDBGdqjbYsbOgVPHR+kWIV3dr YTW4XZ7OKNsypoggd3/NFdvVbZDWUDM+ossNnW0HVWMtlnhbS9d6v4q5aaWHsd3d14fd XEMQ== X-Gm-Message-State: ALoCoQnjwugXmwa26RaXqytZynFZtSW9Oeo9VK/v2UlmQj8Enhp+rgOjuEZ+5kdsWXC3jF0xs+Ia X-Received: by 10.194.142.148 with SMTP id rw20mr44407921wjb.69.1405606462360; Thu, 17 Jul 2014 07:14:22 -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.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Jul 2014 07:14:21 -0700 (PDT) From: Arik Nemtsov To: Cc: Johannes Berg , Arik Nemtsov Subject: [PATCH 13/15] cfg80211: fix TDLS setup with VHT peers Date: Thu, 17 Jul 2014 17:14:29 +0300 Message-Id: <1405606471-30128-14-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 Some VHT TDLS peers (Google Nexus 5) include the VHT-AID IE in their TDLS setup request/response. Usermode passes this aid as the station aid, causing it to fail verifiction, since this happens in the "set_station" stage. Make an exception for the TDLS use-case. Signed-off-by: Arik Nemtsov Reviewed-by: Emmanuel Grumbach --- net/wireless/nl80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 082f5c6..df7b133 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -3814,7 +3814,8 @@ int cfg80211_check_station_change(struct wiphy *wiphy, { if (params->listen_interval != -1) return -EINVAL; - if (params->aid) + if (params->aid && + !(params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER))) return -EINVAL; /* When you run into this, adjust the code below for the new flag */