···808808 }809809 }810810811811+ /*812812+ * The above algorithm sometimes fails when the ucode813813+ * reports 0 for all chains. It's not clear why that814814+ * happens to start with, but it is then causing trouble815815+ * because this can make us enable more chains than the816816+ * hardware really has.817817+ *818818+ * To be safe, simply mask out any chains that we know819819+ * are not on the device.820820+ */821821+ active_chains &= priv->hw_params.valid_rx_ant;822822+811823 num_tx_chains = 0;812824 for (i = 0; i < NUM_RX_CHAINS; i++) {813825 /* loops on all the bits of