- Add a iwpriv function that dumps a mapping of nasty obfuscated

symbol names to their corresponding HAL function names (ah.h) 
- Add a script to generate a SED script from the current HAL (ah.h)
    that will replace instances of obfuscated names with the correct names.
- Add the SED script for cleaning up text containing obfuscated function names for the current HAL


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3244 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
mtaylor 2008-01-25 00:29:30 +00:00
parent 8f5e980418
commit 77d9f966c0
11 changed files with 602 additions and 94 deletions

View File

@ -342,6 +342,8 @@ static void ath_set_txcont_power(struct ieee80211com *, unsigned int);
static unsigned int ath_get_txcont_rate(struct ieee80211com *);
static void ath_set_txcont_rate(struct ieee80211com *ic, unsigned int new_rate);
static unsigned int ath_dump_hal_map(struct ieee80211com *ic);
static u_int32_t ath_get_clamped_maxtxpower(struct ath_softc *sc);
static u_int32_t ath_set_clamped_maxtxpower(struct ath_softc *sc,
u_int32_t new_clamped_maxtxpower);
@ -1049,6 +1051,7 @@ ath_attach(u_int16_t devid, struct net_device *dev, HAL_BUS_TAG tag)
ic->ic_vap_create = ath_vap_create;
ic->ic_vap_delete = ath_vap_delete;
ic->ic_dump_hal_map = ath_dump_hal_map;
ic->ic_set_txcont = ath_set_txcont;
ic->ic_get_txcont = ath_get_txcont;
@ -12068,6 +12071,16 @@ ath_registers_dump(struct ieee80211com *ic)
}
#endif /* #ifdef ATH_REVERSE_ENGINEERING */
/* This is called by a private ioctl (iwpriv) to dump the HAL obfuscation table */
static unsigned int
ath_dump_hal_map(struct ieee80211com *ic)
{
struct net_device *dev = ic->ic_dev;
struct ath_softc *sc = dev->priv;
ath_hal_dump_map(sc->sc_ah);
return 0;
}
/* Make a copy of significant registers in the Atheros chip for later
* comparison and dump with ath_registers_dump_delta */
#ifdef ATH_REVERSE_ENGINEERING

View File

@ -38,6 +38,9 @@
* ************************************************************** */
#include "if_ath_hal_macros.h"
#ifdef CONFIG_KALLSYMS
#include "linux/kallsyms.h"
#endif /* #ifdef CONFIG_KALLSYMS */
#ifndef _IF_ATH_HAL_H_
#define _IF_ATH_HAL_H_
@ -63,13 +66,16 @@ static inline HAL_POWER_MODE ath_hal_getPowerMode(struct ath_hal *ah)
}
static inline HAL_BOOL ath_hal_getdiagstate(struct ath_hal *ah, int request,
const void *args, u_int32_t argsize, void **result,
const void *args, u_int32_t argsize,
void **result,
u_int32_t *resultsize)
{
HAL_BOOL ret;
ATH_HAL_LOCK_IRQ(ah->ah_sc);
ath_hal_set_function(__func__);
ret = ah->ah_getDiagState(ah, request, args, argsize, *result, resultsize);
ret =
ah->ah_getDiagState(ah, request, args, argsize, *result,
resultsize);
ath_hal_set_function(NULL);
ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
return ret;
@ -193,7 +199,8 @@ static inline HAL_BOOL ath_hal_puttxbuf(struct ath_hal *ah, u_int a1,
}
static inline HAL_BOOL ath_hal_keyset(struct ath_hal *ah, u_int16_t a1,
const HAL_KEYVAL *a2, const u_int8_t *a3, int a4)
const HAL_KEYVAL *a2, const u_int8_t *a3,
int a4)
{
HAL_BOOL ret;
ATH_HAL_LOCK_IRQ(ah->ah_sc);
@ -224,8 +231,8 @@ static inline HAL_RFGAIN ath_hal_getrfgain(struct ath_hal *ah)
return ret;
}
static inline void ath_hal_setmcastfilter(struct ath_hal *ah,
u_int32_t filter0, u_int32_t filter1)
static inline void ath_hal_setmcastfilter(struct ath_hal *ah, u_int32_t filter0,
u_int32_t filter1)
{
ATH_HAL_LOCK_IRQ(ah->ah_sc);
ath_hal_set_function(__func__);
@ -321,7 +328,8 @@ static inline HAL_BOOL ath_hal_keysetmac(struct ath_hal *ah, u_int16_t a1,
}
static inline HAL_STATUS ath_hal_txprocdesc(struct ath_hal *ah,
struct ath_desc *a1, struct ath_tx_status *a2)
struct ath_desc *a1,
struct ath_tx_status *a2)
{
HAL_STATUS ret;
ATH_HAL_LOCK_IRQ(ah->ah_sc);
@ -445,7 +453,8 @@ static inline void ath_hal_putrxbuf(struct ath_hal *ah, u_int32_t rxdp)
}
static inline HAL_BOOL ath_hal_reset(struct ath_hal *ah, HAL_OPMODE a1,
HAL_CHANNEL *a2, HAL_BOOL bChannelChange, HAL_STATUS *status)
HAL_CHANNEL *a2, HAL_BOOL bChannelChange,
HAL_STATUS *status)
{
HAL_BOOL ret;
ATH_HAL_LOCK_IRQ(ah->ah_sc);
@ -481,8 +490,9 @@ static inline HAL_BOOL ath_hal_gettxqueueprops(struct ath_hal *ah, int q,
}
static inline HAL_BOOL ath_hal_filltxdesc(struct ath_hal *ah,
struct ath_desc *a1, u_int segLen, HAL_BOOL firstSeg,
HAL_BOOL lastSeg, const struct ath_desc *a5)
struct ath_desc *a1, u_int segLen,
HAL_BOOL firstSeg, HAL_BOOL lastSeg,
const struct ath_desc *a5)
{
HAL_BOOL ret;
ATH_HAL_LOCK_IRQ(ah->ah_sc);
@ -522,8 +532,8 @@ static inline void ath_hal_setdefantenna(struct ath_hal *ah, u_int a1)
ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
}
static inline HAL_BOOL ath_hal_setpower(struct ath_hal *ah,
HAL_POWER_MODE mode, int setChip)
static inline HAL_BOOL ath_hal_setpower(struct ath_hal *ah, HAL_POWER_MODE mode,
int setChip)
{
HAL_BOOL ret;
ATH_HAL_LOCK_IRQ(ah->ah_sc);
@ -535,8 +545,11 @@ static inline HAL_BOOL ath_hal_setpower(struct ath_hal *ah,
}
static inline HAL_STATUS ath_hal_rxprocdesc(struct ath_hal *ah,
struct ath_desc *a1, u_int32_t phyAddr, struct ath_desc *next,
u_int64_t tsf, struct ath_rx_status *a5)
struct ath_desc *a1,
u_int32_t phyAddr,
struct ath_desc *next,
u_int64_t tsf,
struct ath_rx_status *a5)
{
HAL_STATUS ret;
ATH_HAL_LOCK_IRQ(ah->ah_sc);
@ -570,13 +583,16 @@ static inline u_int32_t ath_hal_keycachesize(struct ath_hal *ah)
}
static inline HAL_BOOL ath_hal_setupxtxdesc(struct ath_hal *ah,
struct ath_desc *a1, u_int txRate1, u_int txTries1,
u_int txRate2, u_int txTries2, u_int txRate3, u_int txTries3)
struct ath_desc *a1, u_int txRate1,
u_int txTries1, u_int txRate2,
u_int txTries2, u_int txRate3,
u_int txTries3)
{
HAL_BOOL ret;
ATH_HAL_LOCK_IRQ(ah->ah_sc);
ath_hal_set_function(__func__);
ret = ah->ah_setupXTxDesc(ah, a1, txRate1, txTries1, txRate2, txTries2,
ret =
ah->ah_setupXTxDesc(ah, a1, txRate1, txTries1, txRate2, txTries2,
txRate3, txTries3);
ath_hal_set_function(NULL);
ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
@ -749,7 +765,8 @@ static inline void ath_hal_setbeacontimers(struct ath_hal *ah,
}
static inline HAL_STATUS ath_hal_getcapability(struct ath_hal *ah,
HAL_CAPABILITY_TYPE a1, u_int32_t capability,
HAL_CAPABILITY_TYPE a1,
u_int32_t capability,
u_int32_t *result)
{
HAL_STATUS ret;
@ -844,8 +861,8 @@ static inline void ath_hal_setledstate(struct ath_hal *ah, HAL_LED_STATE a1)
ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
}
static inline void ath_hal_setassocid(struct ath_hal *ah,
const u_int8_t *bssid, u_int16_t assocId)
static inline void ath_hal_setassocid(struct ath_hal *ah, const u_int8_t *bssid,
u_int16_t assocId)
{
ATH_HAL_LOCK_IRQ(ah->ah_sc);
ath_hal_set_function(__func__);
@ -864,7 +881,8 @@ static inline void ath_hal_resettsf(struct ath_hal *ah)
}
static inline HAL_BOOL ath_hal_setuprxdesc(struct ath_hal *ah,
struct ath_desc *a1, u_int32_t size, u_int flags)
struct ath_desc *a1, u_int32_t size,
u_int flags)
{
HAL_BOOL ret;
ATH_HAL_LOCK_IRQ(ah->ah_sc);
@ -916,7 +934,8 @@ static inline HAL_BOOL ath_hal_stoptxdma(struct ath_hal *ah, u_int a1)
}
static inline HAL_BOOL ath_hal_setcapability(struct ath_hal *ah,
HAL_CAPABILITY_TYPE a1, u_int32_t capability,
HAL_CAPABILITY_TYPE a1,
u_int32_t capability,
u_int32_t setting, HAL_STATUS *a4)
{
HAL_BOOL ret;
@ -997,17 +1016,22 @@ static inline HAL_BOOL ath_hal_setregulatorydomain(struct ath_hal *ah,
}
static inline HAL_BOOL ath_hal_setuptxdesc(struct ath_hal *ah,
struct ath_desc *a1, u_int pktLen, u_int hdrLen,
HAL_PKT_TYPE type, u_int txPower, u_int txRate0,
u_int txTries0, u_int keyIx, u_int antMode, u_int flags,
u_int rtsctsRate, u_int rtsctsDuration, u_int compicvLen,
u_int compivLen, u_int comp)
struct ath_desc *a1, u_int pktLen,
u_int hdrLen, HAL_PKT_TYPE type,
u_int txPower, u_int txRate0,
u_int txTries0, u_int keyIx,
u_int antMode, u_int flags,
u_int rtsctsRate,
u_int rtsctsDuration,
u_int compicvLen, u_int compivLen,
u_int comp)
{
HAL_BOOL ret;
ATH_HAL_LOCK_IRQ(ah->ah_sc);
ath_hal_set_function(__func__);
ret = ah->ah_setupTxDesc(ah, a1, pktLen, hdrLen, type, txPower,
txRate0, txTries0, keyIx, antMode, flags, rtsctsRate,
ret =
ah->ah_setupTxDesc(ah, a1, pktLen, hdrLen, type, txPower, txRate0,
txTries0, keyIx, antMode, flags, rtsctsRate,
rtsctsDuration, compicvLen, compivLen, comp);
ath_hal_set_function(NULL);
ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
@ -1047,6 +1071,281 @@ static inline HAL_BOOL ath_hal_disable(struct ath_hal *ah)
return ret;
}
/* Example script to create a HAL function unmangling SED script:
dmesg -c &>/dev/null && iwpriv ath0 dump_hal_map && dmesg | \
sed -n -r -e "/zz[0-9a-f]{8}/ { s~^([^+]*)[^=]*=(.*)~s/\1\/\2 (\1)/g~; p; } " \
>hal_unmangle.sed
* Example usage:
tail -f /var/log/messages | sed -f hal_unmangle.sed
*/
static inline void ath_hal_dump_map(struct ath_hal *ah)
{
#ifdef CONFIG_KALLSYMS
/* void ah_getMacAddress(struct ath_hal *ah, u_int8_t *a1) */
__print_symbol("%s=ah_getMacAddress\n",
(unsigned long)ah->ah_getMacAddress);
/* HAL_POWER_MODE ah_getPowerMode(struct ath_hal *ah) */
__print_symbol("%s=ah_getPowerMode\n",
(unsigned long)ah->ah_getPowerMode);
/* HAL_BOOL ah_getDiagState(struct ath_hal *ah, int request, const void *args, u_int32_t argsize, void **result, u_int32_t *resultsize) */
__print_symbol("%s=ah_getDiagState\n",
(unsigned long)ah->ah_getDiagState);
/* void ah_resetStationBeaconTimers(struct ath_hal *ah) */
__print_symbol("%s=ah_resetStationBeaconTimers\n",
(unsigned long)ah->ah_resetStationBeaconTimers);
/* void ah_setCoverageClass(struct ath_hal *ah, u_int8_t a1, int a2) */
__print_symbol("%s=ah_setCoverageClass\n",
(unsigned long)ah->ah_setCoverageClass);
/* u_int64_t ah_getTsf64(struct ath_hal *ah) */
__print_symbol("%s=ah_getTsf64\n", (unsigned long)ah->ah_getTsf64);
/* void ah_enableReceive(struct ath_hal *ah) */
__print_symbol("%s=ah_enableReceive\n",
(unsigned long)ah->ah_enableReceive);
/* HAL_ANT_SETTING ah_getAntennaSwitch(struct ath_hal *ah) */
__print_symbol("%s=ah_getAntennaSwitch\n",
(unsigned long)ah->ah_getAntennaSwitch);
/* HAL_BOOL ah_gpioSet(struct ath_hal *ah, u_int32_t gpio, u_int32_t val) */
__print_symbol("%s=ah_gpioSet\n", (unsigned long)ah->ah_gpioSet);
/* HAL_BOOL ah_gpioCfgOutput(struct ath_hal *ah, u_int32_t gpio) */
__print_symbol("%s=ah_gpioCfgOutput\n",
(unsigned long)ah->ah_gpioCfgOutput);
/* HAL_BOOL ah_clrMulticastFilterIndex(struct ath_hal *ah, u_int32_t index) */
__print_symbol("%s=ah_clrMulticastFilterIndex\n",
(unsigned long)ah->ah_clrMulticastFilterIndex);
/* void ah_reqTxIntrDesc(struct ath_hal *ah, struct ath_desc *a1) */
__print_symbol("%s=ah_reqTxIntrDesc\n",
(unsigned long)ah->ah_reqTxIntrDesc);
/* void ah_rxMonitor(struct ath_hal *ah, const HAL_NODE_STATS *a1, HAL_CHANNEL *a2) */
__print_symbol("%s=ah_rxMonitor\n", (unsigned long)ah->ah_rxMonitor);
/* HAL_BOOL ah_setTxDP(struct ath_hal *ah, u_int a1, u_int32_t txdp) */
__print_symbol("%s=ah_setTxDP\n", (unsigned long)ah->ah_setTxDP);
/* HAL_BOOL ah_setKeyCacheEntry(struct ath_hal *ah, u_int16_t a1, const HAL_KEYVAL *a2, const u_int8_t *a3, int a4) */
__print_symbol("%s=ah_setKeyCacheEntry\n",
(unsigned long)ah->ah_setKeyCacheEntry);
/* void ah_setPCUConfig(struct ath_hal *ah) */
__print_symbol("%s=ah_setPCUConfig\n",
(unsigned long)ah->ah_setPCUConfig);
/* HAL_RFGAIN ah_getRfGain(struct ath_hal *ah) */
__print_symbol("%s=ah_getRfGain\n", (unsigned long)ah->ah_getRfGain);
/* void ah_setMulticastFilter(struct ath_hal *ah, u_int32_t filter0, u_int32_t filter1) */
__print_symbol("%s=ah_setMulticastFilter\n",
(unsigned long)ah->ah_setMulticastFilter);
/* u_int ah_getAckTimeout(struct ath_hal *ah) */
__print_symbol("%s=ah_getAckTimeout\n",
(unsigned long)ah->ah_getAckTimeout);
/* void ah_setStationBeaconTimers(struct ath_hal *ah, const HAL_BEACON_STATE *a1) */
__print_symbol("%s=ah_setStationBeaconTimers\n",
(unsigned long)ah->ah_setStationBeaconTimers);
/* HAL_BOOL ah_detectCardPresent(struct ath_hal *ah) */
__print_symbol("%s=ah_detectCardPresent\n",
(unsigned long)ah->ah_detectCardPresent);
/* u_int ah_getSlotTime(struct ath_hal *ah) */
__print_symbol("%s=ah_getSlotTime\n",
(unsigned long)ah->ah_getSlotTime);
/* void ah_beaconInit(struct ath_hal *ah, u_int32_t nexttbtt, u_int32_t intval) */
__print_symbol("%s=ah_beaconInit\n", (unsigned long)ah->ah_beaconInit);
/* void ah_gpioSetIntr(struct ath_hal *ah, u_int a1, u_int32_t a2) */
__print_symbol("%s=ah_gpioSetIntr\n",
(unsigned long)ah->ah_gpioSetIntr);
/* HAL_BOOL ah_releaseTxQueue(struct ath_hal *ah, u_int q) */
__print_symbol("%s=ah_releaseTxQueue\n",
(unsigned long)ah->ah_releaseTxQueue);
/* HAL_BOOL ah_setKeyCacheEntryMac(struct ath_hal *ah, u_int16_t a1, const u_int8_t *a2) */
__print_symbol("%s=ah_setKeyCacheEntryMac\n",
(unsigned long)ah->ah_setKeyCacheEntryMac);
/* HAL_STATUS ah_procTxDesc(struct ath_hal *ah, struct ath_desc *a1, struct ath_tx_status *a2) */
__print_symbol("%s=ah_procTxDesc\n", (unsigned long)ah->ah_procTxDesc);
/* HAL_INT ah_getInterrupts(struct ath_hal *ah) */
__print_symbol("%s=ah_getInterrupts\n",
(unsigned long)ah->ah_getInterrupts);
/* HAL_BOOL ah_setAckTimeout(struct ath_hal *ah, u_int a1) */
__print_symbol("%s=ah_setAckTimeout\n",
(unsigned long)ah->ah_setAckTimeout);
/* HAL_BOOL ah_setBssIdMask(struct ath_hal *ah, const u_int8_t *a1) */
__print_symbol("%s=ah_setBssIdMask\n",
(unsigned long)ah->ah_setBssIdMask);
/* HAL_BOOL ah_setAckCTSRate(struct ath_hal *ah, u_int a1) */
__print_symbol("%s=ah_setAckCTSRate\n",
(unsigned long)ah->ah_setAckCTSRate);
/* u_int32_t ah_getRxFilter(struct ath_hal *ah) */
__print_symbol("%s=ah_getRxFilter\n",
(unsigned long)ah->ah_getRxFilter);
/* int16_t ah_getChanNoise(struct ath_hal *ah, HAL_CHANNEL *a1) */
__print_symbol("%s=ah_getChanNoise\n",
(unsigned long)ah->ah_getChanNoise);
/* HAL_BOOL ah_resetKeyCacheEntry(struct ath_hal *ah, u_int16_t a1) */
__print_symbol("%s=ah_resetKeyCacheEntry\n",
(unsigned long)ah->ah_resetKeyCacheEntry);
/* HAL_BOOL ah_setAntennaSwitch(struct ath_hal *ah, HAL_ANT_SETTING a1) */
__print_symbol("%s=ah_setAntennaSwitch\n",
(unsigned long)ah->ah_setAntennaSwitch);
/* HAL_BOOL ah_setTxQueueProps(struct ath_hal *ah, int q, const HAL_TXQ_INFO *qInfo) */
__print_symbol("%s=ah_setTxQueueProps\n",
(unsigned long)ah->ah_setTxQueueProps);
/* void ah_setRxDP(struct ath_hal *ah, u_int32_t rxdp) */
__print_symbol("%s=ah_setRxDP\n", (unsigned long)ah->ah_setRxDP);
/* HAL_BOOL ah_reset(struct ath_hal *ah, HAL_OPMODE a1, HAL_CHANNEL *a2, HAL_BOOL bChannelChange, HAL_STATUS *status) */
__print_symbol("%s=ah_reset\n", (unsigned long)ah->ah_reset);
/* HAL_BOOL ah_setDecompMask(struct ath_hal *ah, u_int16_t a1, int a2) */
__print_symbol("%s=ah_setDecompMask\n",
(unsigned long)ah->ah_setDecompMask);
/* HAL_BOOL ah_getTxQueueProps(struct ath_hal *ah, int q, HAL_TXQ_INFO *qInfo) */
__print_symbol("%s=ah_getTxQueueProps\n",
(unsigned long)ah->ah_getTxQueueProps);
/* HAL_BOOL ah_fillTxDesc(struct ath_hal *ah, struct ath_desc *a1, u_int segLen, HAL_BOOL firstSeg, HAL_BOOL lastSeg, const struct ath_desc *a5) */
__print_symbol("%s=ah_fillTxDesc\n", (unsigned long)ah->ah_fillTxDesc);
/* u_int32_t ah_numTxPending(struct ath_hal *ah, u_int q) */
__print_symbol("%s=ah_numTxPending\n",
(unsigned long)ah->ah_numTxPending);
/* void ah_startPcuReceive(struct ath_hal *ah) */
__print_symbol("%s=ah_startPcuReceive\n",
(unsigned long)ah->ah_startPcuReceive);
/* void ah_setDefAntenna(struct ath_hal *ah, u_int a1) */
__print_symbol("%s=ah_setDefAntenna\n",
(unsigned long)ah->ah_setDefAntenna);
/* HAL_BOOL ah_setPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode, int setChip) */
__print_symbol("%s=ah_setPowerMode\n",
(unsigned long)ah->ah_setPowerMode);
/* HAL_STATUS ah_procRxDesc(struct ath_hal *ah, struct ath_desc *a1, u_int32_t phyAddr, struct ath_desc *next, u_int64_t tsf, struct ath_rx_status *a5) */
__print_symbol("%s=ah_procRxDesc\n", (unsigned long)ah->ah_procRxDesc);
/* u_int ah_getAckCTSRate(struct ath_hal *ah) */
__print_symbol("%s=ah_getAckCTSRate\n",
(unsigned long)ah->ah_getAckCTSRate);
/* u_int32_t ah_getKeyCacheSize(struct ath_hal *ah) */
__print_symbol("%s=ah_getKeyCacheSize\n",
(unsigned long)ah->ah_getKeyCacheSize);
/* HAL_BOOL ah_setupXTxDesc(struct ath_hal *ah, struct ath_desc *a1, u_int txRate1, u_int txTries1, u_int txRate2, u_int txTries2, u_int txRate3, u_int txTries3) */
__print_symbol("%s=ah_setupXTxDesc\n",
(unsigned long)ah->ah_setupXTxDesc);
/* HAL_INT ah_setInterrupts(struct ath_hal *ah, HAL_INT a1) */
__print_symbol("%s=ah_setInterrupts\n",
(unsigned long)ah->ah_setInterrupts);
/* u_int ah_getCTSTimeout(struct ath_hal *ah) */
__print_symbol("%s=ah_getCTSTimeout\n",
(unsigned long)ah->ah_getCTSTimeout);
/* void ah_updateMibCounters(struct ath_hal *ah, HAL_MIB_STATS *a1) */
__print_symbol("%s=ah_updateMibCounters\n",
(unsigned long)ah->ah_updateMibCounters);
/* HAL_BOOL ah_perCalibration(struct ath_hal *ah, HAL_CHANNEL *a1, HAL_BOOL *a2) */
__print_symbol("%s=ah_perCalibration\n",
(unsigned long)ah->ah_perCalibration);
/* u_int32_t ah_getRxDP(struct ath_hal *ah) */
__print_symbol("%s=ah_getRxDP\n", (unsigned long)ah->ah_getRxDP);
/* HAL_BOOL ah_setTxPowerLimit(struct ath_hal *ah, u_int32_t a1) */
__print_symbol("%s=ah_setTxPowerLimit\n",
(unsigned long)ah->ah_setTxPowerLimit);
/* HAL_BOOL ah_getPendingInterrupts(struct ath_hal *ah, HAL_INT *a1) */
__print_symbol("%s=ah_getPendingInterrupts\n",
(unsigned long)ah->ah_getPendingInterrupts);
/* HAL_BOOL ah_updateTxTrigLevel(struct ath_hal *ah, HAL_BOOL incTrigLevel) */
__print_symbol("%s=ah_updateTxTrigLevel\n",
(unsigned long)ah->ah_updateTxTrigLevel);
/* HAL_BOOL ah_resetTxQueue(struct ath_hal *ah, u_int q) */
__print_symbol("%s=ah_resetTxQueue\n",
(unsigned long)ah->ah_resetTxQueue);
/* HAL_BOOL ah_setMacAddress(struct ath_hal *ah, const u_int8_t *a1) */
__print_symbol("%s=ah_setMacAddress\n",
(unsigned long)ah->ah_setMacAddress);
/* HAL_BOOL ah_setCTSTimeout(struct ath_hal *ah, u_int a1) */
__print_symbol("%s=ah_setCTSTimeout\n",
(unsigned long)ah->ah_setCTSTimeout);
/* const HAL_RATE_TABLE *ah_getRateTable(struct ath_hal *ah, u_int mode) */
__print_symbol("%s=ah_getRateTable\n",
(unsigned long)ah->ah_getRateTable);
/* u_int32_t ah_getTsf32(struct ath_hal *ah) */
__print_symbol("%s=ah_getTsf32\n", (unsigned long)ah->ah_getTsf32);
/* void ah_procMibEvent(struct ath_hal *ah, const HAL_NODE_STATS *a1) */
__print_symbol("%s=ah_procMibEvent\n",
(unsigned long)ah->ah_procMibEvent);
/* void ah_setBeaconTimers(struct ath_hal *ah, const HAL_BEACON_TIMERS *a1) */
__print_symbol("%s=ah_setBeaconTimers\n",
(unsigned long)ah->ah_setBeaconTimers);
/* HAL_STATUS ah_getCapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE a1, u_int32_t capability, u_int32_t *result) */
__print_symbol("%s=ah_getCapability\n",
(unsigned long)ah->ah_getCapability);
/* HAL_BOOL ah_radarWait(struct ath_hal *ah, HAL_CHANNEL *a1) */
__print_symbol("%s=ah_radarWait\n", (unsigned long)ah->ah_radarWait);
/* HAL_BOOL ah_setMulticastFilterIndex(struct ath_hal *ah, u_int32_t index) */
__print_symbol("%s=ah_setMulticastFilterIndex\n",
(unsigned long)ah->ah_setMulticastFilterIndex);
/* void ah_getBssIdMask(struct ath_hal *ah, u_int8_t *a1) */
__print_symbol("%s=ah_getBssIdMask\n",
(unsigned long)ah->ah_getBssIdMask);
/* HAL_BOOL ah_isInterruptPending(struct ath_hal *ah) */
__print_symbol("%s=ah_isInterruptPending\n",
(unsigned long)ah->ah_isInterruptPending);
/* HAL_BOOL ah_startTxDma(struct ath_hal *ah, u_int a1) */
__print_symbol("%s=ah_startTxDma\n", (unsigned long)ah->ah_startTxDma);
/* void ah_getTxIntrQueue(struct ath_hal *ah, u_int32_t *a1) */
__print_symbol("%s=ah_getTxIntrQueue\n",
(unsigned long)ah->ah_getTxIntrQueue);
/* HAL_BOOL ah_setSlotTime(struct ath_hal *ah, u_int a1) */
__print_symbol("%s=ah_setSlotTime\n",
(unsigned long)ah->ah_setSlotTime);
/* void ah_setLedState(struct ath_hal *ah, HAL_LED_STATE a1) */
__print_symbol("%s=ah_setLedState\n",
(unsigned long)ah->ah_setLedState);
/* void ah_writeAssocid(struct ath_hal *ah, const u_int8_t *bssid, u_int16_t assocId) */
__print_symbol("%s=ah_writeAssocid\n",
(unsigned long)ah->ah_writeAssocid);
/* void ah_resetTsf(struct ath_hal *ah) */
__print_symbol("%s=ah_resetTsf\n", (unsigned long)ah->ah_resetTsf);
/* HAL_BOOL ah_setupRxDesc(struct ath_hal *ah, struct ath_desc *a1, u_int32_t size, u_int flags) */
__print_symbol("%s=ah_setupRxDesc\n",
(unsigned long)ah->ah_setupRxDesc);
/* void ah_setRxFilter(struct ath_hal *ah, u_int32_t a1) */
__print_symbol("%s=ah_setRxFilter\n",
(unsigned long)ah->ah_setRxFilter);
/* HAL_BOOL ah_isKeyCacheEntryValid(struct ath_hal *ah, u_int16_t a1) */
__print_symbol("%s=ah_isKeyCacheEntryValid\n",
(unsigned long)ah->ah_isKeyCacheEntryValid);
/* void ah_stopPcuReceive(struct ath_hal *ah) */
__print_symbol("%s=ah_stopPcuReceive\n",
(unsigned long)ah->ah_stopPcuReceive);
/* HAL_BOOL ah_stopTxDma(struct ath_hal *ah, u_int a1) */
__print_symbol("%s=ah_stopTxDma\n", (unsigned long)ah->ah_stopTxDma);
/* HAL_BOOL ah_setCapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE a1, u_int32_t capability, u_int32_t setting, HAL_STATUS *a4) */
__print_symbol("%s=ah_setCapability\n",
(unsigned long)ah->ah_setCapability);
/* HAL_BOOL ah_stopDmaReceive(struct ath_hal *ah) */
__print_symbol("%s=ah_stopDmaReceive\n",
(unsigned long)ah->ah_stopDmaReceive);
/* u_int32_t ah_getTxDP(struct ath_hal *ah, u_int a1) */
__print_symbol("%s=ah_getTxDP\n", (unsigned long)ah->ah_getTxDP);
/* int ah_setupTxQueue(struct ath_hal *ah, HAL_TX_QUEUE a1, const HAL_TXQ_INFO *qInfo) */
__print_symbol("%s=ah_setupTxQueue\n",
(unsigned long)ah->ah_setupTxQueue);
/* u_int ah_getDefAntenna(struct ath_hal *ah) */
__print_symbol("%s=ah_getDefAntenna\n",
(unsigned long)ah->ah_getDefAntenna);
/* HAL_BOOL ah_phyDisable(struct ath_hal *ah) */
__print_symbol("%s=ah_phyDisable\n", (unsigned long)ah->ah_phyDisable);
/* HAL_BOOL ah_setRegulatoryDomain(struct ath_hal *ah, u_int16_t a1, HAL_STATUS *a2) */
__print_symbol("%s=ah_setRegulatoryDomain\n",
(unsigned long)ah->ah_setRegulatoryDomain);
/* HAL_BOOL ah_setupTxDesc(struct ath_hal *ah, struct ath_desc *a1, u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type, u_int txPower, u_int txRate0, u_int txTries0, u_int keyIx, u_int antMode, u_int flags, u_int rtsctsRate, u_int rtsctsDuration, u_int compicvLen, u_int compivLen, u_int comp) */
__print_symbol("%s=ah_setupTxDesc\n",
(unsigned long)ah->ah_setupTxDesc);
/* HAL_BOOL ah_gpioCfgInput(struct ath_hal *ah, u_int32_t gpio) */
__print_symbol("%s=ah_gpioCfgInput\n",
(unsigned long)ah->ah_gpioCfgInput);
/* u_int32_t ah_gpioGet(struct ath_hal *ah, u_int32_t gpio) */
__print_symbol("%s=ah_gpioGet\n", (unsigned long)ah->ah_gpioGet);
/* HAL_BOOL ah_disable(struct ath_hal *ah) */
__print_symbol("%s=ah_disable\n", (unsigned long)ah->ah_disable);
#else /* #ifdef CONFIG_KALLSYMS */
printk
("To use this feature you must enable CONFIG_KALLSYMS in your kernel.");
#endif /* #ifndef CONFIG_KALLSYMS */
}
#include "if_ath_hal_wrappers.h"
#endif /* #ifndef _IF_ATH_HAL_H_ */

View File

@ -548,6 +548,7 @@ struct ieee80211req_scan_result {
#define IEEE80211_IOCTL_SETKEY (SIOCIWFIRSTPRIV+18)
#define IEEE80211_IOCTL_WRITEREG (SIOCIWFIRSTPRIV+19)
#define IEEE80211_IOCTL_DELKEY (SIOCIWFIRSTPRIV+20)
#define IEEE80211_IOCTL_HALMAP (SIOCIWFIRSTPRIV+21)
#define IEEE80211_IOCTL_ADDMAC (SIOCIWFIRSTPRIV+22)
#define IEEE80211_IOCTL_DELMAC (SIOCIWFIRSTPRIV+24)
#define IEEE80211_IOCTL_WDSADDMAC (SIOCIWFIRSTPRIV+26)

View File

@ -441,6 +441,9 @@ struct ieee80211com {
unsigned int (*ic_write_register)(struct ieee80211com *, unsigned int, unsigned int);
unsigned int (*ic_read_register)(struct ieee80211com *, unsigned int, unsigned int*);
#endif /* #ifdef ATH_REVERSE_ENGINEERING */
/* dump a lookup table for unobfuscating HAL function pointers */
unsigned int (*ic_dump_hal_map)(struct ieee80211com *);
};
#define MAX_PROC_IEEE80211_SIZE 16383

View File

@ -1544,6 +1544,18 @@ struct waplistreq { /* XXX: not the right place for declaration? */
int i;
};
static int
ieee80211_ioctl_hal_map(struct net_device *dev, struct iw_request_info *info,
void *w, char *extra)
{
int *params = (int*) extra;
struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic;
params[0] = ic->ic_dump_hal_map(ic);
return 0;
}
static int
waplist_cb(void *arg, const struct ieee80211_scan_entry *se)
{
@ -5388,6 +5400,8 @@ static const struct iw_priv_args ieee80211_priv_args[] = {
0, IW_PRIV_TYPE_APPIEBUF, "getiebuf" },
{ IEEE80211_IOCTL_FILTERFRAME,
IW_PRIV_TYPE_FILTER , 0, "setfilter" },
{ IEEE80211_IOCTL_HALMAP,
0, 0, "dump_hal_map" },
#ifdef ATH_REVERSE_ENGINEERING
/*
@ -5476,6 +5490,7 @@ static const iw_handler ieee80211_priv_handlers[] = {
set_priv(IEEE80211_IOCTL_SETMLME, ieee80211_ioctl_setmlme),
set_priv(IEEE80211_IOCTL_SETKEY, ieee80211_ioctl_setkey),
set_priv(IEEE80211_IOCTL_DELKEY, ieee80211_ioctl_delkey),
set_priv(IEEE80211_IOCTL_HALMAP, ieee80211_ioctl_hal_map),
set_priv(IEEE80211_IOCTL_ADDMAC, ieee80211_ioctl_addmac),
set_priv(IEEE80211_IOCTL_DELMAC, ieee80211_ioctl_delmac),
set_priv(IEEE80211_IOCTL_WDSADDMAC, ieee80211_ioctl_wdsmac),

91
scripts/hal_unmangle.sed Normal file
View File

@ -0,0 +1,91 @@
s/zz02db3dfd/ah_getMacAddress (zz02db3dfd)/g
s/zz016db251/ah_getPowerMode (zz016db251)/g
s/zz016d9d41/ah_getDiagState (zz016d9d41)/g
s/zz0e107ca1/ah_resetStationBeaconTimers (zz0e107ca1)/g
s/zz06e00b8a/ah_setCoverageClass (zz06e00b8a)/g
s/zz0016da50/ah_getTsf64 (zz0016da50)/g
s/zz02db53ed/ah_enableReceive (zz02db53ed)/g
s/zz06d9dd93/ah_getAntennaSwitch (zz06d9dd93)/g
s/zz000b6e52/ah_gpioSet (zz000b6e52)/g
s/zz02db99ae/ah_gpioCfgOutput (zz02db99ae)/g
s/zz0d14d1b0/ah_clrMulticastFilterIndex (zz0d14d1b0)/g
s/zz02dbebbd/ah_reqTxIntrDesc (zz02dbebbd)/g
s/zz000b6c10/ah_rxMonitor (zz000b6c10)/g
s/zz000b6ff8/ah_setTxDP (zz000b6ff8)/g
s/zz06dff44a/ah_setKeyCacheEntry (zz06dff44a)/g
s/zz016df051/ah_setPCUConfig (zz016df051)/g
s/zz002db51c/ah_getRfGain (zz002db51c)/g
s/zz0b82de6d/ah_setMulticastFilter (zz0b82de6d)/g
s/zz02db31b2/ah_getAckTimeout (zz02db31b2)/g
s/zz0b81ea94/ah_setStationBeaconTimers (zz0b81ea94)/g
s/zz0db3ed86/ah_detectCardPresent (zz0db3ed86)/g
s/zz00b6d923/ah_getSlotTime (zz00b6d923)/g
s/zz005b5c46/ah_beaconInit (zz005b5c46)/g
s/zz00b6ea7a/ah_gpioSetIntr (zz00b6ea7a)/g
s/zz05b81b1b/ah_releaseTxQueue (zz05b81b1b)/g
s/zz06feaf60/ah_setKeyCacheEntryMac (zz06feaf60)/g
s/zz005b893d/ah_procTxDesc (zz005b893d)/g
s/zz02db5763/ah_getInterrupts (zz02db5763)/g
s/zz02dbf1b2/ah_setAckTimeout (zz02dbf1b2)/g
s/zz016e00dd/ah_setBssIdMask (zz016e00dd)/g
s/zz02dbe851/ah_setAckCTSRate (zz02dbe851)/g
s/zz00b6d6bc/ah_getRxFilter (zz00b6d6bc)/g
s/zz067d0c47/ah_getChanNoise (zz067d0c47)/g
s/zz0b83ad3e/ah_resetKeyCacheEntry (zz0b83ad3e)/g
s/zz06dfdd93/ah_setAntennaSwitch (zz06dfdd93)/g
s/zz0b709eff/ah_setTxQueueProps (zz0b709eff)/g
s/zz000b6fe8/ah_setRxDP (zz000b6fe8)/g
s/zz0002dbd2/ah_reset (zz0002dbd2)/g
s/zz02dbfc1d/ah_setDecompMask (zz02dbfc1d)/g
s/zz0b6d9eff/ah_getTxQueueProps (zz0b6d9eff)/g
s/zz005b6cfd/ah_fillTxDesc (zz005b6cfd)/g
s/zz016e1b87/ah_numTxPending (zz016e1b87)/g
s/zz0b721aed/ah_startPcuReceive (zz0b721aed)/g
s/zz02dbf35d/ah_setDefAntenna (zz02dbf35d)/g
s/zz016e1251/ah_setPowerMode (zz016e1251)/g
s/zz005b88fd/ah_procRxDesc (zz005b88fd)/g
s/zz02db2851/ah_getAckCTSRate (zz02db2851)/g
s/zz0b6d2325/ah_getKeyCacheSize (zz0b6d2325)/g
s/zz016e2dfd/ah_setupXTxDesc (zz016e2dfd)/g
s/zz02dc1763/ah_setInterrupts (zz02dc1763)/g
s/zz02db1ab2/ah_getCTSTimeout (zz02db1ab2)/g
s/zz0dc6a5c5/ah_updateMibCounters (zz0dc6a5c5)/g
s/zz05b781e0/ah_perCalibration (zz05b781e0)/g
s/zz000b6ce8/ah_getRxDP (zz000b6ce8)/g
s/zz0b709d02/ah_setTxPowerLimit (zz0b709d02)/g
s/zz0da484a1/ah_getPendingInterrupts (zz0da484a1)/g
s/zz0dc6e390/ah_updateTxTrigLevel (zz0dc6e390)/g
s/zz016e189b/ah_resetTxQueue (zz016e189b)/g
s/zz02dbfdfd/ah_setMacAddress (zz02dbfdfd)/g
s/zz02dbdab2/ah_setCTSTimeout (zz02dbdab2)/g
s/zz016dab2d/ah_getRateTable (zz016dab2d)/g
s/zz0016da48/ah_getTsf32 (zz0016da48)/g
s/zz05b8c65a/ah_procMibEvent (zz05b8c65a)/g
s/zz0b6fd363/ah_setBeaconTimers (zz0b6fd363)/g
s/zz02db3875/ah_getCapability (zz02db3875)/g
s/zz002dbc42/ah_radarWait (zz002dbc42)/g
s/zz00547fed/ah_setMulticastFilterIndex (zz00547fed)/g
s/zz016da0dd/ah_getBssIdMask (zz016da0dd)/g
s/zz0b6f50b8/ah_isInterruptPending (zz0b6f50b8)/g
s/zz005b90cb/ah_startTxDma (zz005b90cb)/g
s/zz05b6c6db/ah_getTxIntrQueue (zz05b6c6db)/g
s/zz00b70923/ah_setSlotTime (zz00b70923)/g
s/zz00b70161/ah_setLedState (zz00b70161)/g
s/zz016e648a/ah_writeAssocid (zz016e648a)/g
s/zz0016e12c/ah_resetTsf (zz0016e12c)/g
s/zz00b7173d/ah_setupRxDesc (zz00b7173d)/g
s/zz00b706bc/ah_setRxFilter (zz00b706bc)/g
s/zz0dadc62c/ah_isKeyCacheEntryValid (zz0dadc62c)/g
s/zz05b942ed/ah_stopPcuReceive (zz05b942ed)/g
s/zz002dca0b/ah_stopTxDma (zz002dca0b)/g
s/zz02dbf875/ah_setCapability (zz02dbf875)/g
s/zz05b92aed/ah_stopDmaReceive (zz05b92aed)/g
s/zz000b6cf8/ah_getTxDP (zz000b6cf8)/g
s/zz016e309b/ah_setupTxQueue (zz016e309b)/g
s/zz02db335d/ah_getDefAntenna (zz02db335d)/g
s/zz005b7f9d/ah_phyDisable (zz005b7f9d)/g
s/zz0703947b/ah_setRegulatoryDomain (zz0703947b)/g
s/zz00b7177d/ah_setupTxDesc (zz00b7177d)/g
s/zz016dcbfe/ah_gpioCfgInput (zz016dcbfe)/g
s/zz000b6e22/ah_gpioGet (zz000b6e22)/g
s/zz000b6d1d/ah_disable (zz000b6d1d)/g

View File

@ -192,6 +192,9 @@ my $header = <<EOF
* ************************************************************** */
#include "if_ath_hal_macros.h"
#ifdef CONFIG_KALLSYMS
#include "linux/kallsyms.h"
#endif /* #ifdef CONFIG_KALLSYMS */
#ifndef _IF_ATH_HAL_H_
#define _IF_ATH_HAL_H_
@ -350,6 +353,43 @@ sub generate_output() {
}
print OUTPUT "\n}\n";
}
print OUTPUT "\n/* Example script to create a HAL function unmangling SED script: ";
print OUTPUT "\n";
print OUTPUT "\n dmesg -c &>/dev/null && iwpriv ath0 dump_hal_map && dmesg | \\";
print OUTPUT "\n sed -n -r -e \"/zz[0-9a-f]{8}/ { s~^([^+]*)[^=]*=(.*)~s/\\1\\\/\\2 (\\1)/g~; p; } \" \\";
print OUTPUT "\n >hal_unmangle.sed";
print OUTPUT "\n";
print OUTPUT "\n * Example usage:";
print OUTPUT "\n";
print OUTPUT "\n tail -f /var/log/messages | sed -f hal_unmangle.sed ";
print OUTPUT "\n */";
print OUTPUT "\nstatic inline void ath_hal_dump_map(struct ath_hal* ah) {";
print OUTPUT "\n#ifdef CONFIG_KALLSYMS\n";
for my $member_name ( keys %return_types ) {
my $api_name = $member_name;
my $api_return_type = $return_types{$member_name};
my $ret_void = ( $api_return_type =~ /void/ );
print OUTPUT "\n\t/* "
. format_type($api_return_type)
. "$api_name(";
my @names = @{ $parameter_names{$member_name} };
my @types = @{ $parameter_types{$member_name} };
for my $i ( 0 .. $#names ) {
if ($i) {
print OUTPUT ", ";
}
print OUTPUT format_type( $types[$i] ) . $names[$i];
}
print OUTPUT ") */";
print OUTPUT "\n\t\t__print_symbol(\"%s=" . $member_name
. "\\n\", (unsigned long)ah->"
. $member_name . ");";
}
print OUTPUT "\n#else /* #ifdef CONFIG_KALLSYMS */\n";
print OUTPUT "\nprintk(\"To use this feature you must enable "
. "CONFIG_KALLSYMS in your kernel.\");\n";
print OUTPUT "\n#endif /* #ifndef CONFIG_KALLSYMS */\n";
print OUTPUT "\n}\n";
print OUTPUT $footer;
}

43
scripts/update_hal_unmangle Executable file
View File

@ -0,0 +1,43 @@
#!/usr/bin/perl
#
# Copyright (c) 2007 Michael Taylor
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer,
# without modification.
# 2. Redistributions in binary form must reproduce at minimum a disclaimer
# similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
# redistribution must be conditioned upon including a substantially
# similar Disclaimer requirement for further binary redistribution.
# 3. Neither the names of the above-listed copyright holders nor the names
# of any contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# Alternatively, this software may be distributed under the terms of the
# GNU General Public License ("GPL") version 2 as published by the Free
# Software Foundation.
#
# NO WARRANTY
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
# THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGES.
#
# $Id: foo $
#
#!/bin/bash
# This script assumes that ath0 exists, but that's it.
dmesg -c &>/dev/null && iwpriv ath0 dump_hal_map && dmesg | \
sed -n -r -e "/zz[0-9a-f]{8}/ { s~^([^+]*)[^=]*=(.*)~s/\1\/\2 (\1)/g~; p; } " \
>hal_unmangle.sed

View File

@ -113,6 +113,7 @@ set80211priv(const char *dev, int op, void *data, int len, int show_err)
IOCTL_ERR(IEEE80211_IOCTL_RADAR),
IOCTL_ERR(IEEE80211_IOCTL_SETKEY),
IOCTL_ERR(IEEE80211_IOCTL_DELKEY),
IOCTL_ERR(IEEE80211_IOCTL_HALMAP),
IOCTL_ERR(IEEE80211_IOCTL_ADDMAC),
IOCTL_ERR(IEEE80211_IOCTL_DELMAC),
IOCTL_ERR(IEEE80211_IOCTL_WDSADDMAC),

View File

@ -113,6 +113,7 @@ set80211priv(const char *dev, int op, void *data, int len, int show_err)
IOCTL_ERR(IEEE80211_IOCTL_RADAR),
IOCTL_ERR(IEEE80211_IOCTL_SETKEY),
IOCTL_ERR(IEEE80211_IOCTL_DELKEY),
IOCTL_ERR(IEEE80211_IOCTL_HALMAP),
IOCTL_ERR(IEEE80211_IOCTL_ADDMAC),
IOCTL_ERR(IEEE80211_IOCTL_DELMAC),
IOCTL_ERR(IEEE80211_IOCTL_WDSADDMAC),

View File

@ -963,6 +963,7 @@ do80211priv(struct iwreq *iwr, const char *ifname, int op, void *data, size_t le
IOCTL_ERR(IEEE80211_IOCTL_RADAR),
IOCTL_ERR(IEEE80211_IOCTL_SETKEY),
IOCTL_ERR(IEEE80211_IOCTL_DELKEY),
IOCTL_ERR(IEEE80211_IOCTL_HALMAP),
IOCTL_ERR(IEEE80211_IOCTL_ADDMAC),
IOCTL_ERR(IEEE80211_IOCTL_DELMAC),
IOCTL_ERR(IEEE80211_IOCTL_WDSADDMAC),