Commit 3ae70746 authored by Rickard Strandqvist's avatar Rickard Strandqvist Committed by Greg Kroah-Hartman

staging: rtl8712: rtl871x_ioctl_linux.c: Cleaning up useless if statement

The same code regardless of the outcome of the if statement.
And clean up another duplicate line of code.
Signed-off-by: default avatarRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0c9f3a65
...@@ -1459,17 +1459,12 @@ static int r8711_wx_get_rate(struct net_device *dev, ...@@ -1459,17 +1459,12 @@ static int r8711_wx_get_rate(struct net_device *dev,
RTL8712_RF_2T2R == rf_type) RTL8712_RF_2T2R == rf_type)
max_rate = (bw_40MHz) ? ((short_GI) ? 300 : max_rate = (bw_40MHz) ? ((short_GI) ? 300 :
270) : ((short_GI) ? 144 : 130); 270) : ((short_GI) ? 144 : 130);
else if (mcs_rate & 0x0080) /* MCS7 */
max_rate = (bw_40MHz) ? ((short_GI) ? 150 :
135) : ((short_GI) ? 72 : 65);
else /* default MCS7 */ else /* default MCS7 */
max_rate = (bw_40MHz) ? ((short_GI) ? 150 : max_rate = (bw_40MHz) ? ((short_GI) ? 150 :
135) : ((short_GI) ? 72 : 65); 135) : ((short_GI) ? 72 : 65);
max_rate *= 2; /* Mbps/2 */ max_rate *= 2; /* Mbps/2 */
wrqu->bitrate.value = max_rate * 500000;
} else {
wrqu->bitrate.value = max_rate * 500000;
} }
wrqu->bitrate.value = max_rate * 500000;
} else } else
return -ENOLINK; return -ENOLINK;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment