diff options
author | Luis R. Rodriguez <mcgrof@qca.qualcomm.com> | 2011-11-15 13:50:23 -0800 |
---|---|---|
committer | Luis R. Rodriguez <mcgrof@qca.qualcomm.com> | 2011-11-15 13:50:23 -0800 |
commit | d6bf498f05a2ac64a48137da00c0ada021a38fe0 (patch) | |
tree | f7c1fd9348c66fbb20c4beb9525ee309b3dc777d /reglib.h | |
parent | 8cbde0452c707ad0fab4ce65fcbd96cc10a8482d (diff) | |
download | crda-d6bf498f05a2ac64a48137da00c0ada021a38fe0.tar.gz crda-d6bf498f05a2ac64a48137da00c0ada021a38fe0.tar.bz2 crda-d6bf498f05a2ac64a48137da00c0ada021a38fe0.zip |
crda: use stdint.h instead of linux/types.h
Given that we may need to make a library out of some
routines here to share with the regulatory simulator.
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Diffstat (limited to 'reglib.h')
-rw-r--r-- | reglib.h | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -2,7 +2,7 @@ #define REG_LIB_H #include <stdlib.h> -#include <linux/types.h> +#include <stdint.h> #include "regdb.h" @@ -10,24 +10,24 @@ /* This matches the kernel's data structures */ struct ieee80211_freq_range { - __u32 start_freq_khz; - __u32 end_freq_khz; - __u32 max_bandwidth_khz; + uint32_t start_freq_khz; + uint32_t end_freq_khz; + uint32_t max_bandwidth_khz; }; struct ieee80211_power_rule { - __u32 max_antenna_gain; - __u32 max_eirp; + uint32_t max_antenna_gain; + uint32_t max_eirp; }; struct ieee80211_reg_rule { struct ieee80211_freq_range freq_range; struct ieee80211_power_rule power_rule; - __u32 flags; + uint32_t flags; }; struct ieee80211_regdomain { - __u32 n_reg_rules; + uint32_t n_reg_rules; char alpha2[2]; struct ieee80211_reg_rule reg_rules[]; }; @@ -61,21 +61,21 @@ static inline int is_valid_regdom(const char *alpha2) return 1; } -static inline __u32 max(__u32 a, __u32 b) +static inline uint32_t max(uint32_t a, uint32_t b) { return (a > b) ? a : b; } -static inline __u32 min(__u32 a, __u32 b) +static inline uint32_t min(uint32_t a, uint32_t b) { return (a > b) ? b : a; } -void *crda_get_file_ptr(__u8 *db, int dblen, int structlen, __be32 ptr); -int crda_verify_db_signature(__u8 *db, int dblen, int siglen); +void *crda_get_file_ptr(uint8_t *db, int dblen, int structlen, uint32_t ptr); +int crda_verify_db_signature(uint8_t *db, int dblen, int siglen); /* File reg db entry -> rd converstion utilities */ -struct ieee80211_regdomain *country2rd(__u8 *db, int dblen, +struct ieee80211_regdomain *country2rd(uint8_t *db, int dblen, struct regdb_file_reg_country *country); /* reg helpers */ |