priv->cfg = cfg;
priv->inta_mask = CSR_INI_SET_MASK;
- err = iwl_trans_register(&priv->trans, priv);
- if (err)
- goto out_free_priv;
-
/* is antenna coupling more than 35dB ? */
priv->bt_ant_couple_ok =
(iwlagn_ant_coupling > IWL_BT_ANTENNA_COUPLING_THRESHOLD) ?
IWL_INFO(priv, "Detected %s, REV=0x%X\n",
priv->cfg->name, hw_rev);
+ err = iwl_trans_register(&priv->trans, priv);
+ if (err)
+ goto out_free_traffic_mem;
+
if (trans_prepare_card_hw(&priv->trans)) {
err = -EIO;
IWL_WARN(priv, "Failed, HW not ready\n");
- goto out_free_traffic_mem;
+ goto out_free_trans;
}
/*****************
err = iwl_eeprom_init(priv, hw_rev);
if (err) {
IWL_ERR(priv, "Unable to init EEPROM\n");
- goto out_free_traffic_mem;
+ goto out_free_trans;
}
err = iwl_eeprom_check_version(priv);
if (err)
iwl_uninit_drv(priv);
out_free_eeprom:
iwl_eeprom_free(priv);
+out_free_trans:
+ trans_free(&priv->trans);
out_free_traffic_mem:
iwl_free_traffic_mem(priv);
- trans_free(&priv->trans);
-out_free_priv:
ieee80211_free_hw(priv->hw);
out:
return err;
priv->trans.ops = &trans_ops;
priv->trans.priv = priv;
+ tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long))
+ iwl_irq_tasklet, (unsigned long)priv);
+
iwl_alloc_isr_ict(priv);
err = request_irq(priv->bus->irq, iwl_isr_ict, IRQF_SHARED,
return err;
}
- tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long))
- iwl_irq_tasklet, (unsigned long)priv);
-
INIT_WORK(&priv->rx_replenish, iwl_bg_rx_replenish);
return 0;