Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003 
0004   Broadcom B43legacy wireless driver
0005 
0006   Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
0007              Stefano Brivio <stefano.brivio@polimi.it>
0008              Michael Buesch <m@bues.ch>
0009              Danny van Dyk <kugelfang@gentoo.org>
0010              Andreas Jaggi <andreas.jaggi@waterwave.ch>
0011 
0012   Some parts of the code in this file are derived from the ipw2200
0013   driver  Copyright(c) 2003 - 2004 Intel Corporation.
0014 
0015 
0016 */
0017 
0018 #ifndef B43legacy_RADIO_H_
0019 #define B43legacy_RADIO_H_
0020 
0021 #include "b43legacy.h"
0022 
0023 
0024 #define B43legacy_RADIO_DEFAULT_CHANNEL_BG  6
0025 
0026 /* Force antenna 0. */
0027 #define B43legacy_RADIO_TXANTENNA_0     0
0028 /* Force antenna 1. */
0029 #define B43legacy_RADIO_TXANTENNA_1     1
0030 /* Use the RX antenna, that was selected for the most recently
0031  * received good PLCP header.
0032  */
0033 #define B43legacy_RADIO_TXANTENNA_LASTPLCP  3
0034 #define B43legacy_RADIO_TXANTENNA_DEFAULT   B43legacy_RADIO_TXANTENNA_LASTPLCP
0035 
0036 #define B43legacy_RADIO_INTERFMODE_NONE     0
0037 #define B43legacy_RADIO_INTERFMODE_NONWLAN  1
0038 #define B43legacy_RADIO_INTERFMODE_MANUALWLAN   2
0039 #define B43legacy_RADIO_INTERFMODE_AUTOWLAN 3
0040 
0041 
0042 void b43legacy_radio_lock(struct b43legacy_wldev *dev);
0043 void b43legacy_radio_unlock(struct b43legacy_wldev *dev);
0044 
0045 u16 b43legacy_radio_read16(struct b43legacy_wldev *dev, u16 offset);
0046 void b43legacy_radio_write16(struct b43legacy_wldev *dev, u16 offset, u16 val);
0047 
0048 u16 b43legacy_radio_init2050(struct b43legacy_wldev *dev);
0049 
0050 void b43legacy_radio_turn_on(struct b43legacy_wldev *dev);
0051 void b43legacy_radio_turn_off(struct b43legacy_wldev *dev, bool force);
0052 
0053 int b43legacy_radio_selectchannel(struct b43legacy_wldev *dev, u8 channel,
0054                   int synthetic_pu_workaround);
0055 
0056 void b43legacy_radio_set_txpower_a(struct b43legacy_wldev *dev, u16 txpower);
0057 void b43legacy_radio_set_txpower_bg(struct b43legacy_wldev *dev,
0058                     u16 baseband_attenuation, u16 attenuation,
0059                     u16 txpower);
0060 
0061 u16 b43legacy_default_baseband_attenuation(struct b43legacy_wldev *dev);
0062 u16 b43legacy_default_radio_attenuation(struct b43legacy_wldev *dev);
0063 u16 b43legacy_default_txctl1(struct b43legacy_wldev *dev);
0064 
0065 void b43legacy_radio_set_txantenna(struct b43legacy_wldev *dev, u32 val);
0066 
0067 void b43legacy_radio_clear_tssi(struct b43legacy_wldev *dev);
0068 
0069 u8 b43legacy_radio_aci_detect(struct b43legacy_wldev *dev, u8 channel);
0070 u8 b43legacy_radio_aci_scan(struct b43legacy_wldev *dev);
0071 
0072 int b43legacy_radio_set_interference_mitigation(struct b43legacy_wldev *dev,
0073                         int mode);
0074 
0075 void b43legacy_calc_nrssi_slope(struct b43legacy_wldev *dev);
0076 void b43legacy_calc_nrssi_threshold(struct b43legacy_wldev *dev);
0077 s16 b43legacy_nrssi_hw_read(struct b43legacy_wldev *dev, u16 offset);
0078 void b43legacy_nrssi_hw_write(struct b43legacy_wldev *dev, u16 offset, s16 val);
0079 void b43legacy_nrssi_hw_update(struct b43legacy_wldev *dev, u16 val);
0080 void b43legacy_nrssi_mem_update(struct b43legacy_wldev *dev);
0081 
0082 u16 b43legacy_radio_calibrationvalue(struct b43legacy_wldev *dev);
0083 
0084 #endif /* B43legacy_RADIO_H_ */