From fdb8ec9a5c89460ee284507772090fa7a7eba670 Mon Sep 17 00:00:00 2001 From: Roman Yeryomin Date: Mon, 10 Mar 2014 20:18:35 +0200 Subject: Reorganize the code a bit. Add verbose flag to enable runtime debugging instead of compile time flag. Signed-off-by: Roman Yeryomin --- rtkmib.h | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'rtkmib.h') diff --git a/rtkmib.h b/rtkmib.h index da926e2..19ad77d 100644 --- a/rtkmib.h +++ b/rtkmib.h @@ -7,12 +7,6 @@ #include #include -#ifndef _DEBUG_ -#include -#else -#define syslog(x,fmt,args...) printf(fmt,## args) -#endif - #define __PACK__ __attribute__((packed)) #define MIB_ERR_GENERIC -1 @@ -29,28 +23,29 @@ #define MIB_OFFSET MIB_OFFSET_DEFAULT #endif -#define MIB_HEADER_TAG "H6" -#define MIB_HEADER_COMPR_TAG "COMPHS" - -#define MIB_TAG_LEN 2 -#define MIB_COMPR_TAG_LEN 6 -#define SIGNATURE_LEN 4 #define HW_SETTING_VER 3 /* hw setting version */ +#define MIB_HEADER_TAG "H6" +#define MIB_TAG_LEN 2 +#define MIB_SIG_LEN 4 typedef struct mib_hdr { - unsigned char sig[ SIGNATURE_LEN ]; /* tag + version */ + unsigned char sig[ MIB_SIG_LEN ]; /* tag + version */ unsigned short len; } __PACK__ mib_hdr_t; +#define MIB_HEADER_COMP_TAG "COMP" +#define MIB_HEADER_COMPHS_TAG "HS" +#define MIB_HEADER_COMPCS_TAG "CS" +#define MIB_COMPR_TAG_LEN 4 +#define MIB_COMPR_SIG_LEN 6 typedef struct mib_hdr_compr { - unsigned char sig[ MIB_COMPR_TAG_LEN ]; /* tag only? */ + unsigned char sig[ MIB_COMPR_SIG_LEN ]; /* tag + type */ uint16_t factor; uint32_t len; } __PACK__ mib_hdr_compr_t; - #ifdef HAVE_RTK_DUAL_BAND_SUPPORT #define NUM_WLAN_INTERFACE 2 #else -- cgit v1.2.3