From patchwork Tue Jan 12 08:43:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 72337 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0C8i8mi006569 for ; Tue, 12 Jan 2010 08:44:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753722Ab0ALIoH (ORCPT ); Tue, 12 Jan 2010 03:44:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751978Ab0ALIoH (ORCPT ); Tue, 12 Jan 2010 03:44:07 -0500 Received: from smtp.nokia.com ([192.100.122.233]:44965 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753712Ab0ALIoG (ORCPT ); Tue, 12 Jan 2010 03:44:06 -0500 Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o0C8hdAm027340; Tue, 12 Jan 2010 10:43:56 +0200 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 12 Jan 2010 10:43:31 +0200 Received: from mgw-da01.ext.nokia.com ([147.243.128.24]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Tue, 12 Jan 2010 10:43:28 +0200 Received: from [127.0.1.1] (trdhcp21283.nmp.nokia.com [172.22.212.83]) by mgw-da01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o0C8hPrN006816; Tue, 12 Jan 2010 10:43:26 +0200 Subject: [PATCH PATCH v6 7/7] wl1251: add U-APSD support To: linville@tuxdriver.com From: Kalle Valo Cc: linux-wireless@vger.kernel.org, johannes@sipsolutions.net, a.young.jason@gmail.com Date: Tue, 12 Jan 2010 10:43:15 +0200 Message-ID: <20100112084314.27492.54040.stgit@tikku> In-Reply-To: <20100112084059.27492.86738.stgit@tikku> References: <20100112084059.27492.86738.stgit@tikku> User-Agent: StGit/0.15 MIME-Version: 1.0 X-OriginalArrivalTime: 12 Jan 2010 08:43:29.0283 (UTC) FILETIME=[505D7D30:01CA9363] X-Nokia-AV: Clean Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org diff --git a/drivers/net/wireless/wl12xx/wl1251_main.c b/drivers/net/wireless/wl12xx/wl1251_main.c index 4cf3545..6be50aa 100644 --- a/drivers/net/wireless/wl12xx/wl1251_main.c +++ b/drivers/net/wireless/wl12xx/wl1251_main.c @@ -1307,6 +1307,7 @@ static struct ieee80211_channel wl1251_channels[] = { static int wl1251_op_conf_tx(struct ieee80211_hw *hw, u16 queue, const struct ieee80211_tx_queue_params *params) { + enum wl1251_acx_ps_scheme ps_scheme; struct wl1251 *wl = hw->priv; int ret; @@ -1324,10 +1325,14 @@ static int wl1251_op_conf_tx(struct ieee80211_hw *hw, u16 queue, if (ret < 0) goto out_sleep; + if (params->uapsd) + ps_scheme = WL1251_ACX_PS_SCHEME_UPSD_TRIGGER; + else + ps_scheme = WL1251_ACX_PS_SCHEME_LEGACY; + ret = wl1251_acx_tid_cfg(wl, wl1251_tx_get_queue(queue), CHANNEL_TYPE_EDCF, - wl1251_tx_get_queue(queue), - WL1251_ACX_PS_SCHEME_LEGACY, + wl1251_tx_get_queue(queue), ps_scheme, WL1251_ACX_ACK_POLICY_LEGACY); if (ret < 0) goto out_sleep; @@ -1401,7 +1406,8 @@ int wl1251_init_ieee80211(struct wl1251 *wl) wl->hw->flags = IEEE80211_HW_SIGNAL_DBM | IEEE80211_HW_NOISE_DBM | IEEE80211_HW_SUPPORTS_PS | - IEEE80211_HW_BEACON_FILTER; + IEEE80211_HW_BEACON_FILTER | + IEEE80211_HW_SUPPORTS_UAPSD; wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); wl->hw->wiphy->max_scan_ssids = 1;