Search Linux Wireless

Re: [PATCH 5/5] ath5k: Add busy ratios to survey data

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

 



On Tue, Oct 5, 2010 at 2:55 AM, Bruno Randolf <br1@xxxxxxxxxxx> wrote:
> Include the channel utilization (busy, rx, tx) in the survey results.
>
> Signed-off-by: Bruno Randolf <br1@xxxxxxxxxxx>
> ---
> Âdrivers/net/wireless/ath/ath5k/base.c | Â 17 +++++++++++++++++
> Â1 files changed, 17 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> index c158f2e..a33d9f2 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -3008,6 +3008,7 @@ static int ath5k_get_survey(struct ieee80211_hw *hw, int idx,
> Â{
> Â Â Â Âstruct ath5k_softc *sc = hw->priv;
> Â Â Â Âstruct ieee80211_conf *conf = &hw->conf;
> + Â Â Â struct ath_common *common = ath5k_hw_common(sc->ah);
>
> Â Â Â Â if (idx != 0)
> Â Â Â Â Â Â Â Âreturn -ENOENT;
> @@ -3016,6 +3017,22 @@ static int ath5k_get_survey(struct ieee80211_hw *hw, int idx,
> Â Â Â Âsurvey->filled = SURVEY_INFO_NOISE_DBM;
> Â Â Â Âsurvey->noise = sc->ah->ah_noise_floor;
>
> + Â Â Â ath_hw_cycle_counters_lock(common);
> + Â Â Â ath_hw_cycle_counters_update(common);
> + Â Â Â if (common->cc_survey.cycles > 0) {
> + Â Â Â Â Â Â Â survey->filled |= SURVEY_INFO_BUSY |
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â SURVEY_INFO_BUSY_TX | SURVEY_INFO_BUSY_RX;
> + Â Â Â Â Â Â Â survey->busy = common->cc_survey.rx_busy * 255 /
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â common->cc_survey.cycles;
> + Â Â Â Â Â Â Â survey->busy_tx = common->cc_survey.tx_frame * 255 /
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â common->cc_survey.cycles;
> + Â Â Â Â Â Â Â survey->busy_rx = common->cc_survey.rx_frame * 255 /
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â common->cc_survey.cycles;
> + Â Â Â }
> +
> + Â Â Â memset(&common->cc_survey, 0, sizeof(struct ath_cycle_counters));
> + Â Â Â ath_hw_cycle_counters_unlock(common);
> +

This is all being sucked out of common, so can we just share the
filler for the survey between ath5k and ath9k? Note we should split up
hw code and core driver code on the ath module by file.

  Luis
--
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