From: Oleksij Rempel Date: Sat, 11 May 2013 16:32:12 +0000 (+0200) Subject: remove unused variables in ath_hal_getcapability X-Git-Tag: 1.4.0~12^2^2~14 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=b8948b54b051289c5a49f92b299eb369a4dccbb2;p=open-ath9k-htc-firmware.git remove unused variables in ath_hal_getcapability Signed-off-by: Oleksij Rempel --- diff --git a/target_firmware/wlan/ah.c b/target_firmware/wlan/ah.c index 71deb5e..ea79d12 100755 --- a/target_firmware/wlan/ah.c +++ b/target_firmware/wlan/ah.c @@ -54,9 +54,7 @@ ath_hal_attach_tgt(a_uint32_t devid,HAL_SOFTC sc, } HAL_STATUS -ath_hal_getcapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type, - a_uint32_t capability, a_uint32_t *result) - +ath_hal_getcapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type) { const HAL_CAPABILITIES *pCap = &AH_PRIVATE(ah)->ah_caps; switch (type) { @@ -113,7 +111,7 @@ ath_hal_computetxtime(struct ath_hal *ah, numBits = frameLen << 3; txTime = phyTime + ((numBits * 1000)/kbps); /* TODO: make sure the same value of txTime can use in all device */ - if (ath_hal_getcapability(ah, HAL_CAP_HT, 0, AH_NULL) != HAL_OK) + if (ath_hal_getcapability(ah, HAL_CAP_HT) != HAL_OK) txTime = txTime + CCK_SIFS_TIME; break; case IEEE80211_T_OFDM: @@ -125,7 +123,7 @@ ath_hal_computetxtime(struct ath_hal *ah, numSymbols = asf_howmany(numBits, bitsPerSymbol); txTime = OFDM_PREAMBLE_TIME + (numSymbols * OFDM_SYMBOL_TIME); /* TODO: make sure the same value of txTime can use in all device */ - if (ath_hal_getcapability(ah, HAL_CAP_HT, 0, AH_NULL) != HAL_OK) + if (ath_hal_getcapability(ah, HAL_CAP_HT) != HAL_OK) txTime = txTime + OFDM_SIFS_TIME; break; default: @@ -180,7 +178,7 @@ ath_hal_wait(struct ath_hal *ah, a_uint32_t reg, a_uint32_t mask, a_uint32_t val a_int32_t i; - if (ath_hal_getcapability(ah, HAL_CAP_HT, 0, AH_NULL) == HAL_OK) { + if (ath_hal_getcapability(ah, HAL_CAP_HT) == HAL_OK) { for (i = 0; i < AH_TIMEOUT_11N; i++) { if ((OS_REG_READ(ah, reg) & mask) == val) return AH_TRUE; diff --git a/target_firmware/wlan/ah_internal.h b/target_firmware/wlan/ah_internal.h index 64a54a0..a43652e 100755 --- a/target_firmware/wlan/ah_internal.h +++ b/target_firmware/wlan/ah_internal.h @@ -260,8 +260,7 @@ extern void ath_hal_free(void *); * this routine to support chip-specific capabilities. */ extern HAL_STATUS ath_hal_getcapability(struct ath_hal *ah, - HAL_CAPABILITY_TYPE type, a_uint32_t capability, - a_uint32_t *result); + HAL_CAPABILITY_TYPE type); extern HAL_BOOL ath_hal_setcapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type, a_uint32_t capability, a_uint32_t setting, HAL_STATUS *status); diff --git a/target_firmware/wlan/if_ath.c b/target_firmware/wlan/if_ath.c index 53b15cd..aa43c23 100755 --- a/target_firmware/wlan/if_ath.c +++ b/target_firmware/wlan/if_ath.c @@ -1132,7 +1132,7 @@ static void ath_init_tgt(void *Context, A_UINT16 Command, sc->sc_imask |= HAL_INT_GTT; - if (ath_hal_htsupported(ah)) + if (ath_hal_getcapability(ah, HAL_CAP_HT)) sc->sc_imask |= HAL_INT_CST; adf_os_setup_intr(sc->sc_dev, ath_intr); diff --git a/target_firmware/wlan/if_athvar.h b/target_firmware/wlan/if_athvar.h index f6f67cb..2c42ee3 100755 --- a/target_firmware/wlan/if_athvar.h +++ b/target_firmware/wlan/if_athvar.h @@ -489,9 +489,4 @@ typedef enum { a_uint8_t ath_get_minrateidx(struct ath_softc_tgt *sc, struct ath_vap_target *avp); -#define ath_hal_htsupported(_ah) \ - (ath_hal_getcapability(_ah, HAL_CAP_HT, 0, NULL) == HAL_OK) -#define ath_hal_getrtsaggrlimit(_ah, _pv) \ - (ath_hal_getcapability(_ah, HAL_CAP_RTS_AGGR_LIMIT, 0, _pv) == HAL_OK) - #endif /* _DEV_ATH_ATHVAR_H */ diff --git a/target_firmware/wlan/if_owl.c b/target_firmware/wlan/if_owl.c index 19a945c..b7df875 100755 --- a/target_firmware/wlan/if_owl.c +++ b/target_firmware/wlan/if_owl.c @@ -387,7 +387,7 @@ static void ath_buf_set_rate(struct ath_softc_tgt *sc, struct ath_tx_buf *bf) cix = rt->info[sc->sc_protrix].controlRate; prot_mode = AH_TRUE; } else { - if (ath_hal_htsupported(ah) && (!bf->bf_ismcast)) + if (ath_hal_getcapability(ah, HAL_CAP_HT) && (!bf->bf_ismcast)) flags = HAL_TXDESC_RTSENA; for (i = 4; i--;) {