From patchwork Mon Feb 23 22:43:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jouni Malinen X-Patchwork-Id: 5868311 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0BFD0BF440 for ; Mon, 23 Feb 2015 22:43:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 372722062F for ; Mon, 23 Feb 2015 22:43:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1414920614 for ; Mon, 23 Feb 2015 22:43:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752330AbbBWWnJ (ORCPT ); Mon, 23 Feb 2015 17:43:09 -0500 Received: from mail.w1.fi ([212.71.239.96]:57461 "EHLO li674-96.members.linode.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751959AbbBWWnI (ORCPT ); Mon, 23 Feb 2015 17:43:08 -0500 Received: from jm (178-55-39-111.bb.dnainternet.fi [178.55.39.111]) by li674-96.members.linode.com (Postfix) with ESMTPSA id AB19C11174; Mon, 23 Feb 2015 22:43:05 +0000 (UTC) Received: by jm (sSMTP sendmail emulation); Tue, 24 Feb 2015 00:43:05 +0200 Date: Tue, 24 Feb 2015 00:43:05 +0200 From: Jouni Malinen To: Adrian Chadd Cc: Linus Torvalds , "Luis R. Rodriguez" , Kalle Valo , QCA ath9k Development , "ath9k-devel@lists.ath9k.org" , Linux Wireless List Subject: Re: AR9462 problems connecting again.. Message-ID: <20150223224305.GA30228@w1.fi> References: <20150223171700.GA29730@w1.fi> <20150223213050.GA23232@w1.fi> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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, 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 On Mon, Feb 23, 2015 at 02:22:32PM -0800, Adrian Chadd wrote: > On 23 February 2015 at 13:53, Linus Torvalds > wrote: > > So the theory that the driver starts at too high a transmit rate, and > > then does not handle failures well, might be true. Of course, "not > > handle failures well" is something of an understatement. > Hm, can we just hack mac80211/ath9k to set /all/ EAPOL frames to the > lowest negotiated basic rate and test? That way we don't have to worry > about things resetting fixed rates or whatnot. This did not get exactly supportive response when this was proposed last time (Sep 2013). Anyway, for a quick test, this can be done with the following one-liner: Even I think that this goes a bit too far especially on 2.4 GHz band, but I would actually consider limiting EAPOL frames to using non-HT/VHT (e.g., 6 Mbps OFDM at least for EAPOL-Key frames) to avoid some interoperability issues. I would say that the current minstrel_ht behavior is somewhat excessive for EAPOL-Key frames in the other direction. Using MCS 14 with fallback to something like MCS 5 for the second Data frame after an association can certainly fail. Number of Linux drivers do already limit EAPOL frame TX rate, so this specific item is mainly applicable only to driver that use minstrel from mac80211 (e.g., ath9k). Though, that IEEE80211_TX_CTL_USE_MINRATE would likely affect most mac80211 drivers. diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index c314c59..b45038f 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -566,6 +566,7 @@ ieee80211_tx_h_check_control_port_protocol(struct ieee80211_tx_data *tx) if (tx->sdata->control_port_no_encrypt) info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; info->control.flags |= IEEE80211_TX_CTRL_PORT_CTRL_PROTO; + info->flags |= IEEE80211_TX_CTL_USE_MINRATE; } return TX_CONTINUE;