Deleted Added
full compact
if_ath_lna_div.c (272292) if_ath_lna_div.c (297405)
1/*-
2 * Copyright (c) 2013 Adrian Chadd <adrian@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
22 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27 * THE POSSIBILITY OF SUCH DAMAGES.
28 *
1/*-
2 * Copyright (c) 2013 Adrian Chadd <adrian@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
22 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27 * THE POSSIBILITY OF SUCH DAMAGES.
28 *
29 * $FreeBSD: head/sys/dev/ath/if_ath_lna_div.c 272292 2014-09-30 03:19:29Z adrian $
29 * $FreeBSD: head/sys/dev/ath/if_ath_lna_div.c 297405 2016-03-30 00:44:10Z adrian $
30 */
31#include <sys/cdefs.h>
30 */
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath_lna_div.c 272292 2014-09-30 03:19:29Z adrian $");
32__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath_lna_div.c 297405 2016-03-30 00:44:10Z adrian $");
33
34/*
35 * This module handles LNA diversity for those chips which implement LNA
36 * mixing (AR9285/AR9485.)
37 */
38#include "opt_ath.h"
39#include "opt_inet.h"
40#include "opt_wlan.h"

--- 720 unchanged lines hidden (view full) ---

761 if (main_ant_conf == rx_ant_conf)
762 antcomb->main_recv_cnt++;
763 else
764 antcomb->alt_recv_cnt++;
765 }
766
767 /* Short scan check */
768 if (antcomb->scan && antcomb->alt_good) {
33
34/*
35 * This module handles LNA diversity for those chips which implement LNA
36 * mixing (AR9285/AR9485.)
37 */
38#include "opt_ath.h"
39#include "opt_inet.h"
40#include "opt_wlan.h"

--- 720 unchanged lines hidden (view full) ---

761 if (main_ant_conf == rx_ant_conf)
762 antcomb->main_recv_cnt++;
763 else
764 antcomb->alt_recv_cnt++;
765 }
766
767 /* Short scan check */
768 if (antcomb->scan && antcomb->alt_good) {
769 if (time_after(ticks, antcomb->scan_start_time +
769 if (ieee80211_time_after(ticks, antcomb->scan_start_time +
770 msecs_to_jiffies(ATH_ANT_DIV_COMB_SHORT_SCAN_INTR)))
771 short_scan = AH_TRUE;
772 else
773 if (antcomb->total_pkt_count ==
774 ATH_ANT_DIV_COMB_SHORT_SCAN_PKTCOUNT) {
775 alt_ratio = ((antcomb->alt_recv_cnt * 100) /
776 antcomb->total_pkt_count);
777 if (alt_ratio < ATH_ANT_DIV_COMB_ALT_ANT_RATIO)

--- 241 unchanged lines hidden ---
770 msecs_to_jiffies(ATH_ANT_DIV_COMB_SHORT_SCAN_INTR)))
771 short_scan = AH_TRUE;
772 else
773 if (antcomb->total_pkt_count ==
774 ATH_ANT_DIV_COMB_SHORT_SCAN_PKTCOUNT) {
775 alt_ratio = ((antcomb->alt_recv_cnt * 100) /
776 antcomb->total_pkt_count);
777 if (alt_ratio < ATH_ANT_DIV_COMB_ALT_ANT_RATIO)

--- 241 unchanged lines hidden ---