Showing error 1914

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: drivers/net/wireless/ath9k/rc.c
Line in file: 886
Project: Linux Kernel
Project version: 2.6.28
Tools: Cppcheck (1.59)
Entered: 2013-10-17 18:38:34 UTC


Source:

 856                ar5416_setfull_ratetable(asc);
 857
 858        if (avp->av_config.av_fixed_rateset != IEEE80211_FIXED_RATE_NONE) {
 859                asc->fixedrix =
 860                        sc->sc_rixmap[avp->av_config.av_fixed_rateset & 0xff];
 861                /* NB: check the fixed rate exists */
 862                if (asc->fixedrix == 0xff)
 863                        asc->fixedrix = IEEE80211_FIXED_RATE_NONE;
 864        } else {
 865                asc->fixedrix = IEEE80211_FIXED_RATE_NONE;
 866        }
 867}
 868
 869static u8 ath_rc_ratefind_ht(struct ath_softc *sc,
 870                             struct ath_rate_node *ath_rc_priv,
 871                             const struct ath_rate_table *rate_table,
 872                             int probe_allowed, int *is_probing,
 873                             int is_retry)
 874{
 875        u32 dt, best_thruput, this_thruput, now_msec;
 876        u8 rate, next_rate, best_rate, maxindex, minindex;
 877        int8_t  rssi_last, rssi_reduce = 0, index = 0;
 878        struct ath_tx_ratectrl  *rate_ctrl = NULL;
 879
 880        rate_ctrl = (struct ath_tx_ratectrl *)(ath_rc_priv ?
 881                                               (ath_rc_priv) : NULL);
 882
 883        *is_probing = FALSE;
 884
 885        rssi_last = median(rate_ctrl->rssi_last,
 886                           rate_ctrl->rssi_last_prev,
 887                           rate_ctrl->rssi_last_prev2);
 888
 889        /*
 890         * Age (reduce) last ack rssi based on how old it is.
 891         * The bizarre numbers are so the delta is 160msec,
 892         * meaning we divide by 16.
 893         *   0msec   <= dt <= 25msec:   don't derate
 894         *   25msec  <= dt <= 185msec:  derate linearly from 0 to 10dB
 895         *   185msec <= dt:             derate by 10dB
 896         */
Show full sources