From patchwork Mon Sep 15 05:10:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Grumbach X-Patchwork-Id: 4902791 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 84177BEEA5 for ; Mon, 15 Sep 2014 05:11:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A3EEB201DE for ; Mon, 15 Sep 2014 05:11:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0495A201BB for ; Mon, 15 Sep 2014 05:11:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752714AbaIOFLU (ORCPT ); Mon, 15 Sep 2014 01:11:20 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:40405 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752404AbaIOFLR (ORCPT ); Mon, 15 Sep 2014 01:11:17 -0400 Received: by mail-wi0-f179.google.com with SMTP id q5so1358966wiv.6 for ; Sun, 14 Sep 2014 22:11:16 -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=qEvZXJEkKeLod0Rqfv7jNP1joUjIFeGpN3zu1zhulEf0XVjmMDSOVCEPhHKWU3VEcY zl1eSpVql3/+qTi63/1Fyo4QFweAjbg9kUF95zqKtijFvSlGZWHG69DTqky+4tecXsbW Kg1OmpCcPkCyY7t48qb51hKprVXWzHWQEN7rBiXkKrmmAbkgr517SFPkgzaE2it/CxNb vwGZHnFtg7u05le5V5DIyuqJ33D+xuoZHqunH13QGSzQ2+Z+2b5Bn+Nzv1JmGPTQMHR8 HhrxH/AOc+VbyiHQRi6TeMU6wVxnLIwgxqsqKUJc/K2Av9inyIjUKcLwsNhKAhCahOW2 GGVQ== X-Received: by 10.194.58.148 with SMTP id r20mr20721685wjq.66.1410757876721; Sun, 14 Sep 2014 22:11:16 -0700 (PDT) Received: from localhost.localdomain (85-250-104-189.bb.netvision.net.il. [85.250.104.189]) by mx.google.com with ESMTPSA id r19sm10371680wik.0.2014.09.14.22.11.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 14 Sep 2014 22:11:16 -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, 15 Sep 2014 08:10:43 +0300 Message-Id: <1410757848-1827-7-git-send-email-egrumbach@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <5416742C.3070804@gmail.com> References: <5416742C.3070804@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=-7.4 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;