All of the survey data is (currently) per channel anyway, so having the word "channel" in the name does nothing. In the next patch I'll introduce global data to the survey, where the word "channel" is actually confusing.
Unified · Split
| @@ -1344,11 +1344,11 @@ static void ath10k_wmi_event_chan_info(struct ath10k *ar, struct sk_buff *skb) · 1343 unmodified lines | |||
| 1344 | rx_clear_count -= ar->survey_last_rx_clear_count; | 1344 | rx_clear_count -= ar->survey_last_rx_clear_count; |
| 1345 | 1345 | ||
| 1346 | survey = &ar->survey[idx]; | 1346 | survey = &ar->survey[idx]; |
| 1347 | survey->channel_time = WMI_CHAN_INFO_MSEC(cycle_count); | 1347 | survey->time = WMI_CHAN_INFO_MSEC(cycle_count); |
| 1348 | survey->channel_time_rx = WMI_CHAN_INFO_MSEC(rx_clear_count); | 1348 | survey->time_rx = WMI_CHAN_INFO_MSEC(rx_clear_count); |
| 1349 | survey->noise = noise_floor; | 1349 | survey->noise = noise_floor; |
| 1350 | survey->filled = SURVEY_INFO_CHANNEL_TIME | | 1350 | survey->filled = SURVEY_INFO_TIME | |
| 1351 | SURVEY_INFO_CHANNEL_TIME_RX | | 1351 | SURVEY_INFO_TIME_RX | |
| 1352 | SURVEY_INFO_NOISE_DBM; | 1352 | SURVEY_INFO_NOISE_DBM; |
| 1353 | } | 1353 | } |
| 1354 | 1354 | ||
| @@ -672,10 +672,10 @@ ath5k_get_survey(struct ieee80211_hw *hw, int idx, struct survey_info *survey) · 671 unmodified lines | |||
| 672 | spin_lock_bh(&common->cc_lock); | 672 | spin_lock_bh(&common->cc_lock); |
| 673 | ath_hw_cycle_counters_update(common); | 673 | ath_hw_cycle_counters_update(common); |
| 674 | if (cc->cycles > 0) { | 674 | if (cc->cycles > 0) { |
| 675 | ah->survey.channel_time += cc->cycles / div; | 675 | ah->survey.time += cc->cycles / div; |
| 676 | ah->survey.channel_time_busy += cc->rx_busy / div; | 676 | ah->survey.time_busy += cc->rx_busy / div; |
| 677 | ah->survey.channel_time_rx += cc->rx_frame / div; | 677 | ah->survey.time_rx += cc->rx_frame / div; |
| 678 | ah->survey.channel_time_tx += cc->tx_frame / div; | 678 | ah->survey.time_tx += cc->tx_frame / div; |
| 679 | } | 679 | } |
| 680 | memset(cc, 0, sizeof(*cc)); | 680 | memset(cc, 0, sizeof(*cc)); |
| 681 | spin_unlock_bh(&common->cc_lock); | 681 | spin_unlock_bh(&common->cc_lock); |
| @@ -686,10 +686,10 @@ ath5k_get_survey(struct ieee80211_hw *hw, int idx, struct survey_info *survey) · 4 unmodified lines | |||
| 686 | survey->noise = ah->ah_noise_floor; | 686 | survey->noise = ah->ah_noise_floor; |
| 687 | survey->filled = SURVEY_INFO_NOISE_DBM | | 687 | survey->filled = SURVEY_INFO_NOISE_DBM | |
| 688 | SURVEY_INFO_IN_USE | | 688 | SURVEY_INFO_IN_USE | |
| 689 | SURVEY_INFO_CHANNEL_TIME | | 689 | SURVEY_INFO_TIME | |
| 690 | SURVEY_INFO_CHANNEL_TIME_BUSY | | 690 | SURVEY_INFO_TIME_BUSY | |
| 691 | SURVEY_INFO_CHANNEL_TIME_RX | | 691 | SURVEY_INFO_TIME_RX | |
| 692 | SURVEY_INFO_CHANNEL_TIME_TX; | 692 | SURVEY_INFO_TIME_TX; |
| 693 | 693 | ||
| 694 | return 0; | 694 | return 0; |
| 695 | } | 695 | } |
| @@ -516,14 +516,14 @@ int ath_update_survey_stats(struct ath_softc *sc) · 515 unmodified lines | |||
| 516 | ath_hw_cycle_counters_update(common); | 516 | ath_hw_cycle_counters_update(common); |
| 517 | 517 | ||
| 518 | if (cc->cycles > 0) { | 518 | if (cc->cycles > 0) { |
| 519 | survey->filled |= SURVEY_INFO_CHANNEL_TIME | | 519 | survey->filled |= SURVEY_INFO_TIME | |
| 520 | SURVEY_INFO_CHANNEL_TIME_BUSY | | 520 | SURVEY_INFO_TIME_BUSY | |
| 521 | SURVEY_INFO_CHANNEL_TIME_RX | | 521 | SURVEY_INFO_TIME_RX | |
| 522 | SURVEY_INFO_CHANNEL_TIME_TX; | 522 | SURVEY_INFO_TIME_TX; |
| 523 | survey->channel_time += cc->cycles / div; | 523 | survey->time += cc->cycles / div; |
| 524 | survey->channel_time_busy += cc->rx_busy / div; | 524 | survey->time_busy += cc->rx_busy / div; |
| 525 | survey->channel_time_rx += cc->rx_frame / div; | 525 | survey->time_rx += cc->rx_frame / div; |
| 526 | survey->channel_time_tx += cc->tx_frame / div; | 526 | survey->time_tx += cc->tx_frame / div; |
| 527 | } | 527 | } |
| 528 | 528 | ||
| 529 | if (cc->cycles < div) | 529 | if (cc->cycles < div) |
| @@ -188,12 +188,12 @@ int carl9170_collect_tally(struct ar9170 *ar) · 187 unmodified lines | |||
| 188 | 188 | ||
| 189 | if (ar->channel) { | 189 | if (ar->channel) { |
| 190 | info = &ar->survey[ar->channel->hw_value]; | 190 | info = &ar->survey[ar->channel->hw_value]; |
| 191 | info->channel_time = ar->tally.active; | 191 | info->time = ar->tally.active; |
| 192 | info->channel_time_busy = ar->tally.cca; | 192 | info->time_busy = ar->tally.cca; |
| 193 | info->channel_time_tx = ar->tally.tx_time; | 193 | info->time_tx = ar->tally.tx_time; |
| 194 | do_div(info->channel_time, 1000); | 194 | do_div(info->time, 1000); |
| 195 | do_div(info->channel_time_busy, 1000); | 195 | do_div(info->time_busy, 1000); |
| 196 | do_div(info->channel_time_tx, 1000); | 196 | do_div(info->time_tx, 1000); |
| 197 | } | 197 | } |
| 198 | } | 198 | } |
| 199 | return 0; | 199 | return 0; |
| @@ -1690,9 +1690,9 @@ found: · 1689 unmodified lines | |||
| 1690 | survey->filled |= SURVEY_INFO_IN_USE; | 1690 | survey->filled |= SURVEY_INFO_IN_USE; |
| 1691 | 1691 | ||
| 1692 | if (ar->fw.hw_counters) { | 1692 | if (ar->fw.hw_counters) { |
| 1693 | survey->filled |= SURVEY_INFO_CHANNEL_TIME | | 1693 | survey->filled |= SURVEY_INFO_TIME | |
| 1694 | SURVEY_INFO_CHANNEL_TIME_BUSY | | 1694 | SURVEY_INFO_TIME_BUSY | |
| 1695 | SURVEY_INFO_CHANNEL_TIME_TX; | 1695 | SURVEY_INFO_TIME_TX; |
| 1696 | } | 1696 | } |
| 1697 | 1697 | ||
| 1698 | return 0; | 1698 | return 0; |
| @@ -1037,10 +1037,11 @@ mwifiex_cfg80211_dump_survey(struct wiphy *wiphy, struct net_device *dev, · 1036 unmodified lines | |||
| 1037 | survey->channel = ieee80211_get_channel(wiphy, | 1037 | survey->channel = ieee80211_get_channel(wiphy, |
| 1038 | ieee80211_channel_to_frequency(pchan_stats[idx].chan_num, band)); | 1038 | ieee80211_channel_to_frequency(pchan_stats[idx].chan_num, band)); |
| 1039 | survey->filled = SURVEY_INFO_NOISE_DBM | | 1039 | survey->filled = SURVEY_INFO_NOISE_DBM | |
| 1040 | SURVEY_INFO_CHANNEL_TIME | SURVEY_INFO_CHANNEL_TIME_BUSY; | 1040 | SURVEY_INFO_TIME | |
| 1041 | SURVEY_INFO_TIME_BUSY; | ||
| 1041 | survey->noise = pchan_stats[idx].noise; | 1042 | survey->noise = pchan_stats[idx].noise; |
| 1042 | survey->channel_time = pchan_stats[idx].cca_scan_dur; | 1043 | survey->time = pchan_stats[idx].cca_scan_dur; |
| 1043 | survey->channel_time_busy = pchan_stats[idx].cca_busy_dur; | 1044 | survey->time_busy = pchan_stats[idx].cca_busy_dur; |
| 1044 | 1045 | ||
| 1045 | return 0; | 1046 | return 0; |
| 1046 | } | 1047 | } |
| @@ -3098,14 +3098,14 @@ static void mwl8k_update_survey(struct mwl8k_priv *priv, · 3097 unmodified lines | |||
| 3098 | 3098 | ||
| 3099 | cca_cnt = ioread32(priv->regs + NOK_CCA_CNT_REG); | 3099 | cca_cnt = ioread32(priv->regs + NOK_CCA_CNT_REG); |
| 3100 | cca_cnt /= 1000; /* uSecs to mSecs */ | 3100 | cca_cnt /= 1000; /* uSecs to mSecs */ |
| 3101 | survey->channel_time_busy = (u64) cca_cnt; | 3101 | survey->time_busy = (u64) cca_cnt; |
| 3102 | 3102 | ||
| 3103 | rx_rdy = ioread32(priv->regs + BBU_RXRDY_CNT_REG); | 3103 | rx_rdy = ioread32(priv->regs + BBU_RXRDY_CNT_REG); |
| 3104 | rx_rdy /= 1000; /* uSecs to mSecs */ | 3104 | rx_rdy /= 1000; /* uSecs to mSecs */ |
| 3105 | survey->channel_time_rx = (u64) rx_rdy; | 3105 | survey->time_rx = (u64) rx_rdy; |
| 3106 | 3106 | ||
| 3107 | priv->channel_time = jiffies - priv->channel_time; | 3107 | priv->channel_time = jiffies - priv->channel_time; |
| 3108 | survey->channel_time = jiffies_to_msecs(priv->channel_time); | 3108 | survey->time = jiffies_to_msecs(priv->channel_time); |
| 3109 | 3109 | ||
| 3110 | survey->channel = channel; | 3110 | survey->channel = channel; |
| 3111 | 3111 | ||
| @@ -3115,9 +3115,9 @@ static void mwl8k_update_survey(struct mwl8k_priv *priv, · 3 unmodified lines | |||
| 3115 | survey->noise = nf * -1; | 3115 | survey->noise = nf * -1; |
| 3116 | 3116 | ||
| 3117 | survey->filled = SURVEY_INFO_NOISE_DBM | | 3117 | survey->filled = SURVEY_INFO_NOISE_DBM | |
| 3118 | SURVEY_INFO_CHANNEL_TIME | | 3118 | SURVEY_INFO_TIME | |
| 3119 | SURVEY_INFO_CHANNEL_TIME_BUSY | | 3119 | SURVEY_INFO_TIME_BUSY | |
| 3120 | SURVEY_INFO_CHANNEL_TIME_RX; | 3120 | SURVEY_INFO_TIME_RX; |
| 3121 | } | 3121 | } |
| 3122 | 3122 | ||
| 3123 | /* | 3123 | /* |
| @@ -196,9 +196,9 @@ static int p54_generate_band(struct ieee80211_hw *dev, · 195 unmodified lines | |||
| 196 | dest->max_power = chan->max_power; | 196 | dest->max_power = chan->max_power; |
| 197 | priv->survey[*chan_num].channel = &tmp->channels[j]; | 197 | priv->survey[*chan_num].channel = &tmp->channels[j]; |
| 198 | priv->survey[*chan_num].filled = SURVEY_INFO_NOISE_DBM | | 198 | priv->survey[*chan_num].filled = SURVEY_INFO_NOISE_DBM | |
| 199 | SURVEY_INFO_CHANNEL_TIME | | 199 | SURVEY_INFO_TIME | |
| 200 | SURVEY_INFO_CHANNEL_TIME_BUSY | | 200 | SURVEY_INFO_TIME_BUSY | |
| 201 | SURVEY_INFO_CHANNEL_TIME_TX; | 201 | SURVEY_INFO_TIME_TX; |
| 202 | dest->hw_value = (*chan_num); | 202 | dest->hw_value = (*chan_num); |
| 203 | j++; | 203 | j++; |
| 204 | (*chan_num)++; | 204 | (*chan_num)++; |
| @@ -305,9 +305,9 @@ static void p54_reset_stats(struct p54_common *priv) · 304 unmodified lines | |||
| 305 | struct survey_info *info = &priv->survey[chan->hw_value]; | 305 | struct survey_info *info = &priv->survey[chan->hw_value]; |
| 306 | 306 | ||
| 307 | /* only reset channel statistics, don't touch .filled, etc. */ | 307 | /* only reset channel statistics, don't touch .filled, etc. */ |
| 308 | info->channel_time = 0; | 308 | info->time = 0; |
| 309 | info->channel_time_busy = 0; | 309 | info->time_busy = 0; |
| 310 | info->channel_time_tx = 0; | 310 | info->time_tx = 0; |
| 311 | } | 311 | } |
| 312 | 312 | ||
| 313 | priv->update_stats = true; | 313 | priv->update_stats = true; |
| @@ -636,7 +636,7 @@ static int p54_get_survey(struct ieee80211_hw *dev, int idx, · 322 unmodified lines | |||
| 636 | 636 | ||
| 637 | if (in_use) { | 637 | if (in_use) { |
| 638 | /* test if the reported statistics are valid. */ | 638 | /* test if the reported statistics are valid. */ |
| 639 | if (survey->channel_time != 0) { | 639 | if (survey->time != 0) { |
| 640 | survey->filled |= SURVEY_INFO_IN_USE; | 640 | survey->filled |= SURVEY_INFO_IN_USE; |
| 641 | } else { | 641 | } else { |
| 642 | /* | 642 | /* |
| @@ -587,13 +587,13 @@ static void p54_rx_stats(struct p54_common *priv, struct sk_buff *skb) · 586 unmodified lines | |||
| 587 | if (chan) { | 587 | if (chan) { |
| 588 | struct survey_info *survey = &priv->survey[chan->hw_value]; | 588 | struct survey_info *survey = &priv->survey[chan->hw_value]; |
| 589 | survey->noise = clamp(priv->noise, -128, 127); | 589 | survey->noise = clamp(priv->noise, -128, 127); |
| 590 | survey->channel_time = priv->survey_raw.active; | 590 | survey->time = priv->survey_raw.active; |
| 591 | survey->channel_time_tx = priv->survey_raw.tx; | 591 | survey->time_tx = priv->survey_raw.tx; |
| 592 | survey->channel_time_busy = priv->survey_raw.tx + | 592 | survey->time_busy = priv->survey_raw.tx + |
| 593 | priv->survey_raw.cca; | 593 | priv->survey_raw.cca; |
| 594 | do_div(survey->channel_time, 1024); | 594 | do_div(survey->time, 1024); |
| 595 | do_div(survey->channel_time_tx, 1024); | 595 | do_div(survey->time_tx, 1024); |
| 596 | do_div(survey->channel_time_busy, 1024); | 596 | do_div(survey->time_busy, 1024); |
| 597 | } | 597 | } |
| 598 | 598 | ||
| 599 | tmp = p54_find_and_unlink_skb(priv, hdr->req_id); | 599 | tmp = p54_find_and_unlink_skb(priv, hdr->req_id); |
| @@ -8020,13 +8020,13 @@ int rt2800_get_survey(struct ieee80211_hw *hw, int idx, · 8019 unmodified lines | |||
| 8020 | rt2800_register_read(rt2x00dev, CH_BUSY_STA_SEC, &busy_ext); | 8020 | rt2800_register_read(rt2x00dev, CH_BUSY_STA_SEC, &busy_ext); |
| 8021 | 8021 | ||
| 8022 | if (idle || busy) { | 8022 | if (idle || busy) { |
| 8023 | survey->filled = SURVEY_INFO_CHANNEL_TIME | | 8023 | survey->filled = SURVEY_INFO_TIME | |
| 8024 | SURVEY_INFO_CHANNEL_TIME_BUSY | | 8024 | SURVEY_INFO_TIME_BUSY | |
| 8025 | SURVEY_INFO_CHANNEL_TIME_EXT_BUSY; | 8025 | SURVEY_INFO_TIME_EXT_BUSY; |
| 8026 | 8026 | ||
| 8027 | survey->channel_time = (idle + busy) / 1000; | 8027 | survey->time = (idle + busy) / 1000; |
| 8028 | survey->channel_time_busy = busy / 1000; | 8028 | survey->time_busy = busy / 1000; |
| 8029 | survey->channel_time_ext_busy = busy_ext / 1000; | 8029 | survey->time_ext_busy = busy_ext / 1000; |
| 8030 | } | 8030 | } |
| 8031 | 8031 | ||
| 8032 | if (!(hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)) | 8032 | if (!(hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)) |
| @@ -520,23 +520,23 @@ ieee80211_chandef_max_power(struct cfg80211_chan_def *chandef) · 519 unmodified lines | |||
| 520 | * | 520 | * |
| 521 | * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in | 521 | * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in |
| 522 | * @SURVEY_INFO_IN_USE: channel is currently being used | 522 | * @SURVEY_INFO_IN_USE: channel is currently being used |
| 523 | * @SURVEY_INFO_CHANNEL_TIME: channel active time (in ms) was filled in | 523 | * @SURVEY_INFO_TIME: active time (in ms) was filled in |
| 524 | * @SURVEY_INFO_CHANNEL_TIME_BUSY: channel busy time was filled in | 524 | * @SURVEY_INFO_TIME_BUSY: busy time was filled in |
| 525 | * @SURVEY_INFO_CHANNEL_TIME_EXT_BUSY: extension channel busy time was filled in | 525 | * @SURVEY_INFO_TIME_EXT_BUSY: extension channel busy time was filled in |
| 526 | * @SURVEY_INFO_CHANNEL_TIME_RX: channel receive time was filled in | 526 | * @SURVEY_INFO_TIME_RX: receive time was filled in |
| 527 | * @SURVEY_INFO_CHANNEL_TIME_TX: channel transmit time was filled in | 527 | * @SURVEY_INFO_TIME_TX: transmit time was filled in |
| 528 | * | 528 | * |
| 529 | * Used by the driver to indicate which info in &struct survey_info | 529 | * Used by the driver to indicate which info in &struct survey_info |
| 530 | * it has filled in during the get_survey(). | 530 | * it has filled in during the get_survey(). |
| 531 | */ | 531 | */ |
| 532 | enum survey_info_flags { | 532 | enum survey_info_flags { |
| 533 | SURVEY_INFO_NOISE_DBM = 1<<0, | 533 | SURVEY_INFO_NOISE_DBM = BIT(0), |
| 534 | SURVEY_INFO_IN_USE = 1<<1, | 534 | SURVEY_INFO_IN_USE = BIT(1), |
| 535 | SURVEY_INFO_CHANNEL_TIME = 1<<2, | 535 | SURVEY_INFO_TIME = BIT(2), |
| 536 | SURVEY_INFO_CHANNEL_TIME_BUSY = 1<<3, | 536 | SURVEY_INFO_TIME_BUSY = BIT(3), |
| 537 | SURVEY_INFO_CHANNEL_TIME_EXT_BUSY = 1<<4, | 537 | SURVEY_INFO_TIME_EXT_BUSY = BIT(4), |
| 538 | SURVEY_INFO_CHANNEL_TIME_RX = 1<<5, | 538 | SURVEY_INFO_TIME_RX = BIT(5), |
| 539 | SURVEY_INFO_CHANNEL_TIME_TX = 1<<6, | 539 | SURVEY_INFO_TIME_TX = BIT(6), |
| 540 | }; | 540 | }; |
| 541 | 541 | ||
| 542 | /** | 542 | /** |
| @@ -546,11 +546,11 @@ enum survey_info_flags { · 3 unmodified lines | |||
| 546 | * @filled: bitflag of flags from &enum survey_info_flags | 546 | * @filled: bitflag of flags from &enum survey_info_flags |
| 547 | * @noise: channel noise in dBm. This and all following fields are | 547 | * @noise: channel noise in dBm. This and all following fields are |
| 548 | * optional | 548 | * optional |
| 549 | * @channel_time: amount of time in ms the radio spent on the channel | 549 | * @time: amount of time in ms the radio was turn on (on the channel) |
| 550 | * @channel_time_busy: amount of time the primary channel was sensed busy | 550 | * @time_busy: amount of time the primary channel was sensed busy |
| 551 | * @channel_time_ext_busy: amount of time the extension channel was sensed busy | 551 | * @time_ext_busy: amount of time the extension channel was sensed busy |
| 552 | * @channel_time_rx: amount of time the radio spent receiving data | 552 | * @time_rx: amount of time the radio spent receiving data |
| 553 | * @channel_time_tx: amount of time the radio spent transmitting data | 553 | * @time_tx: amount of time the radio spent transmitting data |
| 554 | * | 554 | * |
| 555 | * Used by dump_survey() to report back per-channel survey information. | 555 | * Used by dump_survey() to report back per-channel survey information. |
| 556 | * | 556 | * |
| @@ -559,11 +559,11 @@ enum survey_info_flags { · 2 unmodified lines | |||
| 559 | */ | 559 | */ |
| 560 | struct survey_info { | 560 | struct survey_info { |
| 561 | struct ieee80211_channel *channel; | 561 | struct ieee80211_channel *channel; |
| 562 | u64 channel_time; | 562 | u64 time; |
| 563 | u64 channel_time_busy; | 563 | u64 time_busy; |
| 564 | u64 channel_time_ext_busy; | 564 | u64 time_ext_busy; |
| 565 | u64 channel_time_rx; | 565 | u64 time_rx; |
| 566 | u64 channel_time_tx; | 566 | u64 time_tx; |
| 567 | u32 filled; | 567 | u32 filled; |
| 568 | s8 noise; | 568 | s8 noise; |
| 569 | }; | 569 | }; |
| @@ -2815,15 +2815,15 @@ enum nl80211_user_reg_hint_type { · 2814 unmodified lines | |||
| 2815 | * @NL80211_SURVEY_INFO_FREQUENCY: center frequency of channel | 2815 | * @NL80211_SURVEY_INFO_FREQUENCY: center frequency of channel |
| 2816 | * @NL80211_SURVEY_INFO_NOISE: noise level of channel (u8, dBm) | 2816 | * @NL80211_SURVEY_INFO_NOISE: noise level of channel (u8, dBm) |
| 2817 | * @NL80211_SURVEY_INFO_IN_USE: channel is currently being used | 2817 | * @NL80211_SURVEY_INFO_IN_USE: channel is currently being used |
| 2818 | * @NL80211_SURVEY_INFO_CHANNEL_TIME: amount of time (in ms) that the radio | 2818 | * @NL80211_SURVEY_INFO_TIME: amount of time (in ms) that the radio |
| 2819 | * spent on this channel | 2819 | * spent on this channel |
| 2820 | * @NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY: amount of the time the primary | 2820 | * @NL80211_SURVEY_INFO_TIME_BUSY: amount of the time the primary |
| 2821 | * channel was sensed busy (either due to activity or energy detect) | 2821 | * channel was sensed busy (either due to activity or energy detect) |
| 2822 | * @NL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY: amount of time the extension | 2822 | * @NL80211_SURVEY_INFO_TIME_EXT_BUSY: amount of time the extension |
| 2823 | * channel was sensed busy | 2823 | * channel was sensed busy |
| 2824 | * @NL80211_SURVEY_INFO_CHANNEL_TIME_RX: amount of time the radio spent | 2824 | * @NL80211_SURVEY_INFO_TIME_RX: amount of time the radio spent |
| 2825 | * receiving data | 2825 | * receiving data |
| 2826 | * @NL80211_SURVEY_INFO_CHANNEL_TIME_TX: amount of time the radio spent | 2826 | * @NL80211_SURVEY_INFO_TIME_TX: amount of time the radio spent |
| 2827 | * transmitting data | 2827 | * transmitting data |
| 2828 | * @NL80211_SURVEY_INFO_MAX: highest survey info attribute number | 2828 | * @NL80211_SURVEY_INFO_MAX: highest survey info attribute number |
| 2829 | * currently defined | 2829 | * currently defined |
| @@ -2834,17 +2834,24 @@ enum nl80211_survey_info { · 4 unmodified lines | |||
| 2834 | NL80211_SURVEY_INFO_FREQUENCY, | 2834 | NL80211_SURVEY_INFO_FREQUENCY, |
| 2835 | NL80211_SURVEY_INFO_NOISE, | 2835 | NL80211_SURVEY_INFO_NOISE, |
| 2836 | NL80211_SURVEY_INFO_IN_USE, | 2836 | NL80211_SURVEY_INFO_IN_USE, |
| 2837 | NL80211_SURVEY_INFO_CHANNEL_TIME, | 2837 | NL80211_SURVEY_INFO_TIME, |
| 2838 | NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY, | 2838 | NL80211_SURVEY_INFO_TIME_BUSY, |
| 2839 | NL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY, | 2839 | NL80211_SURVEY_INFO_TIME_EXT_BUSY, |
| 2840 | NL80211_SURVEY_INFO_CHANNEL_TIME_RX, | 2840 | NL80211_SURVEY_INFO_TIME_RX, |
| 2841 | NL80211_SURVEY_INFO_CHANNEL_TIME_TX, | 2841 | NL80211_SURVEY_INFO_TIME_TX, |
| 2842 | 2842 | ||
| 2843 | /* keep last */ | 2843 | /* keep last */ |
| 2844 | __NL80211_SURVEY_INFO_AFTER_LAST, | 2844 | __NL80211_SURVEY_INFO_AFTER_LAST, |
| 2845 | NL80211_SURVEY_INFO_MAX = __NL80211_SURVEY_INFO_AFTER_LAST - 1 | 2845 | NL80211_SURVEY_INFO_MAX = __NL80211_SURVEY_INFO_AFTER_LAST - 1 |
| 2846 | }; | 2846 | }; |
| 2847 | 2847 | ||
| 2848 | /* keep old names for compatibility */ | ||
| 2849 | #define NL80211_SURVEY_INFO_CHANNEL_TIME NL80211_SURVEY_INFO_TIME | ||
| 2850 | #define NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY NL80211_SURVEY_INFO_TIME_BUSY | ||
| 2851 | #define NL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY NL80211_SURVEY_INFO_TIME_EXT_BUSY | ||
| 2852 | #define NL80211_SURVEY_INFO_CHANNEL_TIME_RX NL80211_SURVEY_INFO_TIME_RX | ||
| 2853 | #define NL80211_SURVEY_INFO_CHANNEL_TIME_TX NL80211_SURVEY_INFO_TIME_TX | ||
| 2854 | |||
| 2848 | /** | 2855 | /** |
| 2849 | * enum nl80211_mntr_flags - monitor configuration flags | 2856 | * enum nl80211_mntr_flags - monitor configuration flags |
| 2850 | * | 2857 | * |
| @@ -175,24 +175,24 @@ do_survey: · 174 unmodified lines | |||
| 175 | data[i++] = (u8)survey.noise; | 175 | data[i++] = (u8)survey.noise; |
| 176 | else | 176 | else |
| 177 | data[i++] = -1LL; | 177 | data[i++] = -1LL; |
| 178 | if (survey.filled & SURVEY_INFO_CHANNEL_TIME) | 178 | if (survey.filled & SURVEY_INFO_TIME) |
| 179 | data[i++] = survey.channel_time; | 179 | data[i++] = survey.time; |
| 180 | else | 180 | else |
| 181 | data[i++] = -1LL; | 181 | data[i++] = -1LL; |
| 182 | if (survey.filled & SURVEY_INFO_CHANNEL_TIME_BUSY) | 182 | if (survey.filled & SURVEY_INFO_TIME_BUSY) |
| 183 | data[i++] = survey.channel_time_busy; | 183 | data[i++] = survey.time_busy; |
| 184 | else | 184 | else |
| 185 | data[i++] = -1LL; | 185 | data[i++] = -1LL; |
| 186 | if (survey.filled & SURVEY_INFO_CHANNEL_TIME_EXT_BUSY) | 186 | if (survey.filled & SURVEY_INFO_TIME_EXT_BUSY) |
| 187 | data[i++] = survey.channel_time_ext_busy; | 187 | data[i++] = survey.time_ext_busy; |
| 188 | else | 188 | else |
| 189 | data[i++] = -1LL; | 189 | data[i++] = -1LL; |
| 190 | if (survey.filled & SURVEY_INFO_CHANNEL_TIME_RX) | 190 | if (survey.filled & SURVEY_INFO_TIME_RX) |
| 191 | data[i++] = survey.channel_time_rx; | 191 | data[i++] = survey.time_rx; |
| 192 | else | 192 | else |
| 193 | data[i++] = -1LL; | 193 | data[i++] = -1LL; |
| 194 | if (survey.filled & SURVEY_INFO_CHANNEL_TIME_TX) | 194 | if (survey.filled & SURVEY_INFO_TIME_TX) |
| 195 | data[i++] = survey.channel_time_tx; | 195 | data[i++] = survey.time_tx; |
| 196 | else | 196 | else |
| 197 | data[i++] = -1LL; | 197 | data[i++] = -1LL; |
| 198 | 198 | ||
| @@ -6641,25 +6641,25 @@ static int nl80211_send_survey(struct sk_buff *msg, u32 portid, u32 seq, · 6640 unmodified lines | |||
| 6641 | if ((survey->filled & SURVEY_INFO_IN_USE) && | 6641 | if ((survey->filled & SURVEY_INFO_IN_USE) && |
| 6642 | nla_put_flag(msg, NL80211_SURVEY_INFO_IN_USE)) | 6642 | nla_put_flag(msg, NL80211_SURVEY_INFO_IN_USE)) |
| 6643 | goto nla_put_failure; | 6643 | goto nla_put_failure; |
| 6644 | if ((survey->filled & SURVEY_INFO_CHANNEL_TIME) && | 6644 | if ((survey->filled & SURVEY_INFO_TIME) && |
| 6645 | nla_put_u64(msg, NL80211_SURVEY_INFO_CHANNEL_TIME, | 6645 | nla_put_u64(msg, NL80211_SURVEY_INFO_TIME, |
| 6646 | survey->channel_time)) | 6646 | survey->time)) |
| 6647 | goto nla_put_failure; | 6647 | goto nla_put_failure; |
| 6648 | if ((survey->filled & SURVEY_INFO_CHANNEL_TIME_BUSY) && | 6648 | if ((survey->filled & SURVEY_INFO_TIME_BUSY) && |
| 6649 | nla_put_u64(msg, NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY, | 6649 | nla_put_u64(msg, NL80211_SURVEY_INFO_TIME_BUSY, |
| 6650 | survey->channel_time_busy)) | 6650 | survey->time_busy)) |
| 6651 | goto nla_put_failure; | 6651 | goto nla_put_failure; |
| 6652 | if ((survey->filled & SURVEY_INFO_CHANNEL_TIME_EXT_BUSY) && | 6652 | if ((survey->filled & SURVEY_INFO_TIME_EXT_BUSY) && |
| 6653 | nla_put_u64(msg, NL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY, | 6653 | nla_put_u64(msg, NL80211_SURVEY_INFO_TIME_EXT_BUSY, |
| 6654 | survey->channel_time_ext_busy)) | 6654 | survey->time_ext_busy)) |
| 6655 | goto nla_put_failure; | 6655 | goto nla_put_failure; |
| 6656 | if ((survey->filled & SURVEY_INFO_CHANNEL_TIME_RX) && | 6656 | if ((survey->filled & SURVEY_INFO_TIME_RX) && |
| 6657 | nla_put_u64(msg, NL80211_SURVEY_INFO_CHANNEL_TIME_RX, | 6657 | nla_put_u64(msg, NL80211_SURVEY_INFO_TIME_RX, |
| 6658 | survey->channel_time_rx)) | 6658 | survey->time_rx)) |
| 6659 | goto nla_put_failure; | 6659 | goto nla_put_failure; |
| 6660 | if ((survey->filled & SURVEY_INFO_CHANNEL_TIME_TX) && | 6660 | if ((survey->filled & SURVEY_INFO_TIME_TX) && |
| 6661 | nla_put_u64(msg, NL80211_SURVEY_INFO_CHANNEL_TIME_TX, | 6661 | nla_put_u64(msg, NL80211_SURVEY_INFO_TIME_TX, |
| 6662 | survey->channel_time_tx)) | 6662 | survey->time_tx)) |
| 6663 | goto nla_put_failure; | 6663 | goto nla_put_failure; |
| 6664 | 6664 | ||
| 6665 | nla_nest_end(msg, infoattr); | 6665 | nla_nest_end(msg, infoattr); |
| @@ -1604,11 +1604,11 @@ TRACE_EVENT(rdev_return_int_survey_info, · 1603 unmodified lines | |||
| 1604 | WIPHY_ENTRY | 1604 | WIPHY_ENTRY |
| 1605 | CHAN_ENTRY | 1605 | CHAN_ENTRY |
| 1606 | __field(int, ret) | 1606 | __field(int, ret) |
| 1607 | __field(u64, channel_time) | 1607 | __field(u64, time) |
| 1608 | __field(u64, channel_time_busy) | 1608 | __field(u64, time_busy) |
| 1609 | __field(u64, channel_time_ext_busy) | 1609 | __field(u64, time_ext_busy) |
| 1610 | __field(u64, channel_time_rx) | 1610 | __field(u64, time_rx) |
| 1611 | __field(u64, channel_time_tx) | 1611 | __field(u64, time_tx) |
| 1612 | __field(u32, filled) | 1612 | __field(u32, filled) |
| 1613 | __field(s8, noise) | 1613 | __field(s8, noise) |
| 1614 | ), | 1614 | ), |
| @@ -1616,11 +1616,11 @@ TRACE_EVENT(rdev_return_int_survey_info, · 1 unmodified line | |||
| 1616 | WIPHY_ASSIGN; | 1616 | WIPHY_ASSIGN; |
| 1617 | CHAN_ASSIGN(info->channel); | 1617 | CHAN_ASSIGN(info->channel); |
| 1618 | __entry->ret = ret; | 1618 | __entry->ret = ret; |
| 1619 | __entry->channel_time = info->channel_time; | 1619 | __entry->time = info->time; |
| 1620 | __entry->channel_time_busy = info->channel_time_busy; | 1620 | __entry->time_busy = info->time_busy; |
| 1621 | __entry->channel_time_ext_busy = info->channel_time_ext_busy; | 1621 | __entry->time_ext_busy = info->time_ext_busy; |
| 1622 | __entry->channel_time_rx = info->channel_time_rx; | 1622 | __entry->time_rx = info->time_rx; |
| 1623 | __entry->channel_time_tx = info->channel_time_tx; | 1623 | __entry->time_tx = info->time_tx; |
| 1624 | __entry->filled = info->filled; | 1624 | __entry->filled = info->filled; |
| 1625 | __entry->noise = info->noise; | 1625 | __entry->noise = info->noise; |
| 1626 | ), | 1626 | ), |
| @@ -1629,9 +1629,9 @@ TRACE_EVENT(rdev_return_int_survey_info, · 2 unmodified lines | |||
| 1629 | "channel time extension busy: %llu, channel time rx: %llu, " | 1629 | "channel time extension busy: %llu, channel time rx: %llu, " |
| 1630 | "channel time tx: %llu, filled: %u, noise: %d", | 1630 | "channel time tx: %llu, filled: %u, noise: %d", |
| 1631 | WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG, | 1631 | WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG, |
| 1632 | __entry->channel_time, __entry->channel_time_busy, | 1632 | __entry->time, __entry->time_busy, |
| 1633 | __entry->channel_time_ext_busy, __entry->channel_time_rx, | 1633 | __entry->time_ext_busy, __entry->time_rx, |
| 1634 | __entry->channel_time_tx, __entry->filled, __entry->noise) | 1634 | __entry->time_tx, __entry->filled, __entry->noise) |
| 1635 | ); | 1635 | ); |
| 1636 | 1636 | ||
| 1637 | TRACE_EVENT(rdev_tdls_oper, | 1637 | TRACE_EVENT(rdev_tdls_oper, |