Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 141192
b: refs/heads/master
c: 1691055
h: refs/heads/master
v: v3
  • Loading branch information
Moritz Muehlenhoff authored and Greg Kroah-Hartman committed Apr 3, 2009
1 parent 402c852 commit cc314b7
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 33 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 96c5abd7f84272447a74c2a854c89f9cbd4018b2
refs/heads/master: 16910554f3687c96d572664efc55057668a3f1cf
27 changes: 22 additions & 5 deletions trunk/drivers/staging/wlan-ng/prism2sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,31 @@
#include "hfa384x.h"
#include "prism2mgmt.h"

/*================================================================*/
/* Local Constants */

/*================================================================*/
/* Local Macros */

/*================================================================*/
/* Local Types */
#define wlan_hexchar(x) (((x) < 0x0a) ? ('0' + (x)) : ('a' + ((x) - 0x0a)))

/* Create a string of printable chars from something that might not be */
/* It's recommended that the str be 4*len + 1 bytes long */
#define wlan_mkprintstr(buf, buflen, str, strlen) \
{ \
int i = 0; \
int j = 0; \
memset(str, 0, (strlen)); \
for (i = 0; i < (buflen); i++) { \
if ( isprint((buf)[i]) ) { \
(str)[j] = (buf)[i]; \
j++; \
} else { \
(str)[j] = '\\'; \
(str)[j+1] = 'x'; \
(str)[j+2] = wlan_hexchar(((buf)[i] & 0xf0) >> 4); \
(str)[j+3] = wlan_hexchar(((buf)[i] & 0x0f)); \
j += 4; \
} \
} \
}

/*================================================================*/
/* Local Static Definitions */
Expand Down
27 changes: 0 additions & 27 deletions trunk/drivers/staging/wlan-ng/wlan_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,33 +60,6 @@

#define WLAN_LOG_DEBUG(l, s, args...)

/*=============================================================*/
/*--- General Macros ------------------------------------------*/
/*=============================================================*/

#define wlan_hexchar(x) (((x) < 0x0a) ? ('0' + (x)) : ('a' + ((x) - 0x0a)))

/* Create a string of printable chars from something that might not be */
/* It's recommended that the str be 4*len + 1 bytes long */
#define wlan_mkprintstr(buf, buflen, str, strlen) \
{ \
int i = 0; \
int j = 0; \
memset(str, 0, (strlen)); \
for (i = 0; i < (buflen); i++) { \
if ( isprint((buf)[i]) ) { \
(str)[j] = (buf)[i]; \
j++; \
} else { \
(str)[j] = '\\'; \
(str)[j+1] = 'x'; \
(str)[j+2] = wlan_hexchar(((buf)[i] & 0xf0) >> 4); \
(str)[j+3] = wlan_hexchar(((buf)[i] & 0x0f)); \
j += 4; \
} \
} \
}

/*=============================================================*/
/*--- Variables -----------------------------------------------*/
/*=============================================================*/
Expand Down

0 comments on commit cc314b7

Please sign in to comment.