1 /* SPDX-License-Identifier: ISC */
3 * Copyright (C) 2018 Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
6 #ifndef __MT76x02_PHY_H
7 #define __MT76x02_PHY_H
9 #include "mt76x02_regs.h"
12 mt76x02_get_rssi_gain_thresh(struct mt76x02_dev
*dev
)
14 switch (dev
->mphy
.chandef
.width
) {
15 case NL80211_CHAN_WIDTH_80
:
17 case NL80211_CHAN_WIDTH_40
:
25 mt76x02_get_low_rssi_gain_thresh(struct mt76x02_dev
*dev
)
27 switch (dev
->mphy
.chandef
.width
) {
28 case NL80211_CHAN_WIDTH_80
:
30 case NL80211_CHAN_WIDTH_40
:
37 void mt76x02_add_rate_power_offset(struct mt76_rate_power
*r
, int offset
);
38 void mt76x02_phy_set_txpower(struct mt76x02_dev
*dev
, int txp_0
, int txp_2
);
39 void mt76x02_limit_rate_power(struct mt76_rate_power
*r
, int limit
);
40 int mt76x02_get_max_rate_power(struct mt76_rate_power
*r
);
41 void mt76x02_phy_set_rxpath(struct mt76x02_dev
*dev
);
42 void mt76x02_phy_set_txdac(struct mt76x02_dev
*dev
);
43 void mt76x02_phy_set_bw(struct mt76x02_dev
*dev
, int width
, u8 ctrl
);
44 void mt76x02_phy_set_band(struct mt76x02_dev
*dev
, int band
,
46 bool mt76x02_phy_adjust_vga_gain(struct mt76x02_dev
*dev
);
47 void mt76x02_init_agc_gain(struct mt76x02_dev
*dev
);
49 #endif /* __MT76x02_PHY_H */