antenna.c (d8d7744b72b56587b39fb4ecc2cbfb3d8cb734a4) antenna.c (047dc3ac884f3285bc123461e5e3c38f44fb32a6)
1/*
2 * Copyright (c) 2012 Qualcomm Atheros, Inc.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES

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

862
863 antcomb->scan_start_time = jiffies;
864 antcomb->total_pkt_count = 0;
865 antcomb->main_total_rssi = 0;
866 antcomb->alt_total_rssi = 0;
867 antcomb->main_recv_cnt = 0;
868 antcomb->alt_recv_cnt = 0;
869}
1/*
2 * Copyright (c) 2012 Qualcomm Atheros, Inc.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES

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

862
863 antcomb->scan_start_time = jiffies;
864 antcomb->total_pkt_count = 0;
865 antcomb->main_total_rssi = 0;
866 antcomb->alt_total_rssi = 0;
867 antcomb->main_recv_cnt = 0;
868 antcomb->alt_recv_cnt = 0;
869}
870
871void ath_ant_comb_update(struct ath_softc *sc)
872{
873 struct ath_hw *ah = sc->sc_ah;
874 struct ath_common *common = ath9k_hw_common(ah);
875 struct ath_hw_antcomb_conf div_ant_conf;
876 u8 lna_conf;
877
878 ath9k_hw_antdiv_comb_conf_get(ah, &div_ant_conf);
879
880 if (sc->ant_rx == 1)
881 lna_conf = ATH_ANT_DIV_COMB_LNA1;
882 else
883 lna_conf = ATH_ANT_DIV_COMB_LNA2;
884
885 div_ant_conf.main_lna_conf = lna_conf;
886 div_ant_conf.alt_lna_conf = lna_conf;
887
888 ath9k_hw_antdiv_comb_conf_set(ah, &div_ant_conf);
889
890 if (common->bt_ant_diversity)
891 ath9k_hw_set_bt_ant_diversity(ah, true);
892}