carl9170 firmware: add get_random_u16 helper
[carl9170fw.git] / carlfw / include / gpio.h
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);