Commit 09050470 authored by Moritz Muehlenhoff's avatar Moritz Muehlenhoff Committed by Greg Kroah-Hartman

Staging: wlan-ng: Remove wlan_max()/wlan_min()

Replace wlan_min() with the generic min_t(), remove unused wlan_max().
Signed-off-by: default avatarMoritz Muehlenhoff <jmm@debian.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 350f2f4b
...@@ -1328,7 +1328,7 @@ wext_translate_bss(struct iw_request_info *info, char *current_ev, ...@@ -1328,7 +1328,7 @@ wext_translate_bss(struct iw_request_info *info, char *current_ev,
char essid[IW_ESSID_MAX_SIZE + 1]; char essid[IW_ESSID_MAX_SIZE + 1];
int size; int size;
size = wlan_min(IW_ESSID_MAX_SIZE, bss->ssid.data.len); size = min_t(unsigned short, IW_ESSID_MAX_SIZE, bss->ssid.data.len);
memset(&essid, 0, sizeof (essid)); memset(&essid, 0, sizeof (essid));
memcpy(&essid, bss->ssid.data.data, size); memcpy(&essid, bss->ssid.data.data, size);
WLAN_LOG_DEBUG(1, " essid size = %d\n", size); WLAN_LOG_DEBUG(1, " essid size = %d\n", size);
......
...@@ -86,9 +86,6 @@ typedef struct net_device netdevice_t; ...@@ -86,9 +86,6 @@ typedef struct net_device netdevice_t;
/*--- General Macros ------------------------------------------*/ /*--- General Macros ------------------------------------------*/
/*=============================================================*/ /*=============================================================*/
#define wlan_max(a, b) (((a) > (b)) ? (a) : (b))
#define wlan_min(a, b) (((a) < (b)) ? (a) : (b))
#define wlan_isprint(c) (((c) > (0x19)) && ((c) < (0x7f))) #define wlan_isprint(c) (((c) > (0x19)) && ((c) < (0x7f)))
#define wlan_hexchar(x) (((x) < 0x0a) ? ('0' + (x)) : ('a' + ((x) - 0x0a))) #define wlan_hexchar(x) (((x) < 0x0a) ? ('0' + (x)) : ('a' + ((x) - 0x0a)))
......
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