Search Linux Wireless

Re: [PATCH 8/8] ath5k: Remove redundant sc->curband

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/1/19 Bruno Randolf <br1@xxxxxxxxxxx>:
> Remove sc->curband because the band is already stored in the current channel.
>
> Signed-off-by: Bruno Randolf <br1@xxxxxxxxxxx>
> ---
> Âdrivers/net/wireless/ath/ath5k/base.c | Â 11 ++++-------
> Âdrivers/net/wireless/ath/ath5k/base.h | Â Â2 --
> Â2 files changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> index a00cc11..0e39ee8 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -551,7 +551,7 @@ ath5k_hw_to_driver_rix(struct ath5k_softc *sc, int hw_rix)
> Â Â Â Â Â Â Â Â Â Â Â Â"hw_rix out of bounds: %x\n", hw_rix))
> Â Â Â Â Â Â Â Âreturn 0;
>
> - Â Â Â rix = sc->rate_idx[sc->curband->band][hw_rix];
> + Â Â Â rix = sc->rate_idx[sc->curchan->band][hw_rix];
> Â Â Â Âif (WARN(rix < 0, "invalid hw_rix: %x\n", hw_rix))
> Â Â Â Â Â Â Â Ârix = 0;
>
> @@ -1361,7 +1361,7 @@ ath5k_receive_frame(struct ath5k_softc *sc, struct sk_buff *skb,
> Â Â Â Ârxs->flag |= RX_FLAG_TSFT;
>
> Â Â Â Ârxs->freq = sc->curchan->center_freq;
> - Â Â Â rxs->band = sc->curband->band;
> + Â Â Â rxs->band = sc->curchan->band;
>
> Â Â Â Ârxs->signal = sc->ah->ah_noise_floor + rs->rs_rssi;
>
> @@ -1376,7 +1376,7 @@ ath5k_receive_frame(struct ath5k_softc *sc, struct sk_buff *skb,
> Â Â Â Ârxs->flag |= ath5k_rx_decrypted(sc, skb, rs);
>
> Â Â Â Âif (rxs->rate_idx >= 0 && rs->rs_rate ==
> - Â Â Â Â Â sc->curband->bitrates[rxs->rate_idx].hw_value_short)
> + Â Â Â Â Â sc->sbands[sc->curchan->band].bitrates[rxs->rate_idx].hw_value_short)
> Â Â Â Â Â Â Â Ârxs->flag |= RX_FLAG_SHORTPRE;
>
> Â Â Â Âath5k_debug_dump_skb(sc, skb, "RX Â", 0);
> @@ -2536,7 +2536,6 @@ ath5k_init_hw(struct ath5k_softc *sc)
> Â Â Â Â * and then setup of the interrupt mask.
> Â Â Â Â */
> Â Â Â Âsc->curchan = sc->hw->conf.channel;
> - Â Â Â sc->curband = &sc->sbands[sc->curchan->band];
> Â Â Â Âsc->imask = AR5K_INT_RXOK | AR5K_INT_RXERR | AR5K_INT_RXEOL |
> Â Â Â Â Â Â Â ÂAR5K_INT_RXORN | AR5K_INT_TXDESC | AR5K_INT_TXEOL |
> Â Â Â Â Â Â Â ÂAR5K_INT_FATAL | AR5K_INT_GLOBAL | AR5K_INT_MIB;
> @@ -2663,10 +2662,8 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
> Â Â Â Â * so we should also free any remaining
> Â Â Â Â * tx buffers */
> Â Â Â Âath5k_drain_tx_buffs(sc);
> - Â Â Â if (chan) {
> + Â Â Â if (chan)
> Â Â Â Â Â Â Â Âsc->curchan = chan;
> - Â Â Â Â Â Â Â sc->curband = &sc->sbands[chan->band];
> - Â Â Â }
> Â Â Â Âret = ath5k_hw_reset(ah, sc->opmode, sc->curchan, chan != NULL,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âskip_pcu);
> Â Â Â Âif (ret) {
> diff --git a/drivers/net/wireless/ath/ath5k/base.h b/drivers/net/wireless/ath/ath5k/base.h
> index 58660e4..8f919dc 100644
> --- a/drivers/net/wireless/ath/ath5k/base.h
> +++ b/drivers/net/wireless/ath/ath5k/base.h
> @@ -183,8 +183,6 @@ struct ath5k_softc {
>    Âenum nl80211_iftype   opmode;
>    Âstruct ath5k_hw     *ah;      Â/* Atheros HW */
>
> -    struct ieee80211_supported_band     *curband;
> -
> Â#ifdef CONFIG_ATH5K_DEBUG
>    Âstruct ath5k_dbg_info  debug;     Â/* debug info */
> Â#endif /* CONFIG_ATH5K_DEBUG */
>


Acked-by: Nick Kossifidis <mickflemm@xxxxxxxxx>


-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux