Merge branch 'master' into radar
authorChristian Lamparter <chunkeey@googlemail.com>
Mon, 15 Feb 2016 17:28:51 +0000 (18:28 +0100)
committerChristian Lamparter <chunkeey@googlemail.com>
Mon, 15 Feb 2016 17:31:16 +0000 (18:31 +0100)
carlfw/include/gpio.h
carlfw/include/io.h
carlfw/usb/usb.c
include/shared/fwdesc.h
tools/src/fwprepare.c

index a9c0b8805e3e6f9f5575cdc4f258b3f9a0a3c0d0..56c554a40da4cf938a63e2e43e74cc56c100ca73 100644 (file)
@@ -36,6 +36,11 @@ static inline __inline void led_set(const unsigned int ledstate)
        set(AR9170_GPIO_REG_PORT_DATA, ledstate);
 }
 
+static inline __inline u16 get_random_u16(void)
+{
+       return getw(AR9170_RAND_REG_NUM);
+}
+
 #ifdef CONFIG_CARL9170FW_GPIO_INTERRUPT
 
 void gpio_timer(void);
index d48059424f8f426908e47897e78aa621837a35d9..5bdc821a30eca60a2c824781b68c5d4988a43d2a 100644 (file)
@@ -149,4 +149,9 @@ static inline __inline void orb(const volatile uint32_t addr, const volatile uin
        setb(addr, getb(addr) | val);
 }
 
+static inline __inline uint16_t getw(const volatile uint32_t addr)
+{
+       return readw((const volatile void *) addr);
+}
+
 #endif /* __CARL9170FW_IO_H */
index 6142dcde914b0e6732d57a358d3de62c7f1f3112..eb57da14aaad0f00c1648d68d6aa07a0406795ef 100644 (file)
@@ -527,7 +527,6 @@ static int usb_set_configuration(const struct usb_ctrlrequest *ctrl)
                        usb_init_fullspeed_fifo_cfg();
                }
                /* usb_pta_init() ? */
-               break;
 #endif /* CONFIG_CARL9170FW_USB_MODESWITCH */
 
                usb_reset_eps();
index 10327a7a591c7146182310c34378150c30469477..d542b01eb0409d8677c212e2f13838c9394ab4c9 100644 (file)
@@ -78,15 +78,15 @@ enum carl9170fw_feature_list {
        /* HW (ANI, CCA, MIB) tally counters */
        CARL9170FW_HW_COUNTERS,
 
-       /* Pattern generator */
-       CARL9170FW_PATTERN_GENERATOR,
-
        /* Firmware will pass BA when BARs are queued */
        CARL9170FW_RX_BA_FILTER,
 
        /* Firmware has support to write a byte at a time  */
        CARL9170FW_HAS_WREGB_CMD,
 
+       /* Pattern generator */
+       CARL9170FW_PATTERN_GENERATOR,
+
        /* KEEP LAST */
        __CARL9170FW_FEATURE_NUM
 };
index f022874c1d1689c1d0635ee975ec06a11a094be7..f5e780635245c0915b8d46d132c6aeceeb41323b 100644 (file)
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
-#include <ctype.h>
 
 #include "carlfw.h"
+#include "compiler.h"
 #include "pattern.h"
 
-
 static void checksum_help(void)
 {
        fprintf(stderr, "Usage:\n");