From patchwork Tue Nov 23 19:24:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Kossifidis X-Patchwork-Id: 350431 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 oANJLObc017070 for ; Tue, 23 Nov 2010 19:25:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756476Ab0KWTZG (ORCPT ); Tue, 23 Nov 2010 14:25:06 -0500 Received: from mail-ew0-f46.google.com ([209.85.215.46]:45203 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754397Ab0KWTZE (ORCPT ); Tue, 23 Nov 2010 14:25:04 -0500 Received: by ewy5 with SMTP id 5so2669075ewy.19 for ; Tue, 23 Nov 2010 11:25:03 -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=p3/LkYaVd63kZmucog0VpvvURvw1/ezWtsNMwJO0gxU=; b=QhQIMy6d3Jh96Tv1oZ1uDFLK03R1Zq5g4JTBA324rTIRFfE19KQOuFPkpw7vlYS8WP g+lDTEi+/YZct/8LW3oXOz/YX/3PikyAKbKIy7eF6m/IjsPAOijqkDfv0264ZjhWKOZb FWcJNXfvJxxp8HNbFbdZLcuEu1MByvtb/sEMc= 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=JswWgmrIKtVd8YKBQfT9jdkMV+FI99W/Og/hGUvlIm8Q6BOfKeUdkE2ZFpzvGR3iO3 8E4vht0fUctIN2J/pLGCBHOBNRHdljIwWUmA5AELYLuGMCX+/sIv7HiCKawl5uWrZa0u Lg6UTkJ5jiXtrFELqBKum6p6Ie4AFvhFb4yZY= Received: by 10.213.29.68 with SMTP id p4mr2205102ebc.31.1290540297163; Tue, 23 Nov 2010 11:24:57 -0800 (PST) Received: from localhost ([139.91.73.37]) by mx.google.com with ESMTPS id b52sm6113159eei.7.2010.11.23.11.24.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 23 Nov 2010 11:24:55 -0800 (PST) Date: Tue, 23 Nov 2010 21:24:54 +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 18/30] ath5k: Always set IFS intervals on reset Message-ID: <20101123192454.GR4303@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:25:46 +0000 (UTC) diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h index ddbbf4c..e258830 100644 --- a/drivers/net/wireless/ath/ath5k/ath5k.h +++ b/drivers/net/wireless/ath/ath5k/ath5k.h @@ -1224,6 +1224,7 @@ int ath5k_eeprom_read_mac(struct ath5k_hw *ah, u8 *mac); /* Helpers */ int ath5k_hw_get_frame_duration(struct ath5k_hw *ah, int len, struct ieee80211_rate *rate); +unsigned int ath5k_hw_get_default_slottime(struct ath5k_hw *ah); unsigned int ath5k_hw_get_default_sifs(struct ath5k_hw *ah); extern int ath5k_hw_set_opmode(struct ath5k_hw *ah, enum nl80211_iftype opmode); void ath5k_hw_set_coverage_class(struct ath5k_hw *ah, u8 coverage_class); diff --git a/drivers/net/wireless/ath/ath5k/pcu.c b/drivers/net/wireless/ath/ath5k/pcu.c index 4556f29..420ab61 100644 --- a/drivers/net/wireless/ath/ath5k/pcu.c +++ b/drivers/net/wireless/ath/ath5k/pcu.c @@ -129,7 +129,7 @@ int ath5k_hw_get_frame_duration(struct ath5k_hw *ah, * * @ah: The &struct ath5k_hw */ -static unsigned int ath5k_hw_get_default_slottime(struct ath5k_hw *ah) +unsigned int ath5k_hw_get_default_slottime(struct ath5k_hw *ah) { struct ieee80211_channel *channel = ah->ah_current_channel; unsigned int slot_time; diff --git a/drivers/net/wireless/ath/ath5k/qcu.c b/drivers/net/wireless/ath/ath5k/qcu.c index 69bff04..1849eee 100644 --- a/drivers/net/wireless/ath/ath5k/qcu.c +++ b/drivers/net/wireless/ath/ath5k/qcu.c @@ -652,5 +652,13 @@ int ath5k_hw_init_queues(struct ath5k_hw *ah) AR5K_REG_ENABLE_BITS(ah, AR5K_DCU_GBL_IFS_MISC, AR5K_DCU_GBL_IFS_MISC_TURBO_MODE); + /* If we didn't set IFS timings through + * ath5k_hw_set_coverage_class make sure + * we set them here */ + if (!ah->ah_coverage_class) { + unsigned int slot_time = ath5k_hw_get_default_slottime(ah); + ath5k_hw_set_ifs_intervals(ah, slot_time); + } + return 0; }