Return-path: Received: from mail-pw0-f46.google.com ([209.85.160.46]:33522 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965803Ab0COXwP convert rfc822-to-8bit (ORCPT ); Mon, 15 Mar 2010 19:52:15 -0400 Received: by pwi1 with SMTP id 1so2338659pwi.19 for ; Mon, 15 Mar 2010 16:52:14 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20100315234909.GA2662@tux> References: <1268459216-22372-1-git-send-email-lrodriguez@atheros.com> <20100315214338.GB4000@tux> <43e72e891003151625t795b8ecdr2ce2e6927e8632a4@mail.gmail.com> <20100315234909.GA2662@tux> From: "Luis R. Rodriguez" Date: Mon, 15 Mar 2010 16:51:54 -0700 Message-ID: <43e72e891003151651k6298c6e7r7fadcf439bf3790c@mail.gmail.com> Subject: Re: [PATCH v3 00/12] ath9k_hw: complete support for AR9271 To: "linville@tuxdriver.com" , Vivek Natarajan , Felix Fietkau , Sujith Manoharan Cc: "linux-wireless@vger.kernel.org" , Luis Rodriguez Content-Type: text/plain; charset=UTF-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Mon, Mar 15, 2010 at 4:49 PM, Luis R. Rodriguez wrote: > On Mon, Mar 15, 2010 at 04:25:14PM -0700, Luis R. Rodriguez wrote: >> On Mon, Mar 15, 2010 at 2:43 PM, Luis R. Rodriguez >> wrote: >> > On Fri, Mar 12, 2010 at 09:46:44PM -0800, Luis R. Rodriguez wrote: >> >>   * I spotted a check added to bail out for tweaking the ACK/CTS >> >>     time out values -- this check should no longer be required >> >>     since Felix sent a proper fix for this recenlty. I removed that >> >>     hunk: >> >> >> >> @@ -1210,6 +1195,9 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah) >> >>               REG_WRITE(ah, AR_PCU_MISC, >> >>                         REG_READ(ah, AR_PCU_MISC) | ah->misc_mode); >> >> >> >> +     if (AR_SREV_9271(ah)) >> >> +             return; >> >> + >> >>       if (conf->channel && conf->channel->band == IEEE80211_BAND_5GHZ) >> >>               sifstime = 16; >> >>       else >> >> -- >> > >> > Turns out this hunk is required... but the rf changes are not (patch 4/12) >> > so I'll just respin and send a new series out. >> > >> > We should look for a better way to address this issue instead of the above hunk >> > otherwise we will be skipping all changes to the slot time from mac80211. >> > Right now ath9k_htc does not support this (BSS_CHANGED_ERP_SLOT) or a >> > set_coverage_class() callback. >> >> We'll need to support at least BSS_CHANGED_ERP_SLOT in case the AP >> switches to compatibility mode. > > How about something like this: > > diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c > index 3b4c636..387eef9 100644 > --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c > +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c > @@ -1438,6 +1438,14 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw, >                ath9k_htc_beacon_config(priv, vif, bss_conf); >        } > > +       if (changed & BSS_CHANGED_ERP_SLOT) { > +               if (bss_conf->use_short_slot) > +                       ah->slottime = 9; > +               else > +                       ah->slottime = 20; > +               ath9k_hw_init_global_settings(ah); > +       } > + >        if (changed & BSS_CHANGED_BEACON) >                ath9k_htc_beacon_update(priv, vif); > > diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c > index 00570fb..867cfaf 100644 > --- a/drivers/net/wireless/ath/ath9k/hw.c > +++ b/drivers/net/wireless/ath/ath9k/hw.c > @@ -784,9 +784,6 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah) >                REG_WRITE(ah, AR_PCU_MISC, >                          REG_READ(ah, AR_PCU_MISC) | ah->misc_mode); > > -       if (AR_SREV_9271(ah)) > -               return; > - >        if (conf->channel && conf->channel->band == IEEE80211_BAND_5GHZ) >                sifstime = 16; >        else > @@ -807,6 +804,10 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah) >                acktimeout += 64 - sifstime - ah->slottime; > >        ath9k_hw_setslottime(ah, slottime); > + > +       if (AR_SREV_9271(ah)) > +               return; > + >        ath9k_hw_set_ack_timeout(ah, acktimeout); >        ath9k_hw_set_cts_timeout(ah, acktimeout); >        if (ah->globaltxtimeout != (u32) -1) Works for me with ar9271, will send with this new change for the hardware changes, please review and consider integration on the ath9k_htc driver side of things. Luis