Add in the last bit of the HAL support for Kite diversity.

* add a new method, specifically for doing per-RX packet
  antenna diversity
* set that HAL method only if it's Kite and a Kite chip that
  does diversity.
This commit is contained in:
Adrian Chadd 2011-04-13 15:12:48 +00:00
parent 1171c869d7
commit 81484cdb07
2 changed files with 11 additions and 0 deletions

View File

@ -767,6 +767,9 @@ struct ath_hal {
const struct ieee80211_channel *);
void __ahdecl(*ah_procMibEvent)(struct ath_hal *,
const HAL_NODE_STATS *);
void __ahdecl(*ah_rxAntCombDiversity)(struct ath_hal *,
struct ath_rx_status *,
unsigned long, int);
/* Misc Functions */
HAL_STATUS __ahdecl(*ah_getCapability)(struct ath_hal *,

View File

@ -34,6 +34,8 @@
#include "ar9002/ar9280v2.ini" /* XXX ini for tx/rx gain */
#include "ar9002/ar9285_cal.h"
#include "ar9002/ar9285_phy.h"
#include "ar9002/ar9285_diversity.h"
static const HAL_PERCAL_DATA ar9280_iq_cal = { /* single sample */
.calName = "IQ", .calType = IQ_MISMATCH_CAL,
@ -262,6 +264,12 @@ ar9285Attach(uint16_t devid, HAL_SOFTC sc,
goto bad;
}
/* Print out whether the EEPROM settings enable AR9285 diversity */
if (ar9285_check_div_comb(ah)) {
ath_hal_printf(ah, "[ath] Enabling diversity for Kite\n");
ah->ah_rxAntCombDiversity = ar9285_ant_comb_scan;
}
/* Disable 11n for the AR2427 */
if (devid == AR2427_DEVID_PCIE)
AH_PRIVATE(ah)->ah_caps.halHTSupport = AH_FALSE;