|
8 | 8 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
9 | 9 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
|
10 | 10 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
|
11 |
| - * Copyright(c) 2018 - 2019 Intel Corporation |
| 11 | + * Copyright(c) 2018 - 2020 Intel Corporation |
12 | 12 | *
|
13 | 13 | * This program is free software; you can redistribute it and/or modify
|
14 | 14 | * it under the terms of version 2 of the GNU General Public License as
|
|
31 | 31 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
32 | 32 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
|
33 | 33 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
|
34 |
| - * Copyright(c) 2018 - 2019 Intel Corporation |
| 34 | + * Copyright(c) 2018 - 2020 Intel Corporation |
35 | 35 | * All rights reserved.
|
36 | 36 | *
|
37 | 37 | * Redistribution and use in source and binary forms, with or without
|
@@ -566,6 +566,7 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi,
|
566 | 566 |
|
567 | 567 | struct iwl_mvm_stat_data {
|
568 | 568 | struct iwl_mvm *mvm;
|
| 569 | + __le32 flags; |
569 | 570 | __le32 mac_id;
|
570 | 571 | u8 beacon_filter_average_energy;
|
571 | 572 | void *general;
|
@@ -606,6 +607,13 @@ static void iwl_mvm_stat_iterator(void *_data, u8 *mac,
|
606 | 607 | -general->beacon_average_energy[vif_id];
|
607 | 608 | }
|
608 | 609 |
|
| 610 | + /* make sure that beacon statistics don't go backwards with TCM |
| 611 | + * request to clear statistics |
| 612 | + */ |
| 613 | + if (le32_to_cpu(data->flags) & IWL_STATISTICS_REPLY_FLG_CLEAR) |
| 614 | + mvmvif->beacon_stats.accu_num_beacons += |
| 615 | + mvmvif->beacon_stats.num_beacons; |
| 616 | + |
609 | 617 | if (mvmvif->id != id)
|
610 | 618 | return;
|
611 | 619 |
|
@@ -763,6 +771,7 @@ void iwl_mvm_handle_rx_statistics(struct iwl_mvm *mvm,
|
763 | 771 |
|
764 | 772 | flags = stats->flag;
|
765 | 773 | }
|
| 774 | + data.flags = flags; |
766 | 775 |
|
767 | 776 | iwl_mvm_rx_stats_check_trigger(mvm, pkt);
|
768 | 777 |
|
|
0 commit comments