summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/ar5211.c
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2005-04-18 18:42:55 +0000
committerreyk <reyk@openbsd.org>2005-04-18 18:42:55 +0000
commitd93ea26f84d672443eae87ec5dc544f4bd1ff0e0 (patch)
tree78fbc4b921a8c9191769ca625d0d62a4280f2012 /sys/dev/ic/ar5211.c
parentCorrectly link on static arches. (diff)
downloadwireguard-openbsd-d93ea26f84d672443eae87ec5dc544f4bd1ff0e0.tar.xz
wireguard-openbsd-d93ea26f84d672443eae87ec5dc544f4bd1ff0e0.zip
beautify the code by renaming HAL functions with capitalized words (i
always wanted to do that). this breaks HAL compatibility but porting should be easy, have a look at athvar.h. no functional changes.
Diffstat (limited to 'sys/dev/ic/ar5211.c')
-rw-r--r--sys/dev/ic/ar5211.c348
1 files changed, 174 insertions, 174 deletions
diff --git a/sys/dev/ic/ar5211.c b/sys/dev/ic/ar5211.c
index 060fa111ebe..dc5f260e203 100644
--- a/sys/dev/ic/ar5211.c
+++ b/sys/dev/ic/ar5211.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar5211.c,v 1.10 2005/04/08 22:12:21 reyk Exp $ */
+/* $OpenBSD: ar5211.c,v 1.11 2005/04/18 18:42:55 reyk Exp $ */
/*
* Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net>
@@ -49,116 +49,116 @@ ar5k_ar5211_fill(hal)
/*
* Init/Exit functions
*/
- AR5K_HAL_FUNCTION(hal, ar5211, getRateTable);
+ AR5K_HAL_FUNCTION(hal, ar5211, get_rate_table);
AR5K_HAL_FUNCTION(hal, ar5211, detach);
/*
* Reset functions
*/
AR5K_HAL_FUNCTION(hal, ar5211, reset);
- AR5K_HAL_FUNCTION(hal, ar5211, setPCUConfig);
- AR5K_HAL_FUNCTION(hal, ar5211, perCalibration);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_opmode);
+ AR5K_HAL_FUNCTION(hal, ar5211, calibrate);
/*
* TX functions
*/
- AR5K_HAL_FUNCTION(hal, ar5211, updateTxTrigLevel);
- AR5K_HAL_FUNCTION(hal, ar5211, setupTxQueue);
- AR5K_HAL_FUNCTION(hal, ar5211, setTxQueueProps);
- AR5K_HAL_FUNCTION(hal, ar5211, releaseTxQueue);
- AR5K_HAL_FUNCTION(hal, ar5211, resetTxQueue);
- AR5K_HAL_FUNCTION(hal, ar5211, getTxDP);
- AR5K_HAL_FUNCTION(hal, ar5211, setTxDP);
- AR5K_HAL_FUNCTION(hal, ar5211, startTxDma);
- AR5K_HAL_FUNCTION(hal, ar5211, stopTxDma);
- AR5K_HAL_FUNCTION(hal, ar5211, setupTxDesc);
- AR5K_HAL_FUNCTION(hal, ar5211, setupXTxDesc);
- AR5K_HAL_FUNCTION(hal, ar5211, fillTxDesc);
- AR5K_HAL_FUNCTION(hal, ar5211, procTxDesc);
- AR5K_HAL_FUNCTION(hal, ar5211, hasVEOL);
+ AR5K_HAL_FUNCTION(hal, ar5211, update_tx_triglevel);
+ AR5K_HAL_FUNCTION(hal, ar5211, setup_tx_queue);
+ AR5K_HAL_FUNCTION(hal, ar5211, setup_tx_queueprops);
+ AR5K_HAL_FUNCTION(hal, ar5211, release_tx_queue);
+ AR5K_HAL_FUNCTION(hal, ar5211, reset_tx_queue);
+ AR5K_HAL_FUNCTION(hal, ar5211, get_tx_buf);
+ AR5K_HAL_FUNCTION(hal, ar5211, put_tx_buf);
+ AR5K_HAL_FUNCTION(hal, ar5211, tx_start);
+ AR5K_HAL_FUNCTION(hal, ar5211, stop_tx_dma);
+ AR5K_HAL_FUNCTION(hal, ar5211, setup_tx_desc);
+ AR5K_HAL_FUNCTION(hal, ar5211, setup_xtx_desc);
+ AR5K_HAL_FUNCTION(hal, ar5211, fill_tx_desc);
+ AR5K_HAL_FUNCTION(hal, ar5211, proc_tx_desc);
+ AR5K_HAL_FUNCTION(hal, ar5211, has_veol);
/*
* RX functions
*/
- AR5K_HAL_FUNCTION(hal, ar5211, getRxDP);
- AR5K_HAL_FUNCTION(hal, ar5211, setRxDP);
- AR5K_HAL_FUNCTION(hal, ar5211, enableReceive);
- AR5K_HAL_FUNCTION(hal, ar5211, stopDmaReceive);
- AR5K_HAL_FUNCTION(hal, ar5211, startPcuReceive);
- AR5K_HAL_FUNCTION(hal, ar5211, stopPcuReceive);
- AR5K_HAL_FUNCTION(hal, ar5211, setMulticastFilter);
- AR5K_HAL_FUNCTION(hal, ar5211, setMulticastFilterIndex);
- AR5K_HAL_FUNCTION(hal, ar5211, clrMulticastFilterIndex);
- AR5K_HAL_FUNCTION(hal, ar5211, getRxFilter);
- AR5K_HAL_FUNCTION(hal, ar5211, setRxFilter);
- AR5K_HAL_FUNCTION(hal, ar5211, setupRxDesc);
- AR5K_HAL_FUNCTION(hal, ar5211, procRxDesc);
- AR5K_HAL_FUNCTION(hal, ar5211, rxMonitor);
+ AR5K_HAL_FUNCTION(hal, ar5211, get_rx_buf);
+ AR5K_HAL_FUNCTION(hal, ar5211, put_rx_buf);
+ AR5K_HAL_FUNCTION(hal, ar5211, start_rx);
+ AR5K_HAL_FUNCTION(hal, ar5211, stop_rx_dma);
+ AR5K_HAL_FUNCTION(hal, ar5211, start_rx_pcu);
+ AR5K_HAL_FUNCTION(hal, ar5211, stop_pcu_recv);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_mcast_filter);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_mcast_filterindex);
+ AR5K_HAL_FUNCTION(hal, ar5211, clear_mcast_filter_idx);
+ AR5K_HAL_FUNCTION(hal, ar5211, get_rx_filter);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_rx_filter);
+ AR5K_HAL_FUNCTION(hal, ar5211, setup_rx_desc);
+ AR5K_HAL_FUNCTION(hal, ar5211, proc_rx_desc);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_rx_monitor);
/*
* Misc functions
*/
- AR5K_HAL_FUNCTION(hal, ar5211, dumpState);
- AR5K_HAL_FUNCTION(hal, ar5211, getDiagState);
- AR5K_HAL_FUNCTION(hal, ar5211, getMacAddress);
- AR5K_HAL_FUNCTION(hal, ar5211, setMacAddress);
- AR5K_HAL_FUNCTION(hal, ar5211, setRegulatoryDomain);
- AR5K_HAL_FUNCTION(hal, ar5211, setLedState);
- AR5K_HAL_FUNCTION(hal, ar5211, writeAssocid);
- AR5K_HAL_FUNCTION(hal, ar5211, gpioCfgInput);
- AR5K_HAL_FUNCTION(hal, ar5211, gpioCfgOutput);
- AR5K_HAL_FUNCTION(hal, ar5211, gpioGet);
- AR5K_HAL_FUNCTION(hal, ar5211, gpioSet);
- AR5K_HAL_FUNCTION(hal, ar5211, gpioSetIntr);
- AR5K_HAL_FUNCTION(hal, ar5211, getTsf32);
- AR5K_HAL_FUNCTION(hal, ar5211, getTsf64);
- AR5K_HAL_FUNCTION(hal, ar5211, resetTsf);
- AR5K_HAL_FUNCTION(hal, ar5211, getRegDomain);
- AR5K_HAL_FUNCTION(hal, ar5211, detectCardPresent);
- AR5K_HAL_FUNCTION(hal, ar5211, updateMibCounters);
- AR5K_HAL_FUNCTION(hal, ar5211, getRfGain);
- AR5K_HAL_FUNCTION(hal, ar5211, setSlotTime);
- AR5K_HAL_FUNCTION(hal, ar5211, getSlotTime);
- AR5K_HAL_FUNCTION(hal, ar5211, setAckTimeout);
- AR5K_HAL_FUNCTION(hal, ar5211, getAckTimeout);
- AR5K_HAL_FUNCTION(hal, ar5211, setCTSTimeout);
- AR5K_HAL_FUNCTION(hal, ar5211, getCTSTimeout);
+ AR5K_HAL_FUNCTION(hal, ar5211, dump_state);
+ AR5K_HAL_FUNCTION(hal, ar5211, get_diag_state);
+ AR5K_HAL_FUNCTION(hal, ar5211, get_lladdr);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_lladdr);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_regdomain);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_ledstate);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_associd);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_gpio_input);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_gpio_output);
+ AR5K_HAL_FUNCTION(hal, ar5211, get_gpio);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_gpio);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_gpio_intr);
+ AR5K_HAL_FUNCTION(hal, ar5211, get_tsf32);
+ AR5K_HAL_FUNCTION(hal, ar5211, get_tsf64);
+ AR5K_HAL_FUNCTION(hal, ar5211, reset_tsf);
+ AR5K_HAL_FUNCTION(hal, ar5211, get_regdomain);
+ AR5K_HAL_FUNCTION(hal, ar5211, detect_card_present);
+ AR5K_HAL_FUNCTION(hal, ar5211, update_mib_counters);
+ AR5K_HAL_FUNCTION(hal, ar5211, get_rf_gain);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_slot_time);
+ AR5K_HAL_FUNCTION(hal, ar5211, get_slot_time);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_ack_timeout);
+ AR5K_HAL_FUNCTION(hal, ar5211, get_ack_timeout);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_cts_timeout);
+ AR5K_HAL_FUNCTION(hal, ar5211, get_cts_timeout);
/*
* Key table (WEP) functions
*/
- AR5K_HAL_FUNCTION(hal, ar5211, isHwCipherSupported);
- AR5K_HAL_FUNCTION(hal, ar5211, getKeyCacheSize);
- AR5K_HAL_FUNCTION(hal, ar5211, resetKeyCacheEntry);
- AR5K_HAL_FUNCTION(hal, ar5211, isKeyCacheEntryValid);
- AR5K_HAL_FUNCTION(hal, ar5211, setKeyCacheEntry);
- AR5K_HAL_FUNCTION(hal, ar5211, setKeyCacheEntryMac);
+ AR5K_HAL_FUNCTION(hal, ar5211, is_cipher_supported);
+ AR5K_HAL_FUNCTION(hal, ar5211, get_keycache_size);
+ AR5K_HAL_FUNCTION(hal, ar5211, reset_key);
+ AR5K_HAL_FUNCTION(hal, ar5211, is_key_valid);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_key);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_key_lladdr);
/*
* Power management functions
*/
- AR5K_HAL_FUNCTION(hal, ar5211, setPowerMode);
- AR5K_HAL_FUNCTION(hal, ar5211, getPowerMode);
- AR5K_HAL_FUNCTION(hal, ar5211, queryPSPollSupport);
- AR5K_HAL_FUNCTION(hal, ar5211, initPSPoll);
- AR5K_HAL_FUNCTION(hal, ar5211, enablePSPoll);
- AR5K_HAL_FUNCTION(hal, ar5211, disablePSPoll);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_power);
+ AR5K_HAL_FUNCTION(hal, ar5211, get_power_mode);
+ AR5K_HAL_FUNCTION(hal, ar5211, query_pspoll_support);
+ AR5K_HAL_FUNCTION(hal, ar5211, init_pspoll);
+ AR5K_HAL_FUNCTION(hal, ar5211, enable_pspoll);
+ AR5K_HAL_FUNCTION(hal, ar5211, disable_pspoll);
/*
* Beacon functions
*/
- AR5K_HAL_FUNCTION(hal, ar5211, beaconInit);
- AR5K_HAL_FUNCTION(hal, ar5211, setStationBeaconTimers);
- AR5K_HAL_FUNCTION(hal, ar5211, resetStationBeaconTimers);
- AR5K_HAL_FUNCTION(hal, ar5211, waitForBeaconDone);
+ AR5K_HAL_FUNCTION(hal, ar5211, init_beacon);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_beacon_timers);
+ AR5K_HAL_FUNCTION(hal, ar5211, reset_beacon);
+ AR5K_HAL_FUNCTION(hal, ar5211, wait_for_beacon);
/*
* Interrupt functions
*/
- AR5K_HAL_FUNCTION(hal, ar5211, isInterruptPending);
- AR5K_HAL_FUNCTION(hal, ar5211, getPendingInterrupts);
- AR5K_HAL_FUNCTION(hal, ar5211, getInterrupts);
- AR5K_HAL_FUNCTION(hal, ar5211, setInterrupts);
+ AR5K_HAL_FUNCTION(hal, ar5211, is_intr_pending);
+ AR5K_HAL_FUNCTION(hal, ar5211, get_isr);
+ AR5K_HAL_FUNCTION(hal, ar5211, get_intr);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_intr);
/*
* Chipset functions (ar5k-specific, non-HAL)
@@ -213,9 +213,9 @@ ar5k_ar5211_attach(device, sc, st, sh, status)
hal->ah_phy = AR5K_AR5211_PHY(0);
bcopy(etherbroadcastaddr, mac, IEEE80211_ADDR_LEN);
- ar5k_ar5211_writeAssocid(hal, mac, 0, 0);
- ar5k_ar5211_getMacAddress(hal, mac);
- ar5k_ar5211_setPCUConfig(hal);
+ ar5k_ar5211_set_associd(hal, mac, 0, 0);
+ ar5k_ar5211_get_lladdr(hal, mac);
+ ar5k_ar5211_set_opmode(hal);
return (hal);
}
@@ -310,7 +310,7 @@ ar5k_ar5211_nic_wakeup(hal, flags)
}
/* ...wakeup */
- if (ar5k_ar5211_setPowerMode(hal,
+ if (ar5k_ar5211_set_power(hal,
HAL_PM_AWAKE, AH_TRUE, 0) == AH_FALSE) {
AR5K_PRINT("failed to resume the AR5211 (again)\n");
return (AH_FALSE);
@@ -373,7 +373,7 @@ ar5k_ar5211_radio_revision(hal, chip)
}
const HAL_RATE_TABLE *
-ar5k_ar5211_getRateTable(hal, mode)
+ar5k_ar5211_get_rate_table(hal, mode)
struct ath_hal *hal;
u_int mode;
{
@@ -567,8 +567,8 @@ ar5k_ar5211_reset(hal, op_mode, channel, change_channel, status)
* Misc
*/
bcopy(etherbroadcastaddr, mac, IEEE80211_ADDR_LEN);
- ar5k_ar5211_writeAssocid(hal, mac, 0, 0);
- ar5k_ar5211_setPCUConfig(hal);
+ ar5k_ar5211_set_associd(hal, mac, 0, 0);
+ ar5k_ar5211_set_opmode(hal);
AR5K_REG_WRITE(AR5K_AR5211_PISR, 0xffffffff);
AR5K_REG_WRITE(AR5K_AR5211_RSSI_THR, AR5K_TUNE_RSSI_THRES);
@@ -612,24 +612,24 @@ ar5k_ar5211_reset(hal, op_mode, channel, change_channel, status)
*/
for (i = 0; i < hal->ah_capabilities.cap_queues.q_tx_num; i++) {
AR5K_REG_WRITE_Q(AR5K_AR5211_DCU_QCUMASK(i), i);
- if (ar5k_ar5211_resetTxQueue(hal, i) == AH_FALSE) {
+ if (ar5k_ar5211_reset_tx_queue(hal, i) == AH_FALSE) {
AR5K_PRINTF("failed to reset TX queue #%d\n", i);
return (AH_FALSE);
}
}
/* Pre-enable interrupts */
- ar5k_ar5211_setInterrupts(hal, HAL_INT_RX | HAL_INT_TX | HAL_INT_FATAL);
+ ar5k_ar5211_set_intr(hal, HAL_INT_RX | HAL_INT_TX | HAL_INT_FATAL);
/*
* Set RF kill flags if supported by the device (read from the EEPROM)
*/
if (AR5K_EEPROM_HDR_RFKILL(hal->ah_capabilities.cap_eeprom.ee_header)) {
- ar5k_ar5211_gpioCfgInput(hal, 0);
- if ((hal->ah_gpio[0] = ar5k_ar5211_gpioGet(hal, 0)) == 0)
- ar5k_ar5211_gpioSetIntr(hal, 0, 1);
+ ar5k_ar5211_set_gpio_input(hal, 0);
+ if ((hal->ah_gpio[0] = ar5k_ar5211_get_gpio(hal, 0)) == 0)
+ ar5k_ar5211_set_gpio_intr(hal, 0, 1);
else
- ar5k_ar5211_gpioSetIntr(hal, 0, 0);
+ ar5k_ar5211_set_gpio_intr(hal, 0, 0);
}
/*
@@ -642,7 +642,7 @@ ar5k_ar5211_reset(hal, op_mode, channel, change_channel, status)
}
void
-ar5k_ar5211_setPCUConfig(hal)
+ar5k_ar5211_set_opmode(hal)
struct ath_hal *hal;
{
u_int32_t pcu_reg, low_id, high_id;
@@ -681,7 +681,7 @@ ar5k_ar5211_setPCUConfig(hal)
}
HAL_BOOL
-ar5k_ar5211_perCalibration(hal, channel)
+ar5k_ar5211_calibrate(hal, channel)
struct ath_hal *hal;
HAL_CHANNEL *channel;
{
@@ -725,7 +725,7 @@ ar5k_ar5211_perCalibration(hal, channel)
*/
HAL_BOOL
-ar5k_ar5211_updateTxTrigLevel(hal, increase)
+ar5k_ar5211_update_tx_triglevel(hal, increase)
struct ath_hal *hal;
HAL_BOOL increase;
{
@@ -735,7 +735,7 @@ ar5k_ar5211_updateTxTrigLevel(hal, increase)
/*
* Disable interrupts by setting the mask
*/
- imr = ar5k_ar5211_setInterrupts(hal, hal->ah_imr & ~HAL_INT_GLOBAL);
+ imr = ar5k_ar5211_set_intr(hal, hal->ah_imr & ~HAL_INT_GLOBAL);
trigger_level = AR5K_REG_MS(AR5K_REG_READ(AR5K_AR5211_TXCFG),
AR5K_AR5211_TXCFG_TXFULL);
@@ -758,13 +758,13 @@ ar5k_ar5211_updateTxTrigLevel(hal, increase)
/*
* Restore interrupt mask
*/
- ar5k_ar5211_setInterrupts(hal, imr);
+ ar5k_ar5211_set_intr(hal, imr);
return (status);
}
int
-ar5k_ar5211_setupTxQueue(hal, queue_type, queue_info)
+ar5k_ar5211_setup_tx_queue(hal, queue_type, queue_info)
struct ath_hal *hal;
HAL_TX_QUEUE queue_type;
const HAL_TXQ_INFO *queue_info;
@@ -796,7 +796,7 @@ ar5k_ar5211_setupTxQueue(hal, queue_type, queue_info)
hal->ah_txq[queue].tqi_type = queue_type;
if (queue_info != NULL) {
- if (ar5k_ar5211_setTxQueueProps(hal, queue, queue_info)
+ if (ar5k_ar5211_setup_tx_queueprops(hal, queue, queue_info)
!= AH_TRUE)
return (-1);
}
@@ -807,7 +807,7 @@ ar5k_ar5211_setupTxQueue(hal, queue_type, queue_info)
}
HAL_BOOL
-ar5k_ar5211_setTxQueueProps(hal, queue, queue_info)
+ar5k_ar5211_setup_tx_queueprops(hal, queue, queue_info)
struct ath_hal *hal;
int queue;
const HAL_TXQ_INFO *queue_info;
@@ -829,7 +829,7 @@ ar5k_ar5211_setTxQueueProps(hal, queue, queue_info)
}
HAL_BOOL
-ar5k_ar5211_releaseTxQueue(hal, queue)
+ar5k_ar5211_release_tx_queue(hal, queue)
struct ath_hal *hal;
u_int queue;
{
@@ -843,7 +843,7 @@ ar5k_ar5211_releaseTxQueue(hal, queue)
}
HAL_BOOL
-ar5k_ar5211_resetTxQueue(hal, queue)
+ar5k_ar5211_reset_tx_queue(hal, queue)
struct ath_hal *hal;
u_int queue;
{
@@ -1021,7 +1021,7 @@ ar5k_ar5211_resetTxQueue(hal, queue)
}
u_int32_t
-ar5k_ar5211_getTxDP(hal, queue)
+ar5k_ar5211_get_tx_buf(hal, queue)
struct ath_hal *hal;
u_int queue;
{
@@ -1034,7 +1034,7 @@ ar5k_ar5211_getTxDP(hal, queue)
}
HAL_BOOL
-ar5k_ar5211_setTxDP(hal, queue, phys_addr)
+ar5k_ar5211_put_tx_buf(hal, queue, phys_addr)
struct ath_hal *hal;
u_int queue;
u_int32_t phys_addr;
@@ -1054,7 +1054,7 @@ ar5k_ar5211_setTxDP(hal, queue, phys_addr)
}
HAL_BOOL
-ar5k_ar5211_startTxDma(hal, queue)
+ar5k_ar5211_tx_start(hal, queue)
struct ath_hal *hal;
u_int queue;
{
@@ -1071,7 +1071,7 @@ ar5k_ar5211_startTxDma(hal, queue)
}
HAL_BOOL
-ar5k_ar5211_stopTxDma(hal, queue)
+ar5k_ar5211_stop_tx_dma(hal, queue)
struct ath_hal *hal;
u_int queue;
{
@@ -1097,8 +1097,8 @@ ar5k_ar5211_stopTxDma(hal, queue)
}
HAL_BOOL
-ar5k_ar5211_setupTxDesc(hal, desc, packet_length, header_length, type, tx_power,
- tx_rate0, tx_tries0, key_index, antenna_mode, flags, rtscts_rate,
+ar5k_ar5211_setup_tx_desc(hal, desc, packet_length, header_length, type,
+ tx_power, tx_rate0, tx_tries0, key_index, antenna_mode, flags, rtscts_rate,
rtscts_duration)
struct ath_hal *hal;
struct ath_desc *desc;
@@ -1134,9 +1134,9 @@ ar5k_ar5211_setupTxDesc(hal, desc, packet_length, header_length, type, tx_power,
tx_desc->tx_control_1 =
AR5K_REG_SM(type, AR5K_AR5211_DESC_TX_CTL1_FRAME_TYPE);
-#define _TX_FLAGS(_c, _flag) \
+#define _TX_FLAGS(_c, _flag) \
if (flags & HAL_TXDESC_##_flag) \
- tx_desc->tx_control_##_c |= \
+ tx_desc->tx_control_##_c |= \
AR5K_AR5211_DESC_TX_CTL##_c##_##_flag
_TX_FLAGS(0, CLRDMASK);
@@ -1162,7 +1162,7 @@ ar5k_ar5211_setupTxDesc(hal, desc, packet_length, header_length, type, tx_power,
}
HAL_BOOL
-ar5k_ar5211_fillTxDesc(hal, desc, segment_length, first_segment, last_segment)
+ar5k_ar5211_fill_tx_desc(hal, desc, segment_length, first_segment, last_segment)
struct ath_hal *hal;
struct ath_desc *desc;
u_int segment_length;
@@ -1191,7 +1191,7 @@ ar5k_ar5211_fillTxDesc(hal, desc, segment_length, first_segment, last_segment)
}
HAL_BOOL
-ar5k_ar5211_setupXTxDesc(hal, desc, tx_rate1, tx_tries1, tx_rate2, tx_tries2,
+ar5k_ar5211_setup_xtx_desc(hal, desc, tx_rate1, tx_tries1, tx_rate2, tx_tries2,
tx_rate3, tx_tries3)
struct ath_hal *hal;
struct ath_desc *desc;
@@ -1206,7 +1206,7 @@ ar5k_ar5211_setupXTxDesc(hal, desc, tx_rate1, tx_tries1, tx_rate2, tx_tries2,
}
HAL_STATUS
-ar5k_ar5211_procTxDesc(hal, desc)
+ar5k_ar5211_proc_tx_desc(hal, desc)
struct ath_hal *hal;
struct ath_desc *desc;
{
@@ -1263,7 +1263,7 @@ ar5k_ar5211_procTxDesc(hal, desc)
}
HAL_BOOL
-ar5k_ar5211_hasVEOL(hal)
+ar5k_ar5211_has_veol(hal)
struct ath_hal *hal;
{
return (AH_TRUE);
@@ -1274,14 +1274,14 @@ ar5k_ar5211_hasVEOL(hal)
*/
u_int32_t
-ar5k_ar5211_getRxDP(hal)
+ar5k_ar5211_get_rx_buf(hal)
struct ath_hal *hal;
{
return (AR5K_REG_READ(AR5K_AR5211_RXDP));
}
void
-ar5k_ar5211_setRxDP(hal, phys_addr)
+ar5k_ar5211_put_rx_buf(hal, phys_addr)
struct ath_hal *hal;
u_int32_t phys_addr;
{
@@ -1289,14 +1289,14 @@ ar5k_ar5211_setRxDP(hal, phys_addr)
}
void
-ar5k_ar5211_enableReceive(hal)
+ar5k_ar5211_start_rx(hal)
struct ath_hal *hal;
{
AR5K_REG_WRITE(AR5K_AR5211_CR, AR5K_AR5211_CR_RXE);
}
HAL_BOOL
-ar5k_ar5211_stopDmaReceive(hal)
+ar5k_ar5211_stop_rx_dma(hal)
struct ath_hal *hal;
{
int i;
@@ -1315,21 +1315,21 @@ ar5k_ar5211_stopDmaReceive(hal)
}
void
-ar5k_ar5211_startPcuReceive(hal)
+ar5k_ar5211_start_rx_pcu(hal)
struct ath_hal *hal;
{
AR5K_REG_DISABLE_BITS(AR5K_AR5211_DIAG_SW, AR5K_AR5211_DIAG_SW_DIS_RX);
}
void
-ar5k_ar5211_stopPcuReceive(hal)
+ar5k_ar5211_stop_pcu_recv(hal)
struct ath_hal *hal;
{
AR5K_REG_ENABLE_BITS(AR5K_AR5211_DIAG_SW, AR5K_AR5211_DIAG_SW_DIS_RX);
}
void
-ar5k_ar5211_setMulticastFilter(hal, filter0, filter1)
+ar5k_ar5211_set_mcast_filter(hal, filter0, filter1)
struct ath_hal *hal;
u_int32_t filter0;
u_int32_t filter1;
@@ -1340,7 +1340,7 @@ ar5k_ar5211_setMulticastFilter(hal, filter0, filter1)
}
HAL_BOOL
-ar5k_ar5211_setMulticastFilterIndex(hal, index)
+ar5k_ar5211_set_mcast_filterindex(hal, index)
struct ath_hal *hal;
u_int32_t index;
{
@@ -1358,7 +1358,7 @@ ar5k_ar5211_setMulticastFilterIndex(hal, index)
}
HAL_BOOL
-ar5k_ar5211_clrMulticastFilterIndex(hal, index)
+ar5k_ar5211_clear_mcast_filter_idx(hal, index)
struct ath_hal *hal;
u_int32_t index;
{
@@ -1377,14 +1377,14 @@ ar5k_ar5211_clrMulticastFilterIndex(hal, index)
}
u_int32_t
-ar5k_ar5211_getRxFilter(hal)
+ar5k_ar5211_get_rx_filter(hal)
struct ath_hal *hal;
{
return (AR5K_REG_READ(AR5K_AR5211_RX_FILTER));
}
void
-ar5k_ar5211_setRxFilter(hal, filter)
+ar5k_ar5211_set_rx_filter(hal, filter)
struct ath_hal *hal;
u_int32_t filter;
{
@@ -1392,7 +1392,7 @@ ar5k_ar5211_setRxFilter(hal, filter)
}
HAL_BOOL
-ar5k_ar5211_setupRxDesc(hal, desc, size, flags)
+ar5k_ar5211_setup_rx_desc(hal, desc, size, flags)
struct ath_hal *hal;
struct ath_desc *desc;
u_int32_t size;
@@ -1413,7 +1413,7 @@ ar5k_ar5211_setupRxDesc(hal, desc, size, flags)
}
HAL_STATUS
-ar5k_ar5211_procRxDesc(hal, desc, phys_addr, next)
+ar5k_ar5211_proc_rx_desc(hal, desc, phys_addr, next)
struct ath_hal *hal;
struct ath_desc *desc;
u_int32_t phys_addr;
@@ -1485,7 +1485,7 @@ ar5k_ar5211_procRxDesc(hal, desc, phys_addr, next)
}
void
-ar5k_ar5211_rxMonitor(hal)
+ar5k_ar5211_set_rx_monitor(hal)
struct ath_hal *hal;
{
AR5K_REG_ENABLE_BITS(AR5K_AR5211_RX_FILTER,
@@ -1497,7 +1497,7 @@ ar5k_ar5211_rxMonitor(hal)
*/
void
-ar5k_ar5211_dumpState(hal)
+ar5k_ar5211_dump_state(hal)
struct ath_hal *hal;
{
#ifdef AR5K_DEBUG
@@ -1587,7 +1587,7 @@ ar5k_ar5211_dumpState(hal)
}
HAL_BOOL
-ar5k_ar5211_getDiagState(hal, id, device, size)
+ar5k_ar5211_get_diag_state(hal, id, device, size)
struct ath_hal *hal;
int id;
void **device;
@@ -1602,7 +1602,7 @@ ar5k_ar5211_getDiagState(hal, id, device, size)
}
void
-ar5k_ar5211_getMacAddress(hal, mac)
+ar5k_ar5211_get_lladdr(hal, mac)
struct ath_hal *hal;
u_int8_t *mac;
{
@@ -1610,7 +1610,7 @@ ar5k_ar5211_getMacAddress(hal, mac)
}
HAL_BOOL
-ar5k_ar5211_setMacAddress(hal, mac)
+ar5k_ar5211_set_lladdr(hal, mac)
struct ath_hal *hal;
const u_int8_t *mac;
{
@@ -1630,7 +1630,7 @@ ar5k_ar5211_setMacAddress(hal, mac)
}
HAL_BOOL
-ar5k_ar5211_setRegulatoryDomain(hal, regdomain, status)
+ar5k_ar5211_set_regdomain(hal, regdomain, status)
struct ath_hal *hal;
u_int16_t regdomain;
HAL_STATUS *status;
@@ -1652,7 +1652,7 @@ ar5k_ar5211_setRegulatoryDomain(hal, regdomain, status)
}
void
-ar5k_ar5211_setLedState(hal, state)
+ar5k_ar5211_set_ledstate(hal, state)
struct ath_hal *hal;
HAL_LED_STATE state;
{
@@ -1692,7 +1692,7 @@ ar5k_ar5211_setLedState(hal, state)
}
void
-ar5k_ar5211_writeAssocid(hal, bssid, assoc_id, tim_offset)
+ar5k_ar5211_set_associd(hal, bssid, assoc_id, tim_offset)
struct ath_hal *hal;
const u_int8_t *bssid;
u_int16_t assoc_id;
@@ -1711,7 +1711,7 @@ ar5k_ar5211_writeAssocid(hal, bssid, assoc_id, tim_offset)
bcopy(bssid, hal->ah_bssid, IEEE80211_ADDR_LEN);
if (assoc_id == 0) {
- ar5k_ar5211_disablePSPoll(hal);
+ ar5k_ar5211_disable_pspoll(hal);
return;
}
@@ -1722,11 +1722,11 @@ ar5k_ar5211_writeAssocid(hal, bssid, assoc_id, tim_offset)
AR5K_AR5211_BEACON_TIM_S) &
AR5K_AR5211_BEACON_TIM));
- ar5k_ar5211_enablePSPoll(hal, NULL, 0);
+ ar5k_ar5211_enable_pspoll(hal, NULL, 0);
}
HAL_BOOL
-ar5k_ar5211_gpioCfgOutput(hal, gpio)
+ar5k_ar5211_set_gpio_output(hal, gpio)
struct ath_hal *hal;
u_int32_t gpio;
{
@@ -1741,7 +1741,7 @@ ar5k_ar5211_gpioCfgOutput(hal, gpio)
}
HAL_BOOL
-ar5k_ar5211_gpioCfgInput(hal, gpio)
+ar5k_ar5211_set_gpio_input(hal, gpio)
struct ath_hal *hal;
u_int32_t gpio;
{
@@ -1756,7 +1756,7 @@ ar5k_ar5211_gpioCfgInput(hal, gpio)
}
u_int32_t
-ar5k_ar5211_gpioGet(hal, gpio)
+ar5k_ar5211_get_gpio(hal, gpio)
struct ath_hal *hal;
u_int32_t gpio;
{
@@ -1769,7 +1769,7 @@ ar5k_ar5211_gpioGet(hal, gpio)
}
HAL_BOOL
-ar5k_ar5211_gpioSet(hal, gpio, val)
+ar5k_ar5211_set_gpio(hal, gpio, val)
struct ath_hal *hal;
u_int32_t gpio;
u_int32_t val;
@@ -1791,7 +1791,7 @@ ar5k_ar5211_gpioSet(hal, gpio, val)
}
void
-ar5k_ar5211_gpioSetIntr(hal, gpio, interrupt_level)
+ar5k_ar5211_set_gpio_intr(hal, gpio, interrupt_level)
struct ath_hal *hal;
u_int gpio;
u_int32_t interrupt_level;
@@ -1819,14 +1819,14 @@ ar5k_ar5211_gpioSetIntr(hal, gpio, interrupt_level)
}
u_int32_t
-ar5k_ar5211_getTsf32(hal)
+ar5k_ar5211_get_tsf32(hal)
struct ath_hal *hal;
{
return (AR5K_REG_READ(AR5K_AR5211_TSF_L32));
}
u_int64_t
-ar5k_ar5211_getTsf64(hal)
+ar5k_ar5211_get_tsf64(hal)
struct ath_hal *hal;
{
u_int64_t tsf = AR5K_REG_READ(AR5K_AR5211_TSF_U32);
@@ -1835,7 +1835,7 @@ ar5k_ar5211_getTsf64(hal)
}
void
-ar5k_ar5211_resetTsf(hal)
+ar5k_ar5211_reset_tsf(hal)
struct ath_hal *hal;
{
AR5K_REG_ENABLE_BITS(AR5K_AR5211_BEACON,
@@ -1843,14 +1843,14 @@ ar5k_ar5211_resetTsf(hal)
}
u_int16_t
-ar5k_ar5211_getRegDomain(hal)
+ar5k_ar5211_get_regdomain(hal)
struct ath_hal *hal;
{
return (ar5k_get_regdomain(hal));
}
HAL_BOOL
-ar5k_ar5211_detectCardPresent(hal)
+ar5k_ar5211_detect_card_present(hal)
struct ath_hal *hal;
{
u_int16_t magic;
@@ -1867,7 +1867,7 @@ ar5k_ar5211_detectCardPresent(hal)
}
void
-ar5k_ar5211_updateMibCounters(hal, statistics)
+ar5k_ar5211_update_mib_counters(hal, statistics)
struct ath_hal *hal;
HAL_MIB_STATS *statistics;
{
@@ -1879,14 +1879,14 @@ ar5k_ar5211_updateMibCounters(hal, statistics)
}
HAL_RFGAIN
-ar5k_ar5211_getRfGain(hal)
+ar5k_ar5211_get_rf_gain(hal)
struct ath_hal *hal;
{
return (HAL_RFGAIN_INACTIVE);
}
HAL_BOOL
-ar5k_ar5211_setSlotTime(hal, slot_time)
+ar5k_ar5211_set_slot_time(hal, slot_time)
struct ath_hal *hal;
u_int slot_time;
{
@@ -1900,7 +1900,7 @@ ar5k_ar5211_setSlotTime(hal, slot_time)
}
u_int
-ar5k_ar5211_getSlotTime(hal)
+ar5k_ar5211_get_slot_time(hal)
struct ath_hal *hal;
{
return (ar5k_clocktoh(AR5K_REG_READ(AR5K_AR5211_DCU_GBL_IFS_SLOT) &
@@ -1908,7 +1908,7 @@ ar5k_ar5211_getSlotTime(hal)
}
HAL_BOOL
-ar5k_ar5211_setAckTimeout(hal, timeout)
+ar5k_ar5211_set_ack_timeout(hal, timeout)
struct ath_hal *hal;
u_int timeout;
{
@@ -1923,7 +1923,7 @@ ar5k_ar5211_setAckTimeout(hal, timeout)
}
u_int
-ar5k_ar5211_getAckTimeout(hal)
+ar5k_ar5211_get_ack_timeout(hal)
struct ath_hal *hal;
{
return (ar5k_clocktoh(AR5K_REG_MS(AR5K_REG_READ(AR5K_AR5211_TIME_OUT),
@@ -1931,7 +1931,7 @@ ar5k_ar5211_getAckTimeout(hal)
}
HAL_BOOL
-ar5k_ar5211_setCTSTimeout(hal, timeout)
+ar5k_ar5211_set_cts_timeout(hal, timeout)
struct ath_hal *hal;
u_int timeout;
{
@@ -1946,7 +1946,7 @@ ar5k_ar5211_setCTSTimeout(hal, timeout)
}
u_int
-ar5k_ar5211_getCTSTimeout(hal)
+ar5k_ar5211_get_cts_timeout(hal)
struct ath_hal *hal;
{
return (ar5k_clocktoh(AR5K_REG_MS(AR5K_REG_READ(AR5K_AR5211_TIME_OUT),
@@ -1958,7 +1958,7 @@ ar5k_ar5211_getCTSTimeout(hal)
*/
HAL_BOOL
-ar5k_ar5211_isHwCipherSupported(hal, cipher)
+ar5k_ar5211_is_cipher_supported(hal, cipher)
struct ath_hal *hal;
HAL_CIPHER cipher;
{
@@ -1972,14 +1972,14 @@ ar5k_ar5211_isHwCipherSupported(hal, cipher)
}
u_int32_t
-ar5k_ar5211_getKeyCacheSize(hal)
+ar5k_ar5211_get_keycache_size(hal)
struct ath_hal *hal;
{
return (AR5K_AR5211_KEYCACHE_SIZE);
}
HAL_BOOL
-ar5k_ar5211_resetKeyCacheEntry(hal, entry)
+ar5k_ar5211_reset_key(hal, entry)
struct ath_hal *hal;
u_int16_t entry;
{
@@ -1994,7 +1994,7 @@ ar5k_ar5211_resetKeyCacheEntry(hal, entry)
}
HAL_BOOL
-ar5k_ar5211_isKeyCacheEntryValid(hal, entry)
+ar5k_ar5211_is_key_valid(hal, entry)
struct ath_hal *hal;
u_int16_t entry;
{
@@ -2011,7 +2011,7 @@ ar5k_ar5211_isKeyCacheEntryValid(hal, entry)
}
HAL_BOOL
-ar5k_ar5211_setKeyCacheEntry(hal, entry, keyval, mac, xor_notused)
+ar5k_ar5211_set_key(hal, entry, keyval, mac, xor_notused)
struct ath_hal *hal;
u_int16_t entry;
const HAL_KEYVAL *keyval;
@@ -2058,11 +2058,11 @@ ar5k_ar5211_setKeyCacheEntry(hal, entry, keyval, mac, xor_notused)
for (i = 0; i < elements; i++)
AR5K_REG_WRITE(AR5K_AR5211_KEYTABLE_OFF(entry, i), key_v[i]);
- return (ar5k_ar5211_setKeyCacheEntryMac(hal, entry, mac));
+ return (ar5k_ar5211_set_key_lladdr(hal, entry, mac));
}
HAL_BOOL
-ar5k_ar5211_setKeyCacheEntryMac(hal, entry, mac)
+ar5k_ar5211_set_key_lladdr(hal, entry, mac)
struct ath_hal *hal;
u_int16_t entry;
const u_int8_t *mac;
@@ -2093,7 +2093,7 @@ ar5k_ar5211_setKeyCacheEntryMac(hal, entry, mac)
*/
HAL_BOOL
-ar5k_ar5211_setPowerMode(hal, mode, set_chip, sleep_duration)
+ar5k_ar5211_set_power(hal, mode, set_chip, sleep_duration)
struct ath_hal *hal;
HAL_POWER_MODE mode;
HAL_BOOL set_chip;
@@ -2157,14 +2157,14 @@ ar5k_ar5211_setPowerMode(hal, mode, set_chip, sleep_duration)
}
HAL_POWER_MODE
-ar5k_ar5211_getPowerMode(hal)
+ar5k_ar5211_get_power_mode(hal)
struct ath_hal *hal;
{
return (hal->ah_power_mode);
}
HAL_BOOL
-ar5k_ar5211_queryPSPollSupport(hal)
+ar5k_ar5211_query_pspoll_support(hal)
struct ath_hal *hal;
{
/* nope */
@@ -2172,7 +2172,7 @@ ar5k_ar5211_queryPSPollSupport(hal)
}
HAL_BOOL
-ar5k_ar5211_initPSPoll(hal)
+ar5k_ar5211_init_pspoll(hal)
struct ath_hal *hal;
{
/*
@@ -2182,7 +2182,7 @@ ar5k_ar5211_initPSPoll(hal)
}
HAL_BOOL
-ar5k_ar5211_enablePSPoll(hal, bssid, assoc_id)
+ar5k_ar5211_enable_pspoll(hal, bssid, assoc_id)
struct ath_hal *hal;
u_int8_t *bssid;
u_int16_t assoc_id;
@@ -2191,7 +2191,7 @@ ar5k_ar5211_enablePSPoll(hal, bssid, assoc_id)
}
HAL_BOOL
-ar5k_ar5211_disablePSPoll(hal)
+ar5k_ar5211_disable_pspoll(hal)
struct ath_hal *hal;
{
return (AH_FALSE);
@@ -2202,7 +2202,7 @@ ar5k_ar5211_disablePSPoll(hal)
*/
void
-ar5k_ar5211_beaconInit(hal, next_beacon, interval)
+ar5k_ar5211_init_beacon(hal, next_beacon, interval)
struct ath_hal *hal;
u_int32_t next_beacon;
u_int32_t interval;
@@ -2243,7 +2243,7 @@ ar5k_ar5211_beaconInit(hal, next_beacon, interval)
}
void
-ar5k_ar5211_setStationBeaconTimers(hal, state, tsf, dtim_count, cfp_count)
+ar5k_ar5211_set_beacon_timers(hal, state, tsf, dtim_count, cfp_count)
struct ath_hal *hal;
const HAL_BEACON_STATE *state;
u_int32_t tsf;
@@ -2310,7 +2310,7 @@ ar5k_ar5211_setStationBeaconTimers(hal, state, tsf, dtim_count, cfp_count)
}
void
-ar5k_ar5211_resetStationBeaconTimers(hal)
+ar5k_ar5211_reset_beacon(hal)
struct ath_hal *hal;
{
/*
@@ -2327,7 +2327,7 @@ ar5k_ar5211_resetStationBeaconTimers(hal)
}
HAL_BOOL
-ar5k_ar5211_waitForBeaconDone(hal, phys_addr)
+ar5k_ar5211_wait_for_beacon(hal, phys_addr)
struct ath_hal *hal;
bus_addr_t phys_addr;
{
@@ -2351,14 +2351,14 @@ ar5k_ar5211_waitForBeaconDone(hal, phys_addr)
*/
HAL_BOOL
-ar5k_ar5211_isInterruptPending(hal)
+ar5k_ar5211_is_intr_pending(hal)
struct ath_hal *hal;
{
return (AR5K_REG_READ(AR5K_AR5211_INTPEND) == 0 ? AH_FALSE : AH_TRUE);
}
HAL_BOOL
-ar5k_ar5211_getPendingInterrupts(hal, interrupt_mask)
+ar5k_ar5211_get_isr(hal, interrupt_mask)
struct ath_hal *hal;
u_int32_t *interrupt_mask;
{
@@ -2397,7 +2397,7 @@ ar5k_ar5211_getPendingInterrupts(hal, interrupt_mask)
}
u_int32_t
-ar5k_ar5211_getInterrupts(hal)
+ar5k_ar5211_get_intr(hal)
struct ath_hal *hal;
{
/* Return the interrupt mask stored previously */
@@ -2405,7 +2405,7 @@ ar5k_ar5211_getInterrupts(hal)
}
HAL_INT
-ar5k_ar5211_setInterrupts(hal, new_mask)
+ar5k_ar5211_set_intr(hal, new_mask)
struct ath_hal *hal;
HAL_INT new_mask;
{