From patchwork Tue Nov 23 19:42:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Kossifidis X-Patchwork-Id: 350641 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oANJg7VX028430 for ; Tue, 23 Nov 2010 19:44:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751246Ab0KWTm3 (ORCPT ); Tue, 23 Nov 2010 14:42:29 -0500 Received: from mail-ew0-f46.google.com ([209.85.215.46]:40204 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750894Ab0KWTm2 (ORCPT ); Tue, 23 Nov 2010 14:42:28 -0500 Received: by ewy5 with SMTP id 5so2680465ewy.19 for ; Tue, 23 Nov 2010 11:42:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mail-followup-to:mime-version:content-type :content-disposition:user-agent; bh=OX3CB+qOBpVb5J0i2QN0IZls1Ow5fJIZu/tJ1Tvfwvw=; b=qlFfB7cmyJBm9+ajt4uwGW3fZJqEoVw3FJN/eijvJhiE6tuLd1x7ho5VeZiCkn1ILA LxFJCamk+z+8c/LQNN5964rh11zqg8gN/qx2QoPdKqjx02HNG+5dXdug/5OpFBQsZV6D xpvx4S/UYgPCnHFK6NXDqJVNeFLO0oyHlAD1E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mail-followup-to:mime-version :content-type:content-disposition:user-agent; b=K//DaxNjx4nXuUmRFLu49j1rx3so/Tqv6TsasbXWKoGOWmSYIzLgQcTXFvmQS9mDFC eIhh+Nf/xneOSEllbUy8H1tk+Do+JegWcY9JGqYIozDpugkZscLBvNKiprxRSZJRB9OG ZFfcpQq4+x/LHbJo6nuuElMn22XIr3xbeD7S0= Received: by 10.213.9.135 with SMTP id l7mr2270751ebl.7.1290541347513; Tue, 23 Nov 2010 11:42:27 -0800 (PST) Received: from localhost ([139.91.73.37]) by mx.google.com with ESMTPS id x54sm6128964eeh.11.2010.11.23.11.42.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 23 Nov 2010 11:42:24 -0800 (PST) Date: Tue, 23 Nov 2010 21:42:22 +0200 From: Nick Kossifidis To: ath5k-devel@venema.h4ckr.net, linux-wireless@vger.kernel.org Cc: linville@tuxdriver.com, me@bobcopeland.com, mcgrof@gmail.com, jirislaby@gmail.com, nbd@openwrt.org, br1@einfach.org Subject: [PATCH 24/30] ath5k: No need to save/restore staid flags on reset Message-ID: <20101123194222.GX4303@makis.mantri> Mail-Followup-To: ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org, linville@tuxdriver.com, me@bobcopeland.com, mcgrof@gmail.com, jirislaby@gmail.com, nbd@openwrt.org, br1@einfach.org MIME-Version: 1.0 Content-Disposition: inline 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-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 23 Nov 2010 19:44:09 +0000 (UTC) diff --git a/drivers/net/wireless/ath/ath5k/reset.c b/drivers/net/wireless/ath/ath5k/reset.c index f92f7bb..93014fd 100644 --- a/drivers/net/wireless/ath/ath5k/reset.c +++ b/drivers/net/wireless/ath/ath5k/reset.c @@ -940,13 +940,11 @@ static void ath5k_hw_commit_eeprom_settings(struct ath5k_hw *ah, int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode, struct ieee80211_channel *channel, bool fast, bool skip_pcu) { - struct ath_common *common = ath5k_hw_common(ah); - u32 s_seq[10], s_led[3], staid1_flags, tsf_up, tsf_lo; + u32 s_seq[10], s_led[3], tsf_up, tsf_lo; u8 mode, freq, ee_mode; int i, ret; ee_mode = 0; - staid1_flags = 0; tsf_up = 0; tsf_lo = 0; freq = 0; @@ -1115,15 +1113,6 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode, s_led[1] = ath5k_hw_reg_read(ah, AR5K_GPIOCR); s_led[2] = ath5k_hw_reg_read(ah, AR5K_GPIODO); - /* AR5K_STA_ID1 flags, only preserve antenna - * settings and ack/cts rate mode */ - staid1_flags = ath5k_hw_reg_read(ah, AR5K_STA_ID1) & - (AR5K_STA_ID1_DEFAULT_ANTENNA | - AR5K_STA_ID1_DESC_ANTENNA | - AR5K_STA_ID1_RTS_DEF_ANTENNA | - AR5K_STA_ID1_ACKCTS_6MB | - AR5K_STA_ID1_BASE_RATE_11B | - AR5K_STA_ID1_SELFGEN_DEF_ANT); /* * Since we are going to write rf buffer @@ -1195,15 +1184,6 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode, ath5k_hw_reg_write(ah, s_led[1], AR5K_GPIOCR); ath5k_hw_reg_write(ah, s_led[2], AR5K_GPIODO); - /* Restore sta_id flags and preserve our mac address*/ - ath5k_hw_reg_write(ah, - get_unaligned_le32(common->macaddr), - AR5K_STA_ID0); - ath5k_hw_reg_write(ah, - staid1_flags | get_unaligned_le16(common->macaddr + 4), - AR5K_STA_ID1); - - /* * Initialize PCU */