From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Kazior Date: Tue, 11 Jun 2013 07:38:08 +0200 Subject: [ath9k-devel] [PATCH 03/10] ath10k: allow deferred regd update In-Reply-To: <87d2rtucoc.fsf@kamboji.qca.qualcomm.com> References: <1370514361-15858-1-git-send-email-michal.kazior@tieto.com> <1370514361-15858-4-git-send-email-michal.kazior@tieto.com> <87d2rtucoc.fsf@kamboji.qca.qualcomm.com> Message-ID: <51B6B7C0.8040401@tieto.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org On 10/06/13 18:56, Kalle Valo wrote: > Michal Kazior writes: > >> Regulatory domain notification hook can be called >> regardless of the hw state (i.e. before start >> mac80211 callback). >> >> Signed-off-by: Michal Kazior >> --- >> drivers/net/wireless/ath/ath10k/core.h | 2 ++ >> drivers/net/wireless/ath/ath10k/mac.c | 23 ++++++++++++++++++----- >> 2 files changed, 20 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h >> index c718b80..a3ab3eb 100644 >> --- a/drivers/net/wireless/ath/ath10k/core.h >> +++ b/drivers/net/wireless/ath/ath10k/core.h >> @@ -345,6 +345,8 @@ struct ath10k { >> struct completion offchan_tx_completed; >> struct sk_buff *offchan_tx_skb; >> >> + bool started; > > I would prefer to have a proper state variable right from the start. > Sooner or later we need it anyway. Otherwise we end up to "flag hell" > (checking multiple flags). > > For ath6kl we currently have: > > enum ath6kl_state { > ATH6KL_STATE_OFF, > ATH6KL_STATE_ON, > ATH6KL_STATE_SUSPENDING, > ATH6KL_STATE_RESUMING, > ATH6KL_STATE_DEEPSLEEP, > ATH6KL_STATE_CUTPOWER, > ATH6KL_STATE_WOW, > ATH6KL_STATE_RECOVERY, > }; > > I think ON and OFF states would be enough for ath10k currently. We can > extend them as we add more features. Sounds good. I'll fix this and resend later. -- Pozdrawiam / Best regards, Michal Kazior.