linux types -> stdint types

Change-Id: I6d430647b5910acb84604520e1caa77c338adf82
diff --git a/drivers/wlan/third_party/atheros/ath.h b/drivers/wlan/third_party/atheros/ath.h
index 1a766b3..61f19e6 100644
--- a/drivers/wlan/third_party/atheros/ath.h
+++ b/drivers/wlan/third_party/atheros/ath.h
@@ -28,7 +28,7 @@
  */
 #define ATH_KEYMAX          128     /* max key cache size we handle */
 
-static const u8 ath_bcast_mac[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+static const uint8_t ath_bcast_mac[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
 
 struct ath_ani {
     bool caldone;
@@ -40,10 +40,10 @@
 };
 
 struct ath_cycle_counters {
-    u32 cycles;
-    u32 rx_busy;
-    u32 rx_frame;
-    u32 tx_frame;
+    uint32_t cycles;
+    uint32_t rx_busy;
+    uint32_t rx_frame;
+    uint32_t tx_frame;
 };
 
 enum ath_device_state {
@@ -69,17 +69,17 @@
 };
 
 struct reg_dmn_pair_mapping {
-    u16 reg_domain;
-    u16 reg_5ghz_ctl;
-    u16 reg_2ghz_ctl;
+    uint16_t reg_domain;
+    uint16_t reg_5ghz_ctl;
+    uint16_t reg_2ghz_ctl;
 };
 
 struct ath_regulatory {
     char alpha2[2];
     enum nl80211_dfs_regions region;
-    u16 country_code;
-    u16 max_power_level;
-    u16 current_rd;
+    uint16_t country_code;
+    uint16_t max_power_level;
+    uint16_t current_rd;
     int16_t power_limit;
     struct reg_dmn_pair_mapping* regpair;
 };
@@ -90,12 +90,12 @@
 };
 
 struct ath_keyval {
-    u8 kv_type;
-    u8 kv_pad;
-    u16 kv_len;
-    u8 kv_val[16];  /* TK */
-    u8 kv_mic[8];   /* Michael MIC key */
-    u8 kv_txmic[8]; /* Michael MIC TX key (used only if the hardware
+    uint8_t kv_type;
+    uint8_t kv_pad;
+    uint16_t kv_len;
+    uint8_t kv_val[16];  /* TK */
+    uint8_t kv_mic[8];   /* Michael MIC key */
+    uint8_t kv_txmic[8]; /* Michael MIC TX key (used only if the hardware
                      * supports both MIC keys in the same key cache entry;
                      * in that case, kv_mic is the RX key) */
 };
@@ -120,12 +120,12 @@
  * @write_flush: flush buffered register writes and disable buffering
  */
 struct ath_ops {
-    unsigned int (*read)(void*, u32 reg_offset);
-    void (*multi_read)(void*, u32* addr, u32* val, u16 count);
-    void (*write)(void*, u32 val, u32 reg_offset);
+    unsigned int (*read)(void*, uint32_t reg_offset);
+    void (*multi_read)(void*, uint32_t* addr, uint32_t* val, uint16_t count);
+    void (*write)(void*, uint32_t val, uint32_t reg_offset);
     void (*enable_write_buffer)(void*);
     void (*write_flush) (void*);
-    u32 (*rmw)(void*, u32 reg_offset, u32 set, u32 clr);
+    uint32_t (*rmw)(void*, uint32_t reg_offset, uint32_t set, uint32_t clr);
     void (*enable_rmw_buffer)(void*);
     void (*rmw_flush) (void*);
 
@@ -153,15 +153,15 @@
 
     struct ath_ani ani;
 
-    u16 cachelsz;
-    u16 curaid;
-    u8 macaddr[ETH_ALEN];
-    u8 curbssid[ETH_ALEN] __aligned(2);
-    u8 bssidmask[ETH_ALEN];
+    uint16_t cachelsz;
+    uint16_t curaid;
+    uint8_t macaddr[ETH_ALEN];
+    uint8_t curbssid[ETH_ALEN] __aligned(2);
+    uint8_t bssidmask[ETH_ALEN];
 
-    u32 rx_bufsize;
+    uint32_t rx_bufsize;
 
-    u32 keymax;
+    uint32_t keymax;
     DECLARE_BITMAP(keymap, ATH_KEYMAX);
     DECLARE_BITMAP(tkip_keymap, ATH_KEYMAX);
     DECLARE_BITMAP(ccmp_keymap, ATH_KEYMAX);
@@ -194,7 +194,7 @@
 }
 
 struct sk_buff* ath_rxbuf_alloc(struct ath_common* common,
-                                u32 len,
+                                uint32_t len,
                                 gfp_t gfp_mask);
 bool ath_is_mybeacon(struct ath_common* common, struct ieee80211_hdr* hdr);
 
@@ -204,7 +204,7 @@
                    struct ieee80211_vif* vif,
                    struct ieee80211_sta* sta,
                    struct ieee80211_key_conf* key);
-bool ath_hw_keyreset(struct ath_common* common, u16 entry);
+bool ath_hw_keyreset(struct ath_common* common, uint16_t entry);
 void ath_hw_cycle_counters_update(struct ath_common* common);
 int32_t ath_hw_get_listen_time(struct ath_common* common);
 
diff --git a/drivers/wlan/third_party/atheros/dfs_pattern_detector.c b/drivers/wlan/third_party/atheros/dfs_pattern_detector.c
index 61366a6..d0ff922 100644
--- a/drivers/wlan/third_party/atheros/dfs_pattern_detector.c
+++ b/drivers/wlan/third_party/atheros/dfs_pattern_detector.c
@@ -29,7 +29,7 @@
  */
 struct radar_types {
     enum nl80211_dfs_regions region;
-    u32 num_radar_types;
+    uint32_t num_radar_types;
     const struct radar_detector_specs* radar_types;
 };
 
@@ -138,7 +138,7 @@
  */
 static const struct radar_types*
 get_dfs_domain_radar_types(enum nl80211_dfs_regions region) {
-    u32 i;
+    uint32_t i;
     for (i = 0; i < ARRAY_SIZE(dfs_domains); i++) {
         if (dfs_domains[i]->region == region) {
             return dfs_domains[i];
@@ -159,14 +159,14 @@
  */
 struct channel_detector {
     struct list_head head;
-    u16 freq;
+    uint16_t freq;
     struct pri_detector** detectors;
 };
 
 /* channel_detector_reset() - reset detector lines for a given channel */
 static void channel_detector_reset(struct dfs_pattern_detector* dpd,
                                    struct channel_detector* cd) {
-    u32 i;
+    uint32_t i;
     if (cd == NULL) {
         return;
     }
@@ -178,7 +178,7 @@
 /* channel_detector_exit() - destructor */
 static void channel_detector_exit(struct dfs_pattern_detector* dpd,
                                   struct channel_detector* cd) {
-    u32 i;
+    uint32_t i;
     if (cd == NULL) {
         return;
     }
@@ -194,8 +194,8 @@
 }
 
 static struct channel_detector*
-channel_detector_create(struct dfs_pattern_detector* dpd, u16 freq) {
-    u32 sz, i;
+channel_detector_create(struct dfs_pattern_detector* dpd, uint16_t freq) {
+    uint32_t sz, i;
     struct channel_detector* cd;
 
     cd = kmalloc(sizeof(*cd), GFP_ATOMIC);
@@ -239,7 +239,7 @@
  * newly create one.
  */
 static struct channel_detector*
-channel_detector_get(struct dfs_pattern_detector* dpd, u16 freq) {
+channel_detector_get(struct dfs_pattern_detector* dpd, uint16_t freq) {
     struct channel_detector* cd;
     list_for_each_entry(cd, &dpd->channel_detectors, head) {
         if (cd->freq == freq) {
@@ -271,7 +271,7 @@
 
 static bool
 dpd_add_pulse(struct dfs_pattern_detector* dpd, struct pulse_event* event) {
-    u32 i;
+    uint32_t i;
     struct channel_detector* cd;
 
     /*
diff --git a/drivers/wlan/third_party/atheros/dfs_pattern_detector.h b/drivers/wlan/third_party/atheros/dfs_pattern_detector.h
index 3962e97..3d1a002 100644
--- a/drivers/wlan/third_party/atheros/dfs_pattern_detector.h
+++ b/drivers/wlan/third_party/atheros/dfs_pattern_detector.h
@@ -30,13 +30,13 @@
  * struct ath_dfs_pool_stats - DFS Statistics for global pools
  */
 struct ath_dfs_pool_stats {
-    u32 pool_reference;
-    u32 pulse_allocated;
-    u32 pulse_alloc_error;
-    u32 pulse_used;
-    u32 pseq_allocated;
-    u32 pseq_alloc_error;
-    u32 pseq_used;
+    uint32_t pool_reference;
+    uint32_t pulse_allocated;
+    uint32_t pulse_alloc_error;
+    uint32_t pulse_used;
+    uint32_t pseq_allocated;
+    uint32_t pseq_alloc_error;
+    uint32_t pseq_used;
 };
 
 /**
@@ -48,10 +48,10 @@
  * @chirp: chirp detected in pulse
  */
 struct pulse_event {
-    u64 ts;
-    u16 freq;
-    u8 width;
-    u8 rssi;
+    uint64_t ts;
+    uint16_t freq;
+    uint8_t width;
+    uint8_t rssi;
     bool chirp;
 };
 
@@ -69,15 +69,15 @@
  * @chirp: chirp required for the radar pattern
  */
 struct radar_detector_specs {
-    u8 type_id;
-    u8 width_min;
-    u8 width_max;
-    u16 pri_min;
-    u16 pri_max;
-    u8 num_pri;
-    u8 ppb;
-    u8 ppb_thresh;
-    u8 max_pri_tolerance;
+    uint8_t type_id;
+    uint8_t width_min;
+    uint8_t width_max;
+    uint16_t pri_min;
+    uint16_t pri_max;
+    uint8_t num_pri;
+    uint8_t ppb;
+    uint8_t ppb_thresh;
+    uint8_t max_pri_tolerance;
     bool chirp;
 };
 
@@ -101,8 +101,8 @@
 
     struct ath_dfs_pool_stats (*get_stats)(struct dfs_pattern_detector* dpd);
     enum nl80211_dfs_regions region;
-    u8 num_radar_types;
-    u64 last_pulse_ts;
+    uint8_t num_radar_types;
+    uint64_t last_pulse_ts;
     /* needed for ath_dbg() */
     struct ath_common* common;
 
diff --git a/drivers/wlan/third_party/atheros/dfs_pri_detector.c b/drivers/wlan/third_party/atheros/dfs_pri_detector.c
index 2883976..3037270 100644
--- a/drivers/wlan/third_party/atheros/dfs_pri_detector.c
+++ b/drivers/wlan/third_party/atheros/dfs_pri_detector.c
@@ -35,17 +35,17 @@
  */
 struct pulse_elem {
     struct list_head head;
-    u64 ts;
+    uint64_t ts;
 };
 
 /**
  * pde_get_multiple() - get number of multiples considering a given tolerance
  * @return factor if abs(val - factor*fraction) <= tolerance, 0 otherwise
  */
-static u32 pde_get_multiple(u32 val, u32 fraction, u32 tolerance) {
-    u32 remainder;
-    u32 factor;
-    u32 delta;
+static uint32_t pde_get_multiple(uint32_t val, uint32_t fraction, uint32_t tolerance) {
+    uint32_t remainder;
+    uint32_t factor;
+    uint32_t delta;
 
     if (fraction == 0) {
         return 0;
@@ -83,7 +83,7 @@
  *
  * Memory is freed after all references to the pools are released.
  */
-static u32 singleton_pool_references;
+static uint32_t singleton_pool_references;
 static LIST_HEAD(pulse_pool);
 static LIST_HEAD(pseq_pool);
 static DEFINE_SPINLOCK(pool_lock);
@@ -177,7 +177,7 @@
 
 /* remove pulses older than window */
 static void pulse_queue_check_window(struct pri_detector* pde) {
-    u64 min_valid_ts;
+    uint64_t min_valid_ts;
     struct pulse_elem* p;
 
     /* there is no delta time with less than 2 pulses */
@@ -198,7 +198,7 @@
     }
 }
 
-static bool pulse_queue_enqueue(struct pri_detector* pde, u64 ts) {
+static bool pulse_queue_enqueue(struct pri_detector* pde, uint64_t ts) {
     struct pulse_elem* p = pool_get_pulse_elem();
     if (p == NULL) {
         p = kmalloc(sizeof(*p), GFP_ATOMIC);
@@ -222,14 +222,14 @@
 }
 
 static bool pseq_handler_create_sequences(struct pri_detector* pde,
-        u64 ts, u32 min_count) {
+        uint64_t ts, uint32_t min_count) {
     struct pulse_elem* p;
     list_for_each_entry(p, &pde->pulses, head) {
         struct pri_sequence ps, *new_ps;
         struct pulse_elem* p2;
-        u32 tmp_false_count;
-        u64 min_valid_ts;
-        u32 delta_ts = ts - p->ts;
+        uint32_t tmp_false_count;
+        uint64_t min_valid_ts;
+        uint32_t delta_ts = ts - p->ts;
 
         if (delta_ts < pde->rs->pri_min)
             /* ignore too small pri */
@@ -258,7 +258,7 @@
         min_valid_ts = ts - ps.dur;
         /* check which past pulses are candidates for new sequence */
         list_for_each_entry_continue(p2, &pde->pulses, head) {
-            u32 factor;
+            uint32_t factor;
             if (p2->ts < min_valid_ts)
                 /* stop on crossing window border */
             {
@@ -307,13 +307,13 @@
 }
 
 /* check new ts and add to all matching existing sequences */
-static u32
-pseq_handler_add_to_existing_seqs(struct pri_detector* pde, u64 ts) {
-    u32 max_count = 0;
+static uint32_t
+pseq_handler_add_to_existing_seqs(struct pri_detector* pde, uint64_t ts) {
+    uint32_t max_count = 0;
     struct pri_sequence* ps, *ps2;
     list_for_each_entry_safe(ps, ps2, &pde->sequences, head) {
-        u32 delta_ts;
-        u32 factor;
+        uint32_t delta_ts;
+        uint32_t factor;
 
         /* first ensure that sequence is within window */
         if (ts > ps->deadline_ts) {
@@ -363,7 +363,7 @@
 
 
 /* free pulse queue and sequences list and give objects back to pools */
-static void pri_detector_reset(struct pri_detector* pde, u64 ts) {
+static void pri_detector_reset(struct pri_detector* pde, uint64_t ts) {
     struct pri_sequence* ps, *ps0;
     struct pulse_elem* p, *p0;
     list_for_each_entry_safe(ps, ps0, &pde->sequences, head) {
@@ -386,9 +386,9 @@
 
 static struct pri_sequence* pri_detector_add_pulse(struct pri_detector* de,
         struct pulse_event* event) {
-    u32 max_updated_seq;
+    uint32_t max_updated_seq;
     struct pri_sequence* ps;
-    u64 ts = event->ts;
+    uint64_t ts = event->ts;
     const struct radar_detector_specs* rs = de->rs;
 
     /* ignore pulses not within width range */
diff --git a/drivers/wlan/third_party/atheros/dfs_pri_detector.h b/drivers/wlan/third_party/atheros/dfs_pri_detector.h
index 8983f16..61abafc 100644
--- a/drivers/wlan/third_party/atheros/dfs_pri_detector.h
+++ b/drivers/wlan/third_party/atheros/dfs_pri_detector.h
@@ -34,13 +34,13 @@
  */
 struct pri_sequence {
     struct list_head head;
-    u32 pri;
-    u32 dur;
-    u32 count;
-    u32 count_falses;
-    u64 first_ts;
-    u64 last_ts;
-    u64 deadline_ts;
+    uint32_t pri;
+    uint32_t dur;
+    uint32_t count;
+    uint32_t count_falses;
+    uint64_t first_ts;
+    uint64_t last_ts;
+    uint64_t deadline_ts;
 };
 
 /**
@@ -60,16 +60,16 @@
     void (*exit)     (struct pri_detector* de);
     struct pri_sequence*
     (*add_pulse)(struct pri_detector* de, struct pulse_event* e);
-    void (*reset)    (struct pri_detector* de, u64 ts);
+    void (*reset)    (struct pri_detector* de, uint64_t ts);
 
     /* private: internal use only */
     const struct radar_detector_specs* rs;
-    u64 last_ts;
+    uint64_t last_ts;
     struct list_head sequences;
     struct list_head pulses;
-    u32 count;
-    u32 max_count;
-    u32 window_size;
+    uint32_t count;
+    uint32_t max_count;
+    uint32_t window_size;
 };
 
 struct pri_detector* pri_detector_init(const struct radar_detector_specs* rs);
diff --git a/drivers/wlan/third_party/atheros/hw.c b/drivers/wlan/third_party/atheros/hw.c
index 73797f0..5367c40 100644
--- a/drivers/wlan/third_party/atheros/hw.c
+++ b/drivers/wlan/third_party/atheros/hw.c
@@ -117,7 +117,7 @@
  */
 void ath_hw_setbssidmask(struct ath_common* common) {
     void* ah = common->ah;
-    u32 id1;
+    uint32_t id1;
 
     REG_WRITE(ah, AR_STA_ID0, get_unaligned_le32(common->macaddr));
     id1 = REG_READ(ah, AR_STA_ID1) & ~AR_STA_ID1_SADH_MASK;
@@ -139,7 +139,7 @@
  * It has to be called while holding common->cc_lock!
  */
 void ath_hw_cycle_counters_update(struct ath_common* common) {
-    u32 cycles, busy, rx, tx;
+    uint32_t cycles, busy, rx, tx;
     void* ah = common->ah;
 
     /* freeze */
diff --git a/drivers/wlan/third_party/atheros/key.c b/drivers/wlan/third_party/atheros/key.c
index 590dfc2..f9423ba 100644
--- a/drivers/wlan/third_party/atheros/key.c
+++ b/drivers/wlan/third_party/atheros/key.c
@@ -39,8 +39,8 @@
 /* Key Cache Management */
 /************************/
 
-bool ath_hw_keyreset(struct ath_common* common, u16 entry) {
-    u32 keyType;
+bool ath_hw_keyreset(struct ath_common* common, uint16_t entry) {
+    uint32_t keyType;
     void* ah = common->ah;
 
     if (entry >= common->keymax) {
@@ -63,7 +63,7 @@
     REG_WRITE(ah, AR_KEYTABLE_MAC1(entry), 0);
 
     if (keyType == AR_KEYTABLE_TYPE_TKIP) {
-        u16 micentry = entry + 64;
+        uint16_t micentry = entry + 64;
 
         REG_WRITE(ah, AR_KEYTABLE_KEY0(micentry), 0);
         REG_WRITE(ah, AR_KEYTABLE_KEY1(micentry), 0);
@@ -84,9 +84,9 @@
 EXPORT_SYMBOL(ath_hw_keyreset);
 
 static bool ath_hw_keysetmac(struct ath_common* common,
-                             u16 entry, const u8* mac) {
-    u32 macHi, macLo;
-    u32 unicast_flag = AR_KEYTABLE_VALID;
+                             uint16_t entry, const uint8_t* mac) {
+    uint32_t macHi, macLo;
+    uint32_t unicast_flag = AR_KEYTABLE_VALID;
     void* ah = common->ah;
 
     if (entry >= common->keymax) {
@@ -125,12 +125,12 @@
     return true;
 }
 
-static bool ath_hw_set_keycache_entry(struct ath_common* common, u16 entry,
+static bool ath_hw_set_keycache_entry(struct ath_common* common, uint16_t entry,
                                       const struct ath_keyval* k,
-                                      const u8* mac) {
+                                      const uint8_t* mac) {
     void* ah = common->ah;
-    u32 key0, key1, key2, key3, key4;
-    u32 keyType;
+    uint32_t key0, key1, key2, key3, key4;
+    uint32_t keyType;
 
     if (entry >= common->keymax) {
         ath_err(common, "set-entry: keycache entry %u out of range\n",
@@ -197,7 +197,7 @@
      */
 
     if (keyType == AR_KEYTABLE_TYPE_TKIP) {
-        u16 micentry = entry + 64;
+        uint16_t micentry = entry + 64;
 
         /*
          * Write inverted key[47:0] first to avoid Michael MIC errors
@@ -232,7 +232,7 @@
              * key3 [31:16] = reserved
              * key4 [31:0] = TX key [63:32]
              */
-            u32 mic0, mic1, mic2, mic3, mic4;
+            uint32_t mic0, mic1, mic2, mic3, mic4;
 
             mic0 = get_unaligned_le32(k->kv_mic + 0);
             mic2 = get_unaligned_le32(k->kv_mic + 4);
@@ -274,7 +274,7 @@
              * for TX and RX keys when these registers offsets are
              * used.
              */
-            u32 mic0, mic2;
+            uint32_t mic0, mic2;
 
             mic0 = get_unaligned_le32(k->kv_mic + 0);
             mic2 = get_unaligned_le32(k->kv_mic + 4);
@@ -336,11 +336,11 @@
     return true;
 }
 
-static int ath_setkey_tkip(struct ath_common* common, u16 keyix, const u8* key,
-                           struct ath_keyval* hk, const u8* addr,
+static int ath_setkey_tkip(struct ath_common* common, uint16_t keyix, const uint8_t* key,
+                           struct ath_keyval* hk, const uint8_t* addr,
                            bool authenticator) {
-    const u8* key_rxmic;
-    const u8* key_txmic;
+    const uint8_t* key_rxmic;
+    const uint8_t* key_txmic;
 
     key_txmic = key + NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY;
     key_rxmic = key + NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY;
@@ -403,7 +403,7 @@
 }
 
 static int ath_reserve_key_cache_slot(struct ath_common* common,
-                                      u32 cipher) {
+                                      uint32_t cipher) {
     int i;
 
     if (cipher == WLAN_CIPHER_SUITE_TKIP) {
@@ -485,8 +485,8 @@
                    struct ieee80211_sta* sta,
                    struct ieee80211_key_conf* key) {
     struct ath_keyval hk;
-    const u8* mac = NULL;
-    u8 gmac[ETH_ALEN];
+    const uint8_t* mac = NULL;
+    uint8_t gmac[ETH_ALEN];
     int ret = 0;
     int idx;
 
diff --git a/drivers/wlan/third_party/atheros/main.c b/drivers/wlan/third_party/atheros/main.c
index a5cd58a..1cc3824 100644
--- a/drivers/wlan/third_party/atheros/main.c
+++ b/drivers/wlan/third_party/atheros/main.c
@@ -27,10 +27,10 @@
 MODULE_LICENSE("Dual BSD/GPL");
 
 struct sk_buff* ath_rxbuf_alloc(struct ath_common* common,
-                                u32 len,
+                                uint32_t len,
                                 gfp_t gfp_mask) {
     struct sk_buff* skb;
-    u32 off;
+    uint32_t off;
 
     /*
      * Cache-line-align.  This is important (for the
diff --git a/drivers/wlan/third_party/atheros/regd.c b/drivers/wlan/third_party/atheros/regd.c
index d74d538..cfbffe3 100644
--- a/drivers/wlan/third_party/atheros/regd.c
+++ b/drivers/wlan/third_party/atheros/regd.c
@@ -196,13 +196,13 @@
     return true;
 }
 
-static inline bool is_wwr_sku(u16 regd) {
+static inline bool is_wwr_sku(uint16_t regd) {
     return ((regd & COUNTRY_ERD_FLAG) != COUNTRY_ERD_FLAG) &&
            (((regd & WORLD_SKU_MASK) == WORLD_SKU_PREFIX) ||
             (regd == WORLD));
 }
 
-static u16 ath_regd_get_eepromRD(struct ath_regulatory* reg) {
+static uint16_t ath_regd_get_eepromRD(struct ath_regulatory* reg) {
     return reg->current_rd & ~WORLDWIDE_ROAMING_FLAG;
 }
 
@@ -242,14 +242,14 @@
     }
 }
 
-bool ath_is_49ghz_allowed(u16 regdomain) {
+bool ath_is_49ghz_allowed(uint16_t regdomain) {
     /* possibly more */
     return regdomain == MKK9_MKKC;
 }
 EXPORT_SYMBOL(ath_is_49ghz_allowed);
 
 /* Frequency is one where radar detection is required */
-static bool ath_is_radar_freq(u16 center_freq,
+static bool ath_is_radar_freq(uint16_t center_freq,
                               struct ath_regulatory* reg)
 
 {
@@ -274,7 +274,7 @@
         }
 }
 
-static void ath_force_clear_no_ir_freq(struct wiphy* wiphy, u16 center_freq) {
+static void ath_force_clear_no_ir_freq(struct wiphy* wiphy, uint16_t center_freq) {
     struct ieee80211_channel* ch;
 
     ch = ieee80211_get_channel(wiphy, center_freq);
@@ -289,7 +289,7 @@
     ch->flags |= IEEE80211_CHAN_NO_IR;
 }
 
-static void ath_force_no_ir_freq(struct wiphy* wiphy, u16 center_freq) {
+static void ath_force_no_ir_freq(struct wiphy* wiphy, uint16_t center_freq) {
     struct ieee80211_channel* ch;
 
     ch = ieee80211_get_channel(wiphy, center_freq);
@@ -454,7 +454,7 @@
     }
 }
 
-u16 ath_regd_find_country_by_name(char* alpha2) {
+uint16_t ath_regd_find_country_by_name(char* alpha2) {
     unsigned int i;
 
     for (i = 0; i < ARRAY_SIZE(allCountries); i++) {
@@ -470,7 +470,7 @@
 static int __ath_reg_dyn_country(struct wiphy* wiphy,
                                  struct ath_regulatory* reg,
                                  struct regulatory_request* request) {
-    u16 country_code;
+    uint16_t country_code;
 
     if (request->initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE &&
             !ath_is_world_regd(reg)) {
@@ -478,7 +478,7 @@
     }
 
     country_code = ath_regd_find_country_by_name(request->alpha2);
-    if (country_code == (u16) -1) {
+    if (country_code == (uint16_t) -1) {
         return -EINVAL;
     }
 
@@ -551,12 +551,12 @@
 EXPORT_SYMBOL(ath_reg_notifier_apply);
 
 static bool ath_regd_is_eeprom_valid(struct ath_regulatory* reg) {
-    u16 rd = ath_regd_get_eepromRD(reg);
+    uint16_t rd = ath_regd_get_eepromRD(reg);
     int i;
 
     if (rd & COUNTRY_ERD_FLAG) {
         /* EEPROM value is a country code */
-        u16 cc = rd & ~COUNTRY_ERD_FLAG;
+        uint16_t cc = rd & ~COUNTRY_ERD_FLAG;
         printk(KERN_DEBUG
                "ath: EEPROM indicates we should expect "
                "a country code\n");
@@ -581,7 +581,7 @@
 
 /* EEPROM country code to regpair mapping */
 static struct country_code_to_enum_rd*
-ath_regd_find_country(u16 countryCode) {
+ath_regd_find_country(uint16_t countryCode) {
     int i;
 
     for (i = 0; i < ARRAY_SIZE(allCountries); i++) {
@@ -606,10 +606,10 @@
 }
 
 /* Returns the map of the EEPROM set RD to a country code */
-static u16 ath_regd_get_default_country(u16 rd) {
+static uint16_t ath_regd_get_default_country(uint16_t rd) {
     if (rd & COUNTRY_ERD_FLAG) {
         struct country_code_to_enum_rd* country = NULL;
-        u16 cc = rd & ~COUNTRY_ERD_FLAG;
+        uint16_t cc = rd & ~COUNTRY_ERD_FLAG;
 
         country = ath_regd_find_country(cc);
         if (country != NULL) {
@@ -685,7 +685,7 @@
 
 static int __ath_regd_init(struct ath_regulatory* reg) {
     struct country_code_to_enum_rd* country = NULL;
-    u16 regdmn;
+    uint16_t regdmn;
 
     if (!reg) {
         return -EINVAL;
@@ -782,8 +782,8 @@
 }
 EXPORT_SYMBOL(ath_regd_init);
 
-u32 ath_regd_get_band_ctl(struct ath_regulatory* reg,
-                          enum nl80211_band band) {
+uint32_t ath_regd_get_band_ctl(struct ath_regulatory* reg,
+                               enum nl80211_band band) {
     if (!reg->regpair ||
             (reg->country_code == CTRY_DEFAULT &&
              is_wwr_sku(ath_regd_get_eepromRD(reg)))) {
diff --git a/drivers/wlan/third_party/atheros/regd.h b/drivers/wlan/third_party/atheros/regd.h
index 183781d..35ddb12 100644
--- a/drivers/wlan/third_party/atheros/regd.h
+++ b/drivers/wlan/third_party/atheros/regd.h
@@ -54,8 +54,8 @@
 #define CHANNEL_QUARTER_BW      5
 
 struct country_code_to_enum_rd {
-    u16 countryCode;
-    u16 regDmnEnum;
+    uint16_t countryCode;
+    uint16_t regDmnEnum;
     const char* isoName;
 };
 
@@ -250,13 +250,13 @@
 };
 
 bool ath_is_world_regd(struct ath_regulatory* reg);
-bool ath_is_49ghz_allowed(u16 redomain);
-u16 ath_regd_find_country_by_name(char* alpha2);
+bool ath_is_49ghz_allowed(uint16_t redomain);
+uint16_t ath_regd_find_country_by_name(char* alpha2);
 int ath_regd_init(struct ath_regulatory* reg, struct wiphy* wiphy,
                   void (*reg_notifier)(struct wiphy* wiphy,
                                        struct regulatory_request* request));
-u32 ath_regd_get_band_ctl(struct ath_regulatory* reg,
-                          enum nl80211_band band);
+uint32_t ath_regd_get_band_ctl(struct ath_regulatory* reg,
+                               enum nl80211_band band);
 void ath_reg_notifier_apply(struct wiphy* wiphy,
                             struct regulatory_request* request,
                             struct ath_regulatory* reg);
diff --git a/drivers/wlan/third_party/atheros/spectral_common.h b/drivers/wlan/third_party/atheros/spectral_common.h
index 8555b43..61de70d 100644
--- a/drivers/wlan/third_party/atheros/spectral_common.h
+++ b/drivers/wlan/third_party/atheros/spectral_common.h
@@ -40,7 +40,7 @@
 };
 
 struct fft_sample_tlv {
-    u8 type;    /* see ath_fft_sample */
+    uint8_t type;    /* see ath_fft_sample */
     __be16 length;
     /* type dependent data follows */
 } __packed;
@@ -48,52 +48,52 @@
 struct fft_sample_ht20 {
     struct fft_sample_tlv tlv;
 
-    u8 max_exp;
+    uint8_t max_exp;
 
     __be16 freq;
-    s8 rssi;
-    s8 noise;
+    int8_t rssi;
+    int8_t noise;
 
     __be16 max_magnitude;
-    u8 max_index;
-    u8 bitmap_weight;
+    uint8_t max_index;
+    uint8_t bitmap_weight;
 
     __be64 tsf;
 
-    u8 data[SPECTRAL_HT20_NUM_BINS];
+    uint8_t data[SPECTRAL_HT20_NUM_BINS];
 } __packed;
 
 struct fft_sample_ht20_40 {
     struct fft_sample_tlv tlv;
 
-    u8 channel_type;
+    uint8_t channel_type;
     __be16 freq;
 
-    s8 lower_rssi;
-    s8 upper_rssi;
+    int8_t lower_rssi;
+    int8_t upper_rssi;
 
     __be64 tsf;
 
-    s8 lower_noise;
-    s8 upper_noise;
+    int8_t lower_noise;
+    int8_t upper_noise;
 
     __be16 lower_max_magnitude;
     __be16 upper_max_magnitude;
 
-    u8 lower_max_index;
-    u8 upper_max_index;
+    uint8_t lower_max_index;
+    uint8_t upper_max_index;
 
-    u8 lower_bitmap_weight;
-    u8 upper_bitmap_weight;
+    uint8_t lower_bitmap_weight;
+    uint8_t upper_bitmap_weight;
 
-    u8 max_exp;
+    uint8_t max_exp;
 
-    u8 data[SPECTRAL_HT20_40_NUM_BINS];
+    uint8_t data[SPECTRAL_HT20_40_NUM_BINS];
 } __packed;
 
 struct fft_sample_ath10k {
     struct fft_sample_tlv tlv;
-    u8 chan_width_mhz;
+    uint8_t chan_width_mhz;
     __be16 freq1;
     __be16 freq2;
     __be16 noise;
@@ -101,13 +101,13 @@
     __be16 total_gain_db;
     __be16 base_pwr_db;
     __be64 tsf;
-    s8 max_index;
-    u8 rssi;
-    u8 relpwr_db;
-    u8 avgpwr_db;
-    u8 max_exp;
+    int8_t max_index;
+    uint8_t rssi;
+    uint8_t relpwr_db;
+    uint8_t avgpwr_db;
+    uint8_t max_exp;
 
-    u8 data[0];
+    uint8_t data[0];
 } __packed;
 
 #endif /* SPECTRAL_COMMON_H */