From patchwork Thu Aug 27 21:00:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luciano Coelho X-Patchwork-Id: 44331 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7RL0YxU011140 for ; Thu, 27 Aug 2009 21:00:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752899AbZH0VA3 (ORCPT ); Thu, 27 Aug 2009 17:00:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752871AbZH0VA3 (ORCPT ); Thu, 27 Aug 2009 17:00:29 -0400 Received: from smtp.nokia.com ([192.100.122.230]:24536 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752785AbZH0VA2 (ORCPT ); Thu, 27 Aug 2009 17:00:28 -0400 Received: from vaebh105.NOE.Nokia.com (vaebh105.europe.nokia.com [10.160.244.31]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n7RL0FSQ007565; Fri, 28 Aug 2009 00:00:17 +0300 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by vaebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 28 Aug 2009 00:00:22 +0300 Received: from mgw-da02.ext.nokia.com ([147.243.128.26]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Fri, 28 Aug 2009 00:00:21 +0300 Received: from localhost.localdomain (pimenta.research.nokia.com [172.21.50.90]) by mgw-da02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n7RL025P020286; Fri, 28 Aug 2009 00:00:13 +0300 From: Luciano Coelho To: linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org, juuso.oikarinen@nokia.com, kalle.valo@nokia.com Subject: [PATCH 06/13] wl1271: mask aid bits 14 and 15 in ps-poll template Date: Fri, 28 Aug 2009 00:00:00 +0300 Message-Id: <1251406807-31495-7-git-send-email-luciano.coelho@nokia.com> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1251406807-31495-1-git-send-email-luciano.coelho@nokia.com> References: <1251406807-31495-1-git-send-email-luciano.coelho@nokia.com> X-OriginalArrivalTime: 27 Aug 2009 21:00:22.0041 (UTC) FILETIME=[64377890:01CA2759] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Juuso Oikarinen In ps-poll template aid bits 14 and 15 were not masked as required by the standard. Mask them so that aid is sent in correct format. This patch is a direct port of the respective patch for the wl1251 driver by Kalle Valo. Signed-off-by: Juuso Oikarinen Reviewed-by: Vidhya Govindan Signed-off-by: Luciano Coelho --- drivers/net/wireless/wl12xx/wl1271_cmd.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c index 1ee1b2b..bd65b38 100644 --- a/drivers/net/wireless/wl12xx/wl1271_cmd.c +++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c @@ -682,7 +682,10 @@ int wl1271_cmd_build_ps_poll(struct wl1271 *wl, u16 aid) memcpy(template.bssid, wl->bssid, ETH_ALEN); memcpy(template.ta, wl->mac_addr, ETH_ALEN); - template.aid = aid; + + /* aid in PS-Poll has its two MSBs each set to 1 */ + template.aid = cpu_to_le16(1 << 15 | 1 << 14 | aid); + template.fc = cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_PSPOLL); return wl1271_cmd_template_set(wl, CMD_TEMPL_PS_POLL, &template,