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