Skip to content

Commit 56c4a79

Browse files
Sandhya-Bankargregkh
authored andcommitted
Staging: ieee80211: Place constant on right side of the test.
Place constant on right side of the test. Signed-off-by: Sandhya Bankar <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent c943e13 commit 56c4a79

File tree

1 file changed

+3
-3
lines changed
  • drivers/staging/rtl8192u/ieee80211

1 file changed

+3
-3
lines changed

drivers/staging/rtl8192u/ieee80211/dot11d.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ u8 DOT11D_GetMaxTxPwrInDbm(struct ieee80211_device *dev, u8 Channel)
103103
PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
104104
u8 MaxTxPwrInDbm = 255;
105105

106-
if (MAX_CHANNEL_NUMBER < Channel) {
106+
if (Channel > MAX_CHANNEL_NUMBER) {
107107
netdev_err(dev->dev, "DOT11D_GetMaxTxPwrInDbm(): Invalid Channel\n");
108108
return MaxTxPwrInDbm;
109109
}
@@ -139,7 +139,7 @@ int IsLegalChannel(struct ieee80211_device *dev, u8 channel)
139139
{
140140
PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
141141

142-
if (MAX_CHANNEL_NUMBER < channel) {
142+
if (channel > MAX_CHANNEL_NUMBER) {
143143
netdev_err(dev->dev, "IsLegalChannel(): Invalid Channel\n");
144144
return 0;
145145
}
@@ -162,7 +162,7 @@ int ToLegalChannel(struct ieee80211_device *dev, u8 channel)
162162
}
163163
}
164164

165-
if (MAX_CHANNEL_NUMBER < channel) {
165+
if (channel > MAX_CHANNEL_NUMBER) {
166166
netdev_err(dev->dev, "IsLegalChannel(): Invalid Channel\n");
167167
return default_chn;
168168
}

0 commit comments

Comments
 (0)