linux/drivers/net/wireless/ath/ath9k/calib.h

/*
 * Copyright (c) 2008-2011 Atheros Communications Inc.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#ifndef CALIB_H
#define CALIB_H

#include "hw.h"

#define AR_PHY_CCA_FILTERWINDOW_LENGTH

/* Internal noise floor can vary by about 6db depending on the frequency */
#define ATH9K_NF_CAL_NOISE_THRESH

#define NUM_NF_READINGS
#define ATH9K_NF_CAL_HIST_MAX

struct ar5416IniArray {};

#define STATIC_INI_ARRAY(array)

#define INIT_INI_ARRAY(iniarray, array)

#define INI_RA(iniarray, row, column)

#define INIT_CAL(_perCal)

#define INSERT_CAL(_ahp, _perCal)

enum ath9k_cal_state {};

#define MIN_CAL_SAMPLES
#define MAX_CAL_SAMPLES
#define INIT_LOG_COUNT
#define PER_MIN_LOG_COUNT
#define PER_MAX_LOG_COUNT

struct ath9k_percal_data {};

struct ath9k_cal_list {};

struct ath9k_nfcal_hist {};

#define MAX_PACAL_SKIPCOUNT
struct ath9k_pacal_info{};

bool ath9k_hw_reset_calvalid(struct ath_hw *ah);
void ath9k_hw_start_nfcal(struct ath_hw *ah, bool update);
int ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan);
bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan);
void ath9k_init_nfcal_hist_buffer(struct ath_hw *ah,
				  struct ath9k_channel *chan);
void ath9k_hw_bstuck_nfcal(struct ath_hw *ah);
void ath9k_hw_reset_calibration(struct ath_hw *ah,
				struct ath9k_cal_list *currCal);
s16 ath9k_hw_getchan_noise(struct ath_hw *ah, struct ath9k_channel *chan,
			   s16 nf);


#endif /* CALIB_H */