75 int pos =
ah->curchan - &
ah->channels[0];
78 unsigned int div =
common->clockrate * 1000;
104 memset(cc, 0,
sizeof(*cc));
161 "(%d MHz) -> (%d MHz)\n",
168 "Unable to reset channel (%d MHz), reset status %d\n",
174 DBG(
"ath9k: Unable to restart recv logic\n");
208 u32 cal_interval, short_cal_interval, long_cal_interval;
210 if (
ah->caldata &&
ah->caldata->nfcal_interference)
229 if (!
common->ani.caldone) {
248 ah->config.ani_poll_interval) {
254 if (longcal || shortcal || aniflag) {
262 if (longcal || shortcal) {
279 cal_interval =
min(cal_interval,
280 (
u32)
ah->config.ani_poll_interval);
282 cal_interval =
min(cal_interval, (
u32)short_cal_interval);
296 DBG(
"ath9k: Possible baseband hang, " 301 }
else if (busy >= 0)
312 if (pll_sqsum >= 0x40000) {
317 "Possible RX hang, resetting");
368 #define SCHED_INTR ( \ 370 ATH9K_INT_BB_WATCHDOG | \ 502 "Unable to reset channel (%d MHz), reset status %d\n",
531 "Unable to reset hardware; reset status %d\n",
r);
534 DBG(
"ath9k: Unable to start recv logic\n");
575 "Starting driver with initial channel: %d MHz\n",
596 "Unable to reset hardware; reset status %d (freq %d MHz)\n",
616 DBG(
"ath9k: Unable to start recv logic\n");
635 if (
ah->caps.pcie_lcr_extsync_en &&
common->bus_ops->extn_synch_en)
651 DBGIO(
"ath9k: transmitting packet, iob: %p\n", iob);
655 DBG(
"ath9k: TX failed\n");
674 DBG(
"ath9k: Device not present\n");
705 DBG(
"ath9k: Driver halt\n");
739 old_pos =
ah->curchan - &
ah->channels[0];
744 "Set channel: %d MHz\n",
773 DBG(
"ath9k: Unable to set channel\n");
807 "Bss Info ASSOC %d, bssid: %pM\n",
833 "ath9k: Bss Info DISASSOC %d, bssid %pM\n",
865 DBG2(
"ath9k: BSSID: %pM aid: 0x%x\n",
874 ah->slottime = slottime;
877 DBG2(
"ath9k: BSS Changed PREAMBLE %d\n",
884 DBG2(
"ath9k: BSS Changed CTS PROT %d\n",
#define EINVAL
Invalid argument.
int ath9k_hw_disable(struct ath_hw *ah)
static int ath9k_hw_getisr(struct ath_hw *ah, enum ath9k_int *masked)
void ath9k_hw_write_associd(struct ath_hw *ah)
#define SC_OP_PRIM_STA_VIF
int ath9k_hw_setrxabort(struct ath_hw *ah, int set)
#define TICKS_PER_SEC
Number of ticks per second.
unsigned long tx_complete_work_timer
int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, struct ath9k_hw_cal_data *caldata, int bChannelChange)
void ath9k_hw_enable_interrupts(struct ath_hw *ah)
int ath_rx_tasklet(struct ath_softc *sc, int flush, int hp)
#define ATH_STA_SHORT_CALINTERVAL
struct ath9k_channel * curchan
void ath_tx_tasklet(struct ath_softc *sc)
struct survey_info * cur_survey
u8 channel
The channel currently in use, as an index into the channels array.
void ath9k_hw_init_global_settings(struct ath_hw *ah)
u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah)
#define ATH_RESTART_CALINTERVAL
void free_iob(struct io_buffer *iobuf)
Free I/O buffer.
u8 rtscts_rate
The rate to use for RTS/CTS transmissions.
static void ath_update_survey_nf(struct ath_softc *sc, int channel)
enum ath9k_power_mode power_mode
#define ATH_TXQ_SETUP(sc, i)
#define AR_SREV_9485(_ah)
struct net80211_device_operations ath9k_ops
int ath_tx_start(struct net80211_device *dev, struct io_buffer *iob, struct ath_tx_control *txctl)
static void ath_start_ani(struct ath_common *common)
struct ath_txq txq[ATH9K_NUM_TX_QUEUES]
void ath9k_cmn_update_txpow(struct ath_hw *ah, u16 cur_txpow, u16 new_txpow, u16 *txpower)
int ath9k_setpower(struct ath_softc *sc, enum ath9k_power_mode mode)
static void ath9k_hw_configpcipowersave(struct ath_hw *ah, int restore, int power_off)
struct net80211_channel * chan
int ath_drain_all_txq(struct ath_softc *sc, int retry_tx)
void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan __unused)
#define SC_OP_PREAMBLE_SHORT
static int ath9k_start(struct net80211_device *dev)
void ath9k_tasklet(struct ath_softc *sc)
struct net80211_device * dev
static void ath_hw_pll_rx_hang_check(struct ath_softc *sc, u32 pll_sqsum)
Operations that must be implemented by an 802.11 driver.
void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
void ath_hw_cycle_counters_update(struct ath_common *common)
ath_hw_cycle_counters_update - common function to update cycle counters
void * memcpy(void *dest, const void *src, size_t len) __nonnull
int ath9k_hw_reset_calvalid(struct ath_hw *ah)
u16 hw_value
Hardware channel value.
void(* tx_complete_work)(struct ath_softc *sc)
void ath_ani_calibrate(struct ath_softc *sc)
u8 maxpower
Maximum allowable transmit power, in dBm.
static void ath9k_irq(struct net80211_device *dev, int enable)
#define __unused
Declare a variable or data structure as unused.
#define ATH_LONG_CALINTERVAL_INT
void ath9k_hw_set_gpio(struct ath_hw *ah, u32 gpio, u32 val)
void ath_radio_disable(struct ath_softc *sc, struct net80211_device *dev)
int ath9k_hw_intrpend(struct ath_hw *ah)
void ath9k_hw_set_interrupts(struct ath_hw *ah, unsigned int ints)
uint16_t count
Number of entries.
void(* hw_pll_work)(struct ath_softc *sc)
struct ath9k_ops_config config
uint32_t channel
RNDIS channel.
uint64_t timestamp
Timestamp.
struct ath9k_channel * ath9k_cmn_get_curchannel(struct net80211_device *dev, struct ath_hw *ah)
int ath9k_hw_phy_disable(struct ath_hw *ah)
int(* transmit)(struct net80211_device *dev, struct io_buffer *iobuf)
Transmit packet on 802.11 network device.
void ath9k_hw_disable_interrupts(struct ath_hw *ah)
#define ATH_RSSI_DUMMY_MARKER
#define NET80211_BAND_5GHZ
The band from 4.9 GHz to 5.7 GHz, which tends to be more restricted.
void * priv
Driver private data.
#define NET80211_PHY_USE_SHORT_PREAMBLE
Whether to use 802.11b short preamble operation.
#define NET80211_PHY_USE_PROTECTION
Whether to use RTS/CTS or CTS-to-self protection for transmissions.
static int ath_update_survey_stats(struct ath_softc *sc)
u16 center_freq
The center frequency for this channel.
void ath9k_cmn_update_ichannel(struct ath9k_channel *ichan, struct net80211_channel *chan)
#define NET80211_CFG_PHY_PARAMS
Low-level link parameters (short preamble, protection, etc) have changed.
#define NET80211_ASSOCIATED
Whether we have successfully associated with the network.
void ath9k_hw_cfg_gpio_input(struct ath_hw *ah, u32 gpio)
Structure encapsulating the complete state of an 802.11 device.
int ath_reset(struct ath_softc *sc, int retry_tx)
static void ath9k_poll(struct net80211_device *dev)
#define ATH9K_NUM_TX_QUEUES
static struct ath_common * ath9k_hw_common(struct ath_hw *ah)
static int ath9k_hw_calibrate(struct ath_hw *ah, struct ath9k_channel *chan, u8 rxchainmask, int longcal)
int ath9k_hw_updatetxtriglevel(struct ath_hw *ah, int bIncTrigLevel)
ath9k_hw_updatetxtriglevel - adjusts the frame trigger level
unsigned int hw_busy_count
static int ath9k_config(struct net80211_device *dev, int changed)
struct ib_cm_common common
u16 rates[NET80211_MAX_RATES]
A list of all possible TX rates we might use.
unsigned long hw_pll_work_timer
#define ATH_LONG_CALINTERVAL
struct net80211_device * dev
int phy_flags
Physical layer options.
static void ath9k_bss_iter(struct ath_softc *sc)
#define PS_WAIT_FOR_BEACON
int ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode)
static int ath9k_tx(struct net80211_device *dev, struct io_buffer *iob)
int ath_startrecv(struct ath_softc *sc)
#define NET80211_MAX_RATES
The maximum number of TX rates we allow to be configured simultaneously.
int ath_set_channel(struct ath_softc *sc, struct net80211_device *dev, struct ath9k_channel *hchan)
struct ath9k_hw_cal_data caldata
void ath_hw_check(struct ath_softc *sc)
#define EIO
Input/output error.
void ath_hw_pll_work(struct ath_softc *sc)
struct net80211_channel channels[NET80211_MAX_CHANNELS]
A list of all possible channels we might use.
void ath_flushrecv(struct ath_softc *sc)
int ath9k_hw_check_alive(struct ath_hw *ah)
#define NET80211_CFG_RATE
Requested transmission rate (dev->rate) has changed.
struct survey_info survey[ATH9K_NUM_CHANNELS]
void(* intr_tq)(struct ath_softc *sc)
static void ath9k_stop(struct net80211_device *dev)
#define NET80211_CFG_CHANNEL
Channel choice (dev->channel) or regulatory parameters have changed.
struct ath9k_legacy_rate rates[NET80211_MAX_RATES]
struct net80211_device * dev
#define SC_OP_PROTECT_ENABLE
struct ath9k_channel channels[ATH9K_NUM_CHANNELS]
u16 state
State of our association to the network.
int ath_stoprecv(struct ath_softc *sc)
unsigned long currticks(void)
Get current system time in ticks.
#define DBG(...)
Print a debugging message.
struct ath_txq * txq_map[WME_NUM_AC]
#define NULL
NULL pointer (VOID *)
void ath_isr(struct net80211_device *dev)
static void ath9k_bss_info_changed(struct net80211_device *dev, u32 changed)
#define NET80211_CFG_ASSOC
Association has been established with a new BSS (dev->bssid)
u8 rate
The rate currently in use, as an index into the rates array.
if(natsemi->flags &NATSEMI_64BIT) return 1
void * memset(void *dest, int character, size_t len) __nonnull
static void ath9k_config_bss(struct ath_softc *sc)
static const uint8_t r[3][4]
MD4 shift amounts.