Fix non-debug compilation warnings about unused functions/variables

git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3532 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
mtaylor 2008-04-10 23:48:41 +00:00
parent fd66cd648f
commit dc1f1c8425
3 changed files with 15 additions and 16 deletions

View File

@ -1593,18 +1593,14 @@ ath_vap_delete(struct ieee80211vap *vap)
void void
ath_suspend(struct net_device *dev) ath_suspend(struct net_device *dev)
{ {
struct ath_softc *sc = dev->priv; DPRINTF(dev->priv, ATH_DEBUG_ANY, "flags=%x\n", dev->flags);
DPRINTF(sc, ATH_DEBUG_ANY, "flags=%x\n", dev->flags);
ath_stop(dev); ath_stop(dev);
} }
void void
ath_resume(struct net_device *dev) ath_resume(struct net_device *dev)
{ {
struct ath_softc *sc = dev->priv; DPRINTF(dev->priv, ATH_DEBUG_ANY, "flags=%x\n", dev->flags);
DPRINTF(sc, ATH_DEBUG_ANY, "flags=%x\n", dev->flags);
ath_init(dev); ath_init(dev);
} }
@ -6382,7 +6378,6 @@ ath_recv_mgmt(struct ieee80211vap * vap, struct ieee80211_node *ni_or_null,
struct sk_buff *skb, int subtype, int rssi, u_int64_t rtsf) struct sk_buff *skb, int subtype, int rssi, u_int64_t rtsf)
{ {
struct ath_softc *sc = vap->iv_ic->ic_dev->priv; struct ath_softc *sc = vap->iv_ic->ic_dev->priv;
struct ieee80211_frame *wh = (struct ieee80211_frame *)skb->data;
struct ieee80211_node * ni = ni_or_null; struct ieee80211_node * ni = ni_or_null;
u_int64_t hw_tsf, beacon_tsf; u_int64_t hw_tsf, beacon_tsf;
u_int32_t hw_tu, beacon_tu, intval; u_int32_t hw_tu, beacon_tu, intval;
@ -6393,7 +6388,7 @@ ath_recv_mgmt(struct ieee80211vap * vap, struct ieee80211_node *ni_or_null,
DPRINTF(sc, ATH_DEBUG_BEACON, DPRINTF(sc, ATH_DEBUG_BEACON,
"vap:%p[" MAC_FMT "] ni:%p[" MAC_FMT "]\n", "vap:%p[" MAC_FMT "] ni:%p[" MAC_FMT "]\n",
vap, MAC_ADDR(vap->iv_bssid), vap, MAC_ADDR(vap->iv_bssid),
ni, MAC_ADDR(wh->i_addr2)); ni, MAC_ADDR(((struct ieee80211_frame *)skb->data)->i_addr2));
/* Call up first so subsequent work can use information /* Call up first so subsequent work can use information
* potentially stored in the node (e.g. for ibss merge). */ * potentially stored in the node (e.g. for ibss merge). */
@ -8567,7 +8562,6 @@ ath_tx_timeout(struct net_device *dev)
static void static void
ath_tx_draintxq(struct ath_softc *sc, struct ath_txq *txq) ath_tx_draintxq(struct ath_softc *sc, struct ath_txq *txq)
{ {
struct ath_hal *ah = sc->sc_ah;
struct ath_buf *bf; struct ath_buf *bf;
/* /*
* NB: this assumes output has been stopped and * NB: this assumes output has been stopped and
@ -8585,7 +8579,7 @@ ath_tx_draintxq(struct ath_softc *sc, struct ath_txq *txq)
ATH_TXQ_UNLOCK_IRQ(txq); ATH_TXQ_UNLOCK_IRQ(txq);
#ifdef AR_DEBUG #ifdef AR_DEBUG
if (sc->sc_debug & ATH_DEBUG_RESET) if (sc->sc_debug & ATH_DEBUG_RESET)
ath_printtxbuf(bf, ath_hal_txprocdesc(ah, bf->bf_desc, ath_printtxbuf(bf, ath_hal_txprocdesc(sc->sc_ah, bf->bf_desc,
&bf->bf_dsstatus.ds_txstat) == HAL_OK); &bf->bf_dsstatus.ds_txstat) == HAL_OK);
#endif /* AR_DEBUG */ #endif /* AR_DEBUG */

View File

@ -150,7 +150,9 @@ static struct radar_pattern_specification radar_patterns[] = {
#endif #endif
}; };
#ifdef AR_DEBUG
static u_int32_t interval_to_frequency(u_int32_t pri); static u_int32_t interval_to_frequency(u_int32_t pri);
#endif /* AR_DEBUG */
/* Returns true if radar detection is enabled. */ /* Returns true if radar detection is enabled. */
int ath_radar_is_enabled(struct ath_softc *sc) int ath_radar_is_enabled(struct ath_softc *sc)
@ -223,7 +225,6 @@ int ath_radar_update(struct ath_softc *sc)
{ {
struct ath_hal *ah = sc->sc_ah; struct ath_hal *ah = sc->sc_ah;
struct net_device *dev = sc->sc_dev;
struct ieee80211com *ic = &sc->sc_ic; struct ieee80211com *ic = &sc->sc_ic;
int required = 0; int required = 0;
@ -236,7 +237,7 @@ int ath_radar_update(struct ath_softc *sc)
if (ath_radar_correct_dfs_flags(sc, &sc->sc_curchan)) if (ath_radar_correct_dfs_flags(sc, &sc->sc_curchan))
DPRINTF(sc, ATH_DEBUG_DOTH, "%s: %s: channel required " DPRINTF(sc, ATH_DEBUG_DOTH, "%s: %s: channel required "
"corrections to private flags.\n", "corrections to private flags.\n",
DEV_NAME(dev), __func__); SC_DEV_NAME(sc), __func__);
required = ath_radar_is_dfs_required(sc, &sc->sc_curchan) && required = ath_radar_is_dfs_required(sc, &sc->sc_curchan) &&
(ic->ic_flags & IEEE80211_F_DOTH); (ic->ic_flags & IEEE80211_F_DOTH);
/* configure radar pulse detector register using default values, but do /* configure radar pulse detector register using default values, but do
@ -361,6 +362,7 @@ static struct ath_rp *pulse_prev(struct ath_rp *pulse)
#define MR_FAIL_MIN_PERIOD 4 #define MR_FAIL_MIN_PERIOD 4
#define MR_FAIL_MAX_PERIOD 5 #define MR_FAIL_MAX_PERIOD 5
#ifdef AR_DEBUG
static const char* get_match_result_desc(u_int32_t code) { static const char* get_match_result_desc(u_int32_t code) {
switch (code) { switch (code) {
case MR_MATCH: case MR_MATCH:
@ -379,6 +381,7 @@ static const char* get_match_result_desc(u_int32_t code) {
return "unknown"; return "unknown";
} }
} }
#endif /* AR_DEBUG */
static int32_t match_radar( static int32_t match_radar(
u_int32_t matched, u_int32_t matched,
@ -770,7 +773,7 @@ static HAL_BOOL rp_analyse_short_pulse(
struct ath_softc *sc, struct ath_rp *last_pulse, struct ath_softc *sc, struct ath_rp *last_pulse,
u_int32_t *index, u_int32_t *pri, u_int32_t *matching_pulses, u_int32_t *index, u_int32_t *pri, u_int32_t *matching_pulses,
u_int32_t *missed_pulses, u_int32_t *noise_pulses) u_int32_t *missed_pulses, u_int32_t *noise_pulses)
{ struct net_device *dev = sc->sc_dev; {
int i; int i;
int best_index = -1; int best_index = -1;
unsigned int best_matched = 0; unsigned int best_matched = 0;
@ -1212,6 +1215,7 @@ static HAL_BOOL rp_analyse_short_pulse(
return (-1 != best_index) ? AH_TRUE : AH_FALSE; return (-1 != best_index) ? AH_TRUE : AH_FALSE;
} }
#ifdef AR_DEBUG
static u_int32_t interval_to_frequency(u_int32_t interval) static u_int32_t interval_to_frequency(u_int32_t interval)
{ {
/* Calculate BRI from PRI */ /* Calculate BRI from PRI */
@ -1219,6 +1223,7 @@ static u_int32_t interval_to_frequency(u_int32_t interval)
/* Round to nearest multiple of 50 */ /* Round to nearest multiple of 50 */
return frequency + ((frequency % 50) >= 25 ? 50 : 0) - (frequency % 50); return frequency + ((frequency % 50) >= 25 ? 50 : 0) - (frequency % 50);
} }
#endif /* AR_DEBUG */
#ifdef ATH_RADAR_LONG_PULSE #ifdef ATH_RADAR_LONG_PULSE
static const char* get_longpulse_desc(int lp) { static const char* get_longpulse_desc(int lp) {
@ -1575,12 +1580,11 @@ void ath_rp_done(struct ath_softc *sc)
void ath_rp_record(struct ath_softc *sc, u_int64_t tsf, u_int8_t rssi, void ath_rp_record(struct ath_softc *sc, u_int64_t tsf, u_int8_t rssi,
u_int8_t width, HAL_BOOL is_simulated) u_int8_t width, HAL_BOOL is_simulated)
{ {
struct net_device *dev = sc->sc_dev;
struct ath_rp *pulse; struct ath_rp *pulse;
DPRINTF(sc, ATH_DEBUG_DOTHPULSES, "%s: ath_rp_record: " DPRINTF(sc, ATH_DEBUG_DOTHPULSES, "%s: ath_rp_record: "
"tsf=%10llu rssi=%3u width=%3u%s\n", "tsf=%10llu rssi=%3u width=%3u%s\n",
DEV_NAME(dev), tsf, rssi, width, SC_DEV_NAME(sc), tsf, rssi, width,
sc->sc_rp_ignored ? " (ignored)" : ""); sc->sc_rp_ignored ? " (ignored)" : "");
if (sc->sc_rp_ignored) { if (sc->sc_rp_ignored) {

View File

@ -802,9 +802,9 @@ pick_channel(struct ieee80211_scan_state *ss, struct ieee80211vap *vap,
sort(chans, ss_last, sizeof(*chans), pc_cmp, pc_swap); sort(chans, ss_last, sizeof(*chans), pc_cmp, pc_swap);
#ifdef IEEE80211_DEBUG
for (i = 0; i < ss_last; i++) { for (i = 0; i < ss_last; i++) {
int chan = ieee80211_chan2ieee(ic, chans[i].chan); int chan = ieee80211_chan2ieee(ic, chans[i].chan);
IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, "%s: channel %u, " IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, "%s: channel %u, "
"rssi %d, radar %d, cn %d, km %d\n", "rssi %d, radar %d, cn %d, km %d\n",
__func__, chan, as->as_maxrssi[chan], __func__, chan, as->as_maxrssi[chan],
@ -813,6 +813,7 @@ pick_channel(struct ieee80211_scan_state *ss, struct ieee80211vap *vap,
!!IEEE80211_ARE_CHANS_SAME_MODE(chans[i].chan, !!IEEE80211_ARE_CHANS_SAME_MODE(chans[i].chan,
ic->ic_bsschan)); ic->ic_bsschan));
} }
#endif /* IEEE80211_DEBUG */
best = NULL; best = NULL;
best_rssi = 0xff; /* If signal is bigger than 0xff, we'd be melting. */ best_rssi = 0xff; /* If signal is bigger than 0xff, we'd be melting. */