1967439c7SZong-Zhe Yang /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
2967439c7SZong-Zhe Yang  * Copyright(c) 2020-2022  Realtek Corporation
3967439c7SZong-Zhe Yang  */
4967439c7SZong-Zhe Yang 
5967439c7SZong-Zhe Yang #ifndef __RTW89_CHAN_H__
6967439c7SZong-Zhe Yang #define __RTW89_CHAN_H__
7967439c7SZong-Zhe Yang 
8967439c7SZong-Zhe Yang #include "core.h"
9967439c7SZong-Zhe Yang 
10967439c7SZong-Zhe Yang static inline bool rtw89_get_entity_state(struct rtw89_dev *rtwdev)
11967439c7SZong-Zhe Yang {
12967439c7SZong-Zhe Yang 	struct rtw89_hal *hal = &rtwdev->hal;
13967439c7SZong-Zhe Yang 
14967439c7SZong-Zhe Yang 	return READ_ONCE(hal->entity_active);
15967439c7SZong-Zhe Yang }
16967439c7SZong-Zhe Yang 
17967439c7SZong-Zhe Yang static inline void rtw89_set_entity_state(struct rtw89_dev *rtwdev, bool active)
18967439c7SZong-Zhe Yang {
19967439c7SZong-Zhe Yang 	struct rtw89_hal *hal = &rtwdev->hal;
20967439c7SZong-Zhe Yang 
21967439c7SZong-Zhe Yang 	WRITE_ONCE(hal->entity_active, active);
22967439c7SZong-Zhe Yang }
23967439c7SZong-Zhe Yang 
24*bb8152b3SZong-Zhe Yang void rtw89_chan_create(struct rtw89_chan *chan, u8 center_chan, u8 primary_chan,
25*bb8152b3SZong-Zhe Yang 		       enum rtw89_band band, enum rtw89_bandwidth bandwidth);
26cbb145b9SZong-Zhe Yang bool rtw89_assign_entity_chan(struct rtw89_dev *rtwdev,
27cbb145b9SZong-Zhe Yang 			      enum rtw89_sub_entity_idx idx,
28cbb145b9SZong-Zhe Yang 			      const struct rtw89_chan *new);
29cbb145b9SZong-Zhe Yang 
30967439c7SZong-Zhe Yang #endif
31