From patchwork Mon Sep 8 16:56:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Grumbach X-Patchwork-Id: 4863851 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 272219F32F for ; Mon, 8 Sep 2014 16:56:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4A9AD2015D for ; Mon, 8 Sep 2014 16:56:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 689CE20149 for ; Mon, 8 Sep 2014 16:56:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754665AbaIHQ4h (ORCPT ); Mon, 8 Sep 2014 12:56:37 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:61604 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753907AbaIHQ4g (ORCPT ); Mon, 8 Sep 2014 12:56:36 -0400 Received: by mail-wi0-f170.google.com with SMTP id cc10so2993351wib.5 for ; Mon, 08 Sep 2014 09:56:34 -0700 (PDT) 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=le8PTeyBnq1kjFMbzqt/9iLrPNN75JeN/a9y3wjHaG4=; b=VtAWZa/suGxFm7rjx0/GXhnK/Yak/Oy7oTfSXdMD1V0nibqSv4LfvQhIzgXCMuSp5w ok6xreg3wlBUsrQNiu309vk1JiTIXVwh/g1iEYiqjZ0k/a71yRVNLBE5uX58DMHVHqT1 Pu/wW2RN7BvOmbtSASCT6kfq3Ne8BbmDDtUjA3CDH8gDyzup9QxkUgutXwu6MdzIyTMt hMaZNDwNVb4OG+1W/mP7npo0M20g/2CljKKN2RRyKz9sU/RSQ78n4eSF4WXjegzuE4BQ arxTDGyjculSY8/9axTYDQ1jK6cpXUe9UMk+YdJwJQ5r9Thwe+av9mxUDnqem52JR05m vTYQ== X-Received: by 10.195.12.4 with SMTP id em4mr5886236wjd.98.1410195394775; Mon, 08 Sep 2014 09:56:34 -0700 (PDT) Received: from localhost.localdomain (93-172-69-109.bb.netvision.net.il. [93.172.69.109]) by mx.google.com with ESMTPSA id o10sm11847695wia.0.2014.09.08.09.56.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Sep 2014 09:56:34 -0700 (PDT) From: Emmanuel Grumbach To: linux-wireless@vger.kernel.org Cc: Eyal Shapira , , Eyal Shapira , Emmanuel Grumbach Subject: [PATCH 07/12] iwlwifi: mvm: treat EAPOLs like mgmt frames wrt rate Date: Mon, 8 Sep 2014 19:56:12 +0300 Message-Id: <1410195377-10075-7-git-send-email-egrumbach@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <540DDF37.5030801@gmail.com> References: <540DDF37.5030801@gmail.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=-9.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 From: Eyal Shapira Using the LQ table which is initially set according to the rssi could lead to EAPOLs being sent in high legacy rates like 54mbps. It's better to avoid sending EAPOLs in high rates as it reduces the chances of a successful 4-Way handshake. Avoid this and treat them like other mgmt frames which would initially get sent at the basic rate. Cc: [3.13+] Signed-off-by: Eyal Shapira Reviewed-by: Johannes Berg Signed-off-by: Emmanuel Grumbach --- drivers/net/wireless/iwlwifi/mvm/tx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c index dbc8707..9ee410b 100644 --- a/drivers/net/wireless/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/iwlwifi/mvm/tx.c @@ -168,10 +168,14 @@ static void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm, /* * for data packets, rate info comes from the table inside the fw. This - * table is controlled by LINK_QUALITY commands + * table is controlled by LINK_QUALITY commands. Exclude ctrl port + * frames like EAPOLs which should be treated as mgmt frames. This + * avoids them being sent initially in high rates which increases the + * chances for completion of the 4-Way handshake. */ - if (ieee80211_is_data(fc) && sta) { + if (ieee80211_is_data(fc) && sta && + !(info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO)) { tx_cmd->initial_rate_index = 0; tx_cmd->tx_flags |= cpu_to_le32(TX_CMD_FLG_STA_RATE); return;