diff options
author | Sandhya Bankar <bankarsandhya512@gmail.com> | 2016-03-06 16:19:28 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-11 22:09:09 -0800 |
commit | 56c4a79958ebe7fc476f03a31589863813e4dd89 (patch) | |
tree | 6773bf3a496daac8ef6363e4f345122787c12451 /drivers | |
parent | c943e13bd2bf4c344c3fe43ef39f07b57eff715e (diff) |
Staging: ieee80211: Place constant on right side of the test.
Place constant on right side of the test.
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/dot11d.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.c b/drivers/staging/rtl8192u/ieee80211/dot11d.c index 82d60380bb40..00b6052fbbac 100644 --- a/drivers/staging/rtl8192u/ieee80211/dot11d.c +++ b/drivers/staging/rtl8192u/ieee80211/dot11d.c @@ -103,7 +103,7 @@ u8 DOT11D_GetMaxTxPwrInDbm(struct ieee80211_device *dev, u8 Channel) PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev); u8 MaxTxPwrInDbm = 255; - if (MAX_CHANNEL_NUMBER < Channel) { + if (Channel > MAX_CHANNEL_NUMBER) { netdev_err(dev->dev, "DOT11D_GetMaxTxPwrInDbm(): Invalid Channel\n"); return MaxTxPwrInDbm; } @@ -139,7 +139,7 @@ int IsLegalChannel(struct ieee80211_device *dev, u8 channel) { PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev); - if (MAX_CHANNEL_NUMBER < channel) { + if (channel > MAX_CHANNEL_NUMBER) { netdev_err(dev->dev, "IsLegalChannel(): Invalid Channel\n"); return 0; } @@ -162,7 +162,7 @@ int ToLegalChannel(struct ieee80211_device *dev, u8 channel) } } - if (MAX_CHANNEL_NUMBER < channel) { + if (channel > MAX_CHANNEL_NUMBER) { netdev_err(dev->dev, "IsLegalChannel(): Invalid Channel\n"); return default_chn; } |