Path: blob/main/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_stub.c
48526 views
/*1* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting2* Copyright (c) 2002-2008 Atheros Communications, Inc.3*4* Permission to use, copy, modify, and/or distribute this software for any5* purpose with or without fee is hereby granted, provided that the above6* copyright notice and this permission notice appear in all copies.7*8* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES9* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF10* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR11* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES12* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN13* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF14* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.15*16* $FreeBSD: head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c 235972 2012-05-25 05:01:27Z adrian $17*/18#include "opt_ah.h"1920#include "ah.h"21#include "ah_internal.h"22#include "ah_devid.h"2324#include "ar9300/ar9300.h"25#include "ar9300/ar9300reg.h"26#include "ar9300/ar9300phy.h"2728#include "ar9300/ar9300_stub.h"29#include "ar9300/ar9300_stub_funcs.h"3031void32ar9300_set_stub_functions(struct ath_hal *ah)33{3435// ath_hal_printf(ah, "%s: setting stub functions\n", __func__);3637ah->ah_getRateTable = ar9300_Stub_GetRateTable;38// ah->ah_detach = ar9300_Stub_detach;3940/* Reset Functions */41ah->ah_reset = ar9300_Stub_Reset;42ah->ah_phyDisable = ar9300_Stub_PhyDisable;43ah->ah_disable = ar9300_Stub_Disable;44ah->ah_configPCIE = ar9300_Stub_ConfigPCIE;45ah->ah_disablePCIE = ar9300_Stub_DisablePCIE;46ah->ah_setPCUConfig = ar9300_Stub_SetPCUConfig;47ah->ah_perCalibration = ar9300_Stub_PerCalibration;48ah->ah_perCalibrationN = ar9300_Stub_PerCalibrationN;49ah->ah_resetCalValid = ar9300_Stub_ResetCalValid;50ah->ah_setTxPowerLimit = ar9300_Stub_SetTxPowerLimit;51ah->ah_getChanNoise = ath_hal_getChanNoise;5253/* Transmit functions */54ah->ah_updateTxTrigLevel = ar9300_Stub_UpdateTxTrigLevel;55ah->ah_setupTxQueue = ar9300_Stub_SetupTxQueue;56ah->ah_setTxQueueProps = ar9300_Stub_SetTxQueueProps;57ah->ah_getTxQueueProps = ar9300_Stub_GetTxQueueProps;58ah->ah_releaseTxQueue = ar9300_Stub_ReleaseTxQueue;59ah->ah_resetTxQueue = ar9300_Stub_ResetTxQueue;60ah->ah_getTxDP = ar9300_Stub_GetTxDP;61ah->ah_setTxDP = ar9300_Stub_SetTxDP;62ah->ah_numTxPending = ar9300_Stub_NumTxPending;63ah->ah_startTxDma = ar9300_Stub_StartTxDma;64ah->ah_stopTxDma = ar9300_Stub_StopTxDma;65ah->ah_setupTxDesc = ar9300_Stub_SetupTxDesc;66ah->ah_setupXTxDesc = ar9300_Stub_SetupXTxDesc;67ah->ah_fillTxDesc = ar9300_Stub_FillTxDesc;68ah->ah_procTxDesc = ar9300_Stub_ProcTxDesc;69ah->ah_getTxIntrQueue = ar9300_Stub_GetTxIntrQueue;70ah->ah_reqTxIntrDesc = ar9300_Stub_IntrReqTxDesc;71ah->ah_getTxCompletionRates = ar9300_Stub_GetTxCompletionRates;7273/* RX Functions */74ah->ah_getRxDP = ar9300_Stub_GetRxDP;75ah->ah_setRxDP = ar9300_Stub_SetRxDP;76ah->ah_enableReceive = ar9300_Stub_EnableReceive;77ah->ah_stopDmaReceive = ar9300_Stub_StopDmaReceive;78ah->ah_startPcuReceive = ar9300_Stub_StartPcuReceive;79ah->ah_stopPcuReceive = ar9300_Stub_StopPcuReceive;80ah->ah_setMulticastFilter = ar9300_Stub_SetMulticastFilter;81ah->ah_setMulticastFilterIndex = ar9300_Stub_SetMulticastFilterIndex;82ah->ah_clrMulticastFilterIndex = ar9300_Stub_ClrMulticastFilterIndex;83ah->ah_getRxFilter = ar9300_Stub_GetRxFilter;84ah->ah_setRxFilter = ar9300_Stub_SetRxFilter;85ah->ah_setupRxDesc = ar9300_Stub_SetupRxDesc;86ah->ah_procRxDesc = ar9300_Stub_ProcRxDesc;87ah->ah_rxMonitor = ar9300_Stub_RxMonitor;88ah->ah_aniPoll = ar9300_Stub_AniPoll;89ah->ah_procMibEvent = ar9300_Stub_ProcessMibIntr;9091/* Misc Functions */92ah->ah_getCapability = ar9300_Stub_GetCapability;93ah->ah_setCapability = ar9300_Stub_SetCapability;94ah->ah_getDiagState = ar9300_Stub_GetDiagState;95ah->ah_getMacAddress = ar9300_Stub_GetMacAddress;96ah->ah_setMacAddress = ar9300_Stub_SetMacAddress;97ah->ah_getBssIdMask = ar9300_Stub_GetBssIdMask;98ah->ah_setBssIdMask = ar9300_Stub_SetBssIdMask;99ah->ah_setRegulatoryDomain = ar9300_Stub_SetRegulatoryDomain;100ah->ah_setLedState = ar9300_Stub_SetLedState;101ah->ah_writeAssocid = ar9300_Stub_WriteAssocid;102ah->ah_gpioCfgInput = ar9300_Stub_GpioCfgInput;103ah->ah_gpioCfgOutput = ar9300_Stub_GpioCfgOutput;104ah->ah_gpioGet = ar9300_Stub_GpioGet;105ah->ah_gpioSet = ar9300_Stub_GpioSet;106ah->ah_gpioSetIntr = ar9300_Stub_GpioSetIntr;107ah->ah_getTsf32 = ar9300_Stub_GetTsf32;108ah->ah_getTsf64 = ar9300_Stub_GetTsf64;109ah->ah_resetTsf = ar9300_Stub_ResetTsf;110ah->ah_detectCardPresent = ar9300_Stub_DetectCardPresent;111ah->ah_updateMibCounters = ar9300_Stub_UpdateMibCounters;112ah->ah_getRfGain = ar9300_Stub_GetRfgain;113ah->ah_getDefAntenna = ar9300_Stub_GetDefAntenna;114ah->ah_setDefAntenna = ar9300_Stub_SetDefAntenna;115ah->ah_getAntennaSwitch = ar9300_Stub_GetAntennaSwitch;116ah->ah_setAntennaSwitch = ar9300_Stub_SetAntennaSwitch;117ah->ah_setSifsTime = ar9300_Stub_SetSifsTime;118ah->ah_getSifsTime = ar9300_Stub_GetSifsTime;119ah->ah_setSlotTime = ar9300_Stub_SetSlotTime;120ah->ah_getSlotTime = ar9300_Stub_GetSlotTime;121ah->ah_setAckTimeout = ar9300_Stub_SetAckTimeout;122ah->ah_getAckTimeout = ar9300_Stub_GetAckTimeout;123ah->ah_setAckCTSRate = ar9300_Stub_SetAckCTSRate;124ah->ah_getAckCTSRate = ar9300_Stub_GetAckCTSRate;125ah->ah_setCTSTimeout = ar9300_Stub_SetCTSTimeout;126ah->ah_getCTSTimeout = ar9300_Stub_GetCTSTimeout;127ah->ah_setDecompMask = ar9300_Stub_SetDecompMask;128ah->ah_setCoverageClass = ar9300_Stub_SetCoverageClass;129ah->ah_setQuiet = ar9300_Stub_SetQuiet;130ah->ah_getMibCycleCounts = ar9300_Stub_GetMibCycleCounts;131132/* DFS Functions */133ah->ah_enableDfs = ar9300_Stub_EnableDfs;134ah->ah_getDfsThresh = ar9300_Stub_GetDfsThresh;135ah->ah_procRadarEvent = ar9300_Stub_ProcessRadarEvent;136ah->ah_isFastClockEnabled = ar9300_Stub_IsFastClockEnabled;137ah->ah_get11nExtBusy = ar9300_Stub_Get11nExtBusy;138139/* Key Cache Functions */140ah->ah_getKeyCacheSize = ar9300_Stub_GetKeyCacheSize;141ah->ah_resetKeyCacheEntry = ar9300_Stub_ResetKeyCacheEntry;142ah->ah_isKeyCacheEntryValid = ar9300_Stub_IsKeyCacheEntryValid;143ah->ah_setKeyCacheEntry = ar9300_Stub_SetKeyCacheEntry;144ah->ah_setKeyCacheEntryMac = ar9300_Stub_SetKeyCacheEntryMac;145146/* Power Management Functions */147ah->ah_setPowerMode = ar9300_Stub_SetPowerMode;148ah->ah_getPowerMode = ar9300_Stub_GetPowerMode;149150/* Beacon Functions */151ah->ah_setBeaconTimers = ar9300_Stub_SetBeaconTimers;152ah->ah_beaconInit = ar9300_Stub_BeaconInit;153ah->ah_setStationBeaconTimers = ar9300_Stub_SetStaBeaconTimers;154ah->ah_resetStationBeaconTimers = ar9300_Stub_ResetStaBeaconTimers;155ah->ah_getNextTBTT = ar9300_Stub_GetNextTBTT;156157/* Interrupt Functions */158ah->ah_isInterruptPending = ar9300_Stub_IsInterruptPending;159ah->ah_getPendingInterrupts = ar9300_Stub_GetPendingInterrupts;160ah->ah_getInterrupts = ar9300_Stub_GetInterrupts;161ah->ah_setInterrupts = ar9300_Stub_SetInterrupts;162163AH_PRIVATE(ah)->ah_getChannelEdges = ar9300_Stub_GetChannelEdges;164AH_PRIVATE(ah)->ah_getWirelessModes = ar9300_Stub_GetWirelessModes;165AH_PRIVATE(ah)->ah_eepromRead = ar9300_Stub_EepromRead;166#ifdef AH_SUPPORT_WRITE_EEPROM167AH_PRIVATE(ah)->ah_eepromWrite = ar9300_Stub_EepromWrite;168#endif169AH_PRIVATE(ah)->ah_getChipPowerLimits = ar9300_Stub_GetChipPowerLimits;170}171172173