Search Linux Wireless

Re: [PATCH 2/5] rt2x00: rework channel config function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 17, 2018 at 06:32:52PM +0200, Tomislav Požega wrote:
> -	switch (rt2x00dev->default_ant.tx_chain_num) {
> -	case 3:
> -		/* Turn on tertiary PAs */
> -		rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_A2_EN,
> -				   rf->channel > 14);
> -		rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_G2_EN,
> -				   rf->channel <= 14);
> -		/* fall-through */
> -	case 2:
> -		/* Turn on secondary PAs */
> -		rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_A1_EN,
> -				   rf->channel > 14);
> -		rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_G1_EN,
> -				   rf->channel <= 14);
> -		/* fall-through */
> -	case 1:
> -		/* Turn on primary PAs */
> -		rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_A0_EN,
> -				   rf->channel > 14);
> -		if (rt2x00_has_cap_bt_coexist(rt2x00dev))
> +	if (rt2x00dev->curr_band == NL80211_BAND_5GHZ) {
> +		switch (rt2x00dev->default_ant.tx_chain_num) {
> +		case 3:
> +			rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_A2_EN, 1);
> +		case 2:
> +			rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_A1_EN, 1);
> +		case 1:
> +			rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_A0_EN, 1);
> +		break;

Please keep /* fall-through */ comments, this is needed 
for some automatic code checkers tools.




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux