summaryrefslogtreecommitdiff
path: root/package/libertas/src/compat.h
blob: 26c636343ea147106df389942f54a85041a61e9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef __COMPAT_H
#define __COMPAT_H

#include <linux/kernel.h>
#include <linux/types.h>

#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
#define DECLARE_MAC_BUF(var) char var[18] __maybe_unused

static inline char *print_mac(char *buf, const u8 *addr)
{
	sprintf(buf, MAC_FMT,
		addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
	return buf;
}

#endif