Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / net / wireless / broadcom / b43legacy / radio.h
blobee8b2c8d1602a2e2d43175f2ead637df88388138
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
4 Broadcom B43legacy wireless driver
6 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
7 Stefano Brivio <stefano.brivio@polimi.it>
8 Michael Buesch <m@bues.ch>
9 Danny van Dyk <kugelfang@gentoo.org>
10 Andreas Jaggi <andreas.jaggi@waterwave.ch>
12 Some parts of the code in this file are derived from the ipw2200
13 driver Copyright(c) 2003 - 2004 Intel Corporation.
18 #ifndef B43legacy_RADIO_H_
19 #define B43legacy_RADIO_H_
21 #include "b43legacy.h"
24 #define B43legacy_RADIO_DEFAULT_CHANNEL_BG 6
26 /* Force antenna 0. */
27 #define B43legacy_RADIO_TXANTENNA_0 0
28 /* Force antenna 1. */
29 #define B43legacy_RADIO_TXANTENNA_1 1
30 /* Use the RX antenna, that was selected for the most recently
31 * received good PLCP header.
33 #define B43legacy_RADIO_TXANTENNA_LASTPLCP 3
34 #define B43legacy_RADIO_TXANTENNA_DEFAULT B43legacy_RADIO_TXANTENNA_LASTPLCP
36 #define B43legacy_RADIO_INTERFMODE_NONE 0
37 #define B43legacy_RADIO_INTERFMODE_NONWLAN 1
38 #define B43legacy_RADIO_INTERFMODE_MANUALWLAN 2
39 #define B43legacy_RADIO_INTERFMODE_AUTOWLAN 3
42 void b43legacy_radio_lock(struct b43legacy_wldev *dev);
43 void b43legacy_radio_unlock(struct b43legacy_wldev *dev);
45 u16 b43legacy_radio_read16(struct b43legacy_wldev *dev, u16 offset);
46 void b43legacy_radio_write16(struct b43legacy_wldev *dev, u16 offset, u16 val);
48 u16 b43legacy_radio_init2050(struct b43legacy_wldev *dev);
50 void b43legacy_radio_turn_on(struct b43legacy_wldev *dev);
51 void b43legacy_radio_turn_off(struct b43legacy_wldev *dev, bool force);
53 int b43legacy_radio_selectchannel(struct b43legacy_wldev *dev, u8 channel,
54 int synthetic_pu_workaround);
56 void b43legacy_radio_set_txpower_a(struct b43legacy_wldev *dev, u16 txpower);
57 void b43legacy_radio_set_txpower_bg(struct b43legacy_wldev *dev,
58 u16 baseband_attenuation, u16 attenuation,
59 u16 txpower);
61 u16 b43legacy_default_baseband_attenuation(struct b43legacy_wldev *dev);
62 u16 b43legacy_default_radio_attenuation(struct b43legacy_wldev *dev);
63 u16 b43legacy_default_txctl1(struct b43legacy_wldev *dev);
65 void b43legacy_radio_set_txantenna(struct b43legacy_wldev *dev, u32 val);
67 void b43legacy_radio_clear_tssi(struct b43legacy_wldev *dev);
69 u8 b43legacy_radio_aci_detect(struct b43legacy_wldev *dev, u8 channel);
70 u8 b43legacy_radio_aci_scan(struct b43legacy_wldev *dev);
72 int b43legacy_radio_set_interference_mitigation(struct b43legacy_wldev *dev,
73 int mode);
75 void b43legacy_calc_nrssi_slope(struct b43legacy_wldev *dev);
76 void b43legacy_calc_nrssi_threshold(struct b43legacy_wldev *dev);
77 s16 b43legacy_nrssi_hw_read(struct b43legacy_wldev *dev, u16 offset);
78 void b43legacy_nrssi_hw_write(struct b43legacy_wldev *dev, u16 offset, s16 val);
79 void b43legacy_nrssi_hw_update(struct b43legacy_wldev *dev, u16 val);
80 void b43legacy_nrssi_mem_update(struct b43legacy_wldev *dev);
82 u16 b43legacy_radio_calibrationvalue(struct b43legacy_wldev *dev);
84 #endif /* B43legacy_RADIO_H_ */