From patchwork Fri Nov 26 19:37:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Copeland X-Patchwork-Id: 359722 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 oAQJoZLl016539 for ; Fri, 26 Nov 2010 19:50:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750921Ab0KZTud (ORCPT ); Fri, 26 Nov 2010 14:50:33 -0500 Received: from mail.deathmatch.net ([72.66.92.28]:3628 "EHLO mail.deathmatch.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750877Ab0KZTuc (ORCPT ); Fri, 26 Nov 2010 14:50:32 -0500 Received: from localhost ([69.251.188.150]) (authenticated user bob@bobcopeland.com) by mail.deathmatch.net (using TLSv1/SSLv3 with cipher AES256-SHA (256 bits)); Fri, 26 Nov 2010 14:50:31 -0500 Received: from bob by localhost with local (Exim 4.69) (envelope-from ) id 1PM47H-0002QU-6S; Fri, 26 Nov 2010 14:37:55 -0500 Date: Fri, 26 Nov 2010 14:37:55 -0500 From: Bob Copeland To: Octav Chipara Cc: linux-wireless@vger.kernel.org Subject: Re: help with ath5k --- wlan0 no private ioctls Message-ID: <20101126193754.GB5815@hash.localnet> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) 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]); Fri, 26 Nov 2010 19:50:36 +0000 (UTC) diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c index 778c604..cf5393d 100644 --- a/net/mac80211/rc80211_minstrel.c +++ b/net/mac80211/rc80211_minstrel.c @@ -424,10 +424,10 @@ minstrel_rate_init(void *priv, struct ieee80211_supported_band *sband, tx_time_cts += tx_time_single + mi->sp_ack_dur; tx_time_rtscts += tx_time_single + 2 * mi->sp_ack_dur; if ((tx_time_cts < mp->segment_size) && - (mr->retry_count_cts < mp->max_retry)) + (mr->retry_count_cts < mp->max_long_retry)) mr->retry_count_cts++; if ((tx_time_rtscts < mp->segment_size) && - (mr->retry_count_rtscts < mp->max_retry)) + (mr->retry_count_rtscts < mp->max_long_retry)) mr->retry_count_rtscts++; } while ((tx_time < mp->segment_size) && (++mr->retry_count < mp->max_retry)); @@ -526,6 +526,11 @@ minstrel_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir) /* safe default, does not necessarily have to match hw properties */ mp->max_retry = 7; + mp->max_long_retry = min(mp->max_retry, + (unsigned int) hw->conf.long_frame_max_tx_count); + mp->max_retry = min(mp->max_retry, + (unsigned int) hw->conf.short_frame_max_tx_count); + if (hw->max_rates >= 4) mp->has_mrr = true; diff --git a/net/mac80211/rc80211_minstrel.h b/net/mac80211/rc80211_minstrel.h index 0f5a833..5079b88 100644 --- a/net/mac80211/rc80211_minstrel.h +++ b/net/mac80211/rc80211_minstrel.h @@ -73,6 +73,7 @@ struct minstrel_priv { unsigned int cw_min; unsigned int cw_max; unsigned int max_retry; + unsigned int max_long_retry; unsigned int ewma_level; unsigned int segment_size; unsigned int update_interval;