Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx> writes: > If a scan is in progress do not attempt to enter into suspend. Allow the > scan process to quiesce before proceeding. > > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx> [...] > +bool wcn36xx_smd_is_scanning(struct wcn36xx *wcn) > +{ > + bool scanning; > + > + mutex_lock(&wcn->hal_mutex); > + scanning = wcn->scanning; > + mutex_unlock(&wcn->hal_mutex); > + > + return scanning; > +} Instead of having a bool you could use SET_BIT() & co, that way you don't need this extra function. For example see dev_flags in ath10k. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches