1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
2  * Copyright(c) 2020-2022  Realtek Corporation
3  */
4 
5 #ifndef __RTW89_CHAN_H__
6 #define __RTW89_CHAN_H__
7 
8 #include "core.h"
9 
10 static inline bool rtw89_get_entity_state(struct rtw89_dev *rtwdev)
11 {
12 	struct rtw89_hal *hal = &rtwdev->hal;
13 
14 	return READ_ONCE(hal->entity_active);
15 }
16 
17 static inline void rtw89_set_entity_state(struct rtw89_dev *rtwdev, bool active)
18 {
19 	struct rtw89_hal *hal = &rtwdev->hal;
20 
21 	WRITE_ONCE(hal->entity_active, active);
22 }
23 
24 bool rtw89_assign_entity_chan(struct rtw89_dev *rtwdev,
25 			      enum rtw89_sub_entity_idx idx,
26 			      const struct rtw89_chan *new);
27 
28 #endif
29