From patchwork Wed Jan 29 12:48:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Puzyniak X-Patchwork-Id: 3551061 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 8BFCD9F2E9 for ; Wed, 29 Jan 2014 12:48:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 856C82017D for ; Wed, 29 Jan 2014 12:48:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C0C472015E for ; Wed, 29 Jan 2014 12:48:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752138AbaA2Mse (ORCPT ); Wed, 29 Jan 2014 07:48:34 -0500 Received: from mail-ea0-f170.google.com ([209.85.215.170]:50471 "EHLO mail-ea0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750970AbaA2Msd (ORCPT ); Wed, 29 Jan 2014 07:48:33 -0500 Received: by mail-ea0-f170.google.com with SMTP id k10so900130eaj.15 for ; Wed, 29 Jan 2014 04:48:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id; bh=enRKdEf9KVQh//2jc/JJBcxbuPFA1ZyQPkURn7idZwg=; b=OLFgmBy3J7sYOI5SdNLZhldYt0YmoDn/W4nWw4Po1LulRw3bzZl6ylH9wajHrs2JfP K2V10uekaC8xlBI3aCd7E9nbEJi9oHv1//DBm74eIr8OnOcmjocPM5+zrJ6ryjoUUkLl xnnzBqCFzVZHhnZr4/Wg7BXdbTw4ntWsqUldI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=enRKdEf9KVQh//2jc/JJBcxbuPFA1ZyQPkURn7idZwg=; b=NnC3PT32L+TwcdwPZEmjk09AZmQFyy8wyS41njSw2nPwwphstVSuXwK16M8EEV0S7E 2AuXVaH0kKPB1oMdO9LlPOt5R8Xb5fbDlXkSa+z2cfVn0OokGkSiCE497UXd91uk6PDL 4J3S99Q7i8GO1bBvjjNXy/FQLySVgBwFuI2wAxpSsjIl9JpEaRRN3WGGzy13UDpiJArY J0VlTDRAJGjQ/wTJSfaV0+AyoqmEmc+HFLXCm8NpLo9VPYmfQh4AMH2HS3hFDWbKKBtp PfWzIQYH+Yg/Z/tzeCkbEvOx+tppCDaCT2M0upNSxwvh5+8zevFwRwSgJhiMqNra3eVU HL0Q== X-Gm-Message-State: ALoCoQnHOwGsdtlX7+f//8o+xup9Gq2f4wlKCH9RsqS5JGGvVzTmXmgMnqt6Fyx5OAklrXmr5Tvbyn8lMHUCSjgowtQkhNxy/Zfozf4gS0c0bUJI8FY6uc4= X-Received: by 10.14.204.9 with SMTP id g9mr2165863eeo.82.1390999711919; Wed, 29 Jan 2014 04:48:31 -0800 (PST) Received: from localhost.localdomain ([91.198.246.8]) by mx.google.com with ESMTPSA id g1sm8263471eet.6.2014.01.29.04.48.30 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Jan 2014 04:48:31 -0800 (PST) From: Marek Puzyniak To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Marek Puzyniak Subject: [PATCH] ath10k: configure access category for arp Date: Wed, 29 Jan 2014 13:48:16 +0100 Message-Id: <1390999696-8895-1-git-send-email-marek.puzyniak@tieto.com> X-Mailer: git-send-email 1.8.1.2 X-DomainID: tieto.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.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, 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 ARP frames exchange does not work properly for UAPSD enabled AP. ARP requests which arrives with access category 0 are processed by network stack and send back with access category 0. FW changes access category to 6. This is causing problems when UAPSD associated STA is sleeping after has sent ARP request. Configure ARP access category in FW to best effort (0) solves this problem. ARP frames will be send with access category 0. Simplify arp ac override functionality by removing redundant entry in pdev param maping table. There should be only one entry in pdev param map but enum has different name for different FW. Signed-off-by: Marek Puzyniak --- drivers/net/wireless/ath/ath10k/mac.c | 17 +++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi.c | 4 +--- drivers/net/wireless/ath/ath10k/wmi.h | 1 - 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 776e364..7fd33da 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -2100,6 +2100,23 @@ static int ath10k_start(struct ieee80211_hw *hw) ath10k_warn("could not init WMI_PDEV_PARAM_DYNAMIC_BW (%d)\n", ret); + /* + * By default FW set ARP frames ac to voice (6). In that case ARP + * exchange is not working properly for UAPSD enabled AP. ARP requests + * which arrives with access category 0 are processed by network stack + * and send back with access category 0, but FW changes access category + * to 6. Set ARP frames access category to best effort (0) solves + * this problem. + */ + + ret = ath10k_wmi_pdev_set_param(ar, + ar->wmi.pdev_param->arp_ac_override, 0); + if (ret) { + ath10k_warn("could not init WMI_PDEV_PARAM_ARP_AC_OVERRIDE (%d)\n", + ret); + goto exit; + } + ath10k_regd_update(ar); exit: diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 712a606..ebcc698 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -420,7 +420,6 @@ static struct wmi_pdev_param_map wmi_pdev_param_map = { .bcnflt_stats_update_period = WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD, .pmf_qos = WMI_PDEV_PARAM_PMF_QOS, .arp_ac_override = WMI_PDEV_PARAM_ARP_AC_OVERRIDE, - .arpdhcp_ac_override = WMI_PDEV_PARAM_UNSUPPORTED, .dcs = WMI_PDEV_PARAM_DCS, .ani_enable = WMI_PDEV_PARAM_ANI_ENABLE, .ani_poll_period = WMI_PDEV_PARAM_ANI_POLL_PERIOD, @@ -472,8 +471,7 @@ static struct wmi_pdev_param_map wmi_10x_pdev_param_map = { .bcnflt_stats_update_period = WMI_10X_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD, .pmf_qos = WMI_10X_PDEV_PARAM_PMF_QOS, - .arp_ac_override = WMI_PDEV_PARAM_UNSUPPORTED, - .arpdhcp_ac_override = WMI_10X_PDEV_PARAM_ARPDHCP_AC_OVERRIDE, + .arp_ac_override = WMI_10X_PDEV_PARAM_ARPDHCP_AC_OVERRIDE, .dcs = WMI_10X_PDEV_PARAM_DCS, .ani_enable = WMI_10X_PDEV_PARAM_ANI_ENABLE, .ani_poll_period = WMI_10X_PDEV_PARAM_ANI_POLL_PERIOD, diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index 4b5e7d3..b776bc4 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -2277,7 +2277,6 @@ struct wmi_pdev_param_map { u32 bcnflt_stats_update_period; u32 pmf_qos; u32 arp_ac_override; - u32 arpdhcp_ac_override; u32 dcs; u32 ani_enable; u32 ani_poll_period;