diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/p54/eeprom.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/p54/eeprom.c b/drivers/net/wireless/p54/eeprom.c index d4d86107e05a..1ef1bfe6a9d7 100644 --- a/drivers/net/wireless/p54/eeprom.c +++ b/drivers/net/wireless/p54/eeprom.c | |||
@@ -288,10 +288,14 @@ static int p54_get_maxpower(struct p54_common *priv, void *data) | |||
288 | for (j = 0; j < ARRAY_SIZE(pda->point); j++) { | 288 | for (j = 0; j < ARRAY_SIZE(pda->point); j++) { |
289 | struct pda_channel_output_limit_point_longbow *point = | 289 | struct pda_channel_output_limit_point_longbow *point = |
290 | &pda->point[j]; | 290 | &pda->point[j]; |
291 | rawpower = max(rawpower, le16_to_cpu(point->val_qpsk)); | 291 | rawpower = max_t(u16, |
292 | rawpower = max(rawpower, le16_to_cpu(point->val_bpsk)); | 292 | rawpower, le16_to_cpu(point->val_qpsk)); |
293 | rawpower = max(rawpower, le16_to_cpu(point->val_16qam)); | 293 | rawpower = max_t(u16, |
294 | rawpower = max(rawpower, le16_to_cpu(point->val_64qam)); | 294 | rawpower, le16_to_cpu(point->val_bpsk)); |
295 | rawpower = max_t(u16, | ||
296 | rawpower, le16_to_cpu(point->val_16qam)); | ||
297 | rawpower = max_t(u16, | ||
298 | rawpower, le16_to_cpu(point->val_64qam)); | ||
295 | } | 299 | } |
296 | /* longbow seems to use 1/16 dBm units */ | 300 | /* longbow seems to use 1/16 dBm units */ |
297 | return rawpower / 16; | 301 | return rawpower / 16; |