From patchwork Mon Nov 24 14:34:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Grumbach X-Patchwork-Id: 5367361 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 0745CC11AD for ; Mon, 24 Nov 2014 14:39:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2B9AD2041E for ; Mon, 24 Nov 2014 14:38:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6115C203F3 for ; Mon, 24 Nov 2014 14:38:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754298AbaKXOgT (ORCPT ); Mon, 24 Nov 2014 09:36:19 -0500 Received: from mail-wi0-f177.google.com ([209.85.212.177]:49981 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932275AbaKXOgP (ORCPT ); Mon, 24 Nov 2014 09:36:15 -0500 Received: by mail-wi0-f177.google.com with SMTP id l15so6003326wiw.4 for ; Mon, 24 Nov 2014 06:36:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9LVm/isS5Fts/5dH4C49Xh7s8AarFolzgXicVhzDQ4A=; b=OYRQmdE6s4JGFZPpKbfd39P0GxHIjiQ3MjiWv3h1PwOSmbwn+qXFAjzuuLIXKi91WR 8k2EjTedDAqRyJbk9no6OAv9LMg09kVmUH7Akbvi7DL41EiDDicCwoE+5UokNRlQSxVS JEIenX1hg8NGbSROuDVFcZdbMqn18g7GDh3BTJrwPWhNu8caAans50ymbkoLxOfu7gUY xJoxygHqyZqrP/v3Cee1/PzBgKL0APXkKxV3haFtByHuylVVWBc4pmNDj/zTJQCLsy60 um5jwUt55PSpoYecuFsejBrewRdacNsUszXaORTn6FPc7dJtPbyavyNLSYV08OIOs7RG cXcA== X-Received: by 10.195.12.76 with SMTP id eo12mr34772828wjd.22.1416839774698; Mon, 24 Nov 2014 06:36:14 -0800 (PST) Received: from localhost.localdomain (46-116-150-134.bb.netvision.net.il. [46.116.150.134]) by mx.google.com with ESMTPSA id n3sm21274744wjz.21.2014.11.24.06.36.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Nov 2014 06:36:13 -0800 (PST) From: Emmanuel Grumbach To: linux-wireless@vger.kernel.org Cc: Liad Kaufman , Arik Nemtsov , Emmanuel Grumbach Subject: [PATCH 47/75] iwlwifi: mvm: block TID when using TDLS Date: Mon, 24 Nov 2014 16:34:23 +0200 Message-Id: <1416839691-28533-47-git-send-email-egrumbach@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: 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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_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 From: Liad Kaufman Block TID 4 (VI) on a vif when using TDLS. This TID will be used by FW for TDLS channel-switch requests and PTI requests. Signed-off-by: Liad Kaufman Signed-off-by: Arik Nemtsov Reviewed-by: Johannes Berg Signed-off-by: Emmanuel Grumbach --- drivers/net/wireless/iwlwifi/mvm/mac80211.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index 64e89e8..5aedf9d 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c @@ -2186,6 +2186,15 @@ static int iwl_mvm_mac_sta_state(struct ieee80211_hw *hw, out_unlock: mutex_unlock(&mvm->mutex); + if (sta->tdls && ret == 0) { + if (old_state == IEEE80211_STA_NOTEXIST && + new_state == IEEE80211_STA_NONE) + ieee80211_reserve_tid(sta, IWL_MVM_TDLS_FW_TID); + else if (old_state == IEEE80211_STA_NONE && + new_state == IEEE80211_STA_NOTEXIST) + ieee80211_unreserve_tid(sta, IWL_MVM_TDLS_FW_TID); + } + return ret; }