From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kalle Valo Date: Mon, 10 Jun 2013 19:56:51 +0300 Subject: [ath9k-devel] [PATCH 03/10] ath10k: allow deferred regd update In-Reply-To: <1370514361-15858-4-git-send-email-michal.kazior@tieto.com> (Michal Kazior's message of "Thu, 6 Jun 2013 12:25:54 +0200") References: <1370514361-15858-1-git-send-email-michal.kazior@tieto.com> <1370514361-15858-4-git-send-email-michal.kazior@tieto.com> Message-ID: <87d2rtucoc.fsf@kamboji.qca.qualcomm.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org 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. -- Kalle Valo