ath9k_hw: bail out early on ath9k_hw_init_rf()
We a huge branch for old hardware and nothing for newer hardware. Instead of doing this just bail out early for newer hardware. This patch has no functional changes. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
131d1d036a
commit
b67b4397cf
1 changed files with 54 additions and 53 deletions
|
@ -419,62 +419,63 @@ bool ath9k_hw_init_rf(struct ath_hw *ah, int *status)
|
||||||
{
|
{
|
||||||
struct ath_common *common = ath9k_hw_common(ah);
|
struct ath_common *common = ath9k_hw_common(ah);
|
||||||
|
|
||||||
if (!AR_SREV_9280_10_OR_LATER(ah)) {
|
if (AR_SREV_9280_10_OR_LATER(ah))
|
||||||
ah->analogBank0Data =
|
return true;
|
||||||
kzalloc((sizeof(u32) *
|
|
||||||
ah->iniBank0.ia_rows), GFP_KERNEL);
|
|
||||||
ah->analogBank1Data =
|
|
||||||
kzalloc((sizeof(u32) *
|
|
||||||
ah->iniBank1.ia_rows), GFP_KERNEL);
|
|
||||||
ah->analogBank2Data =
|
|
||||||
kzalloc((sizeof(u32) *
|
|
||||||
ah->iniBank2.ia_rows), GFP_KERNEL);
|
|
||||||
ah->analogBank3Data =
|
|
||||||
kzalloc((sizeof(u32) *
|
|
||||||
ah->iniBank3.ia_rows), GFP_KERNEL);
|
|
||||||
ah->analogBank6Data =
|
|
||||||
kzalloc((sizeof(u32) *
|
|
||||||
ah->iniBank6.ia_rows), GFP_KERNEL);
|
|
||||||
ah->analogBank6TPCData =
|
|
||||||
kzalloc((sizeof(u32) *
|
|
||||||
ah->iniBank6TPC.ia_rows), GFP_KERNEL);
|
|
||||||
ah->analogBank7Data =
|
|
||||||
kzalloc((sizeof(u32) *
|
|
||||||
ah->iniBank7.ia_rows), GFP_KERNEL);
|
|
||||||
|
|
||||||
if (ah->analogBank0Data == NULL
|
ah->analogBank0Data =
|
||||||
|| ah->analogBank1Data == NULL
|
kzalloc((sizeof(u32) *
|
||||||
|| ah->analogBank2Data == NULL
|
ah->iniBank0.ia_rows), GFP_KERNEL);
|
||||||
|| ah->analogBank3Data == NULL
|
ah->analogBank1Data =
|
||||||
|| ah->analogBank6Data == NULL
|
kzalloc((sizeof(u32) *
|
||||||
|| ah->analogBank6TPCData == NULL
|
ah->iniBank1.ia_rows), GFP_KERNEL);
|
||||||
|| ah->analogBank7Data == NULL) {
|
ah->analogBank2Data =
|
||||||
ath_print(common, ATH_DBG_FATAL,
|
kzalloc((sizeof(u32) *
|
||||||
"Cannot allocate RF banks\n");
|
ah->iniBank2.ia_rows), GFP_KERNEL);
|
||||||
*status = -ENOMEM;
|
ah->analogBank3Data =
|
||||||
return false;
|
kzalloc((sizeof(u32) *
|
||||||
}
|
ah->iniBank3.ia_rows), GFP_KERNEL);
|
||||||
|
ah->analogBank6Data =
|
||||||
|
kzalloc((sizeof(u32) *
|
||||||
|
ah->iniBank6.ia_rows), GFP_KERNEL);
|
||||||
|
ah->analogBank6TPCData =
|
||||||
|
kzalloc((sizeof(u32) *
|
||||||
|
ah->iniBank6TPC.ia_rows), GFP_KERNEL);
|
||||||
|
ah->analogBank7Data =
|
||||||
|
kzalloc((sizeof(u32) *
|
||||||
|
ah->iniBank7.ia_rows), GFP_KERNEL);
|
||||||
|
|
||||||
ah->addac5416_21 =
|
if (ah->analogBank0Data == NULL
|
||||||
kzalloc((sizeof(u32) *
|
|| ah->analogBank1Data == NULL
|
||||||
ah->iniAddac.ia_rows *
|
|| ah->analogBank2Data == NULL
|
||||||
ah->iniAddac.ia_columns), GFP_KERNEL);
|
|| ah->analogBank3Data == NULL
|
||||||
if (ah->addac5416_21 == NULL) {
|
|| ah->analogBank6Data == NULL
|
||||||
ath_print(common, ATH_DBG_FATAL,
|
|| ah->analogBank6TPCData == NULL
|
||||||
"Cannot allocate addac5416_21\n");
|
|| ah->analogBank7Data == NULL) {
|
||||||
*status = -ENOMEM;
|
ath_print(common, ATH_DBG_FATAL,
|
||||||
return false;
|
"Cannot allocate RF banks\n");
|
||||||
}
|
*status = -ENOMEM;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
ah->bank6Temp =
|
ah->addac5416_21 =
|
||||||
kzalloc((sizeof(u32) *
|
kzalloc((sizeof(u32) *
|
||||||
ah->iniBank6.ia_rows), GFP_KERNEL);
|
ah->iniAddac.ia_rows *
|
||||||
if (ah->bank6Temp == NULL) {
|
ah->iniAddac.ia_columns), GFP_KERNEL);
|
||||||
ath_print(common, ATH_DBG_FATAL,
|
if (ah->addac5416_21 == NULL) {
|
||||||
"Cannot allocate bank6Temp\n");
|
ath_print(common, ATH_DBG_FATAL,
|
||||||
*status = -ENOMEM;
|
"Cannot allocate addac5416_21\n");
|
||||||
return false;
|
*status = -ENOMEM;
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
ah->bank6Temp =
|
||||||
|
kzalloc((sizeof(u32) *
|
||||||
|
ah->iniBank6.ia_rows), GFP_KERNEL);
|
||||||
|
if (ah->bank6Temp == NULL) {
|
||||||
|
ath_print(common, ATH_DBG_FATAL,
|
||||||
|
"Cannot allocate bank6Temp\n");
|
||||||
|
*status = -ENOMEM;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue