···808 }809 }810000000000000811 num_tx_chains = 0;812 for (i = 0; i < NUM_RX_CHAINS; i++) {813 /* loops on all the bits of
···808 }809 }810811+ /*812+ * The above algorithm sometimes fails when the ucode813+ * reports 0 for all chains. It's not clear why that814+ * happens to start with, but it is then causing trouble815+ * because this can make us enable more chains than the816+ * hardware really has.817+ *818+ * To be safe, simply mask out any chains that we know819+ * are not on the device.820+ */821+ active_chains &= priv->hw_params.valid_rx_ant;822+823 num_tx_chains = 0;824 for (i = 0; i < NUM_RX_CHAINS; i++) {825 /* loops on all the bits of