From patchwork Wed Jul 18 12:13:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luciano Coelho X-Patchwork-Id: 1210721 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 6F25E3FD4F for ; Wed, 18 Jul 2012 12:14:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753954Ab2GRMOB (ORCPT ); Wed, 18 Jul 2012 08:14:01 -0400 Received: from na3sys009aog113.obsmtp.com ([74.125.149.209]:38667 "EHLO na3sys009aog113.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753379Ab2GRMNz (ORCPT ); Wed, 18 Jul 2012 08:13:55 -0400 Received: from mail-lb0-f182.google.com ([209.85.217.182]) (using TLSv1) by na3sys009aob113.postini.com ([74.125.148.12]) with SMTP ID DSNKUAaogiJ9OAcuX/igQj8d1aEP8ZGQs8OZ@postini.com; Wed, 18 Jul 2012 05:13:55 PDT Received: by lbon10 with SMTP id n10so1904969lbo.41 for ; Wed, 18 Jul 2012 05:13:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=Jna1BMyac05D+Np0mcniYKlcIi+j3EhghyKMY7itH0A=; b=hwUb6ru+JGCwOzjA8WgBrIDXxy15eJb8DEGPnMl3b1Yqd3gA10TzmR1yWDpVuePMRW EoN8VeAdw83hFnky+PYZQfKF7rHr+5GxgF4UYRCRf1CCZffetYDp0ljtZpYKOI7FHIB5 J4/gFvkXkemp0IKnjTQCLzlAewYY9L4mlFlpvEzFwGWXwudMGh4gBmLkInJ0h5Jr2hul jLfN2YkYvgIDSYXGqghgKK28ySKstraZhure3VIKCkMPEx3+N9Hb6y/nO8zgaarhoOg1 6DOK7xiQM3pdu7vKW1H3NFJKiR9ka7Q3Gt8ynYaWOb7ay7tRHVdBYyFhJMzuTuFHRV5s V54g== Received: by 10.112.29.233 with SMTP id n9mr1631593lbh.91.1342613632804; Wed, 18 Jul 2012 05:13:52 -0700 (PDT) Received: from cumari.Elisa (a88-113-65-16.elisa-laajakaista.fi. [88.113.65.16]) by mx.google.com with ESMTPS id gv8sm21679270lab.14.2012.07.18.05.13.51 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 Jul 2012 05:13:52 -0700 (PDT) From: Luciano Coelho To: linux-wireless@vger.kernel.org Cc: coelho@ti.com, arik@wizery.com Subject: [PATCH 07/14] wlcore: use basic rates for non-data packets Date: Wed, 18 Jul 2012 15:13:26 +0300 Message-Id: <1342613613-917-8-git-send-email-coelho@ti.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1342613613-917-1-git-send-email-coelho@ti.com> References: <1342613613-917-1-git-send-email-coelho@ti.com> X-Gm-Message-State: ALoCoQldhL/cgqYTCeLpyvYNTQ378fk+bT4+5ISNC2uWJEVyqCLUBClNIvXnh32VRbT5oFSeJr8j Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Eliad Peller After the latest mac80211 changes, the sta has the ap's sta pointer even before association. This cause the auth and assoc frames to be sent with the standard ap's rates, rather than the basic rates. Change the tx rate policy logic to use the regular ap rates only for data packets (so control and mgmt packets will be sent with basic rates) Signed-off-by: Eliad Peller Signed-off-by: Luciano Coelho --- drivers/net/wireless/ti/wlcore/tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c index 0bdc950..c1d9320 100644 --- a/drivers/net/wireless/ti/wlcore/tx.c +++ b/drivers/net/wireless/ti/wlcore/tx.c @@ -306,7 +306,7 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct wl12xx_vif *wlvif, rate_idx = 0; else if (wlvif->bss_type != BSS_TYPE_AP_BSS) { /* - * if the packets are destined for AP (have a STA entry) + * if the packets are data packets * send them with AP rate policies (EAPOLs are an exception), * otherwise use default basic rates */ @@ -314,7 +314,7 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct wl12xx_vif *wlvif, rate_idx = wlvif->sta.basic_rate_idx; else if (control->flags & IEEE80211_TX_CTL_NO_CCK_RATE) rate_idx = wlvif->sta.p2p_rate_idx; - else if (control->control.sta) + else if (ieee80211_is_data(frame_control)) rate_idx = wlvif->sta.ap_rate_idx; else rate_idx = wlvif->sta.basic_rate_idx;