#include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/etherdevice.h>
+#include <linux/spinlock.h>
 
 #include "wlcore.h"
 #include "debug.h"
 {
        int hwq = wlcore_tx_get_mac80211_queue(wlvif, queue);
 
-       WARN_ON_ONCE(!spin_is_locked(&wl->wl_lock));
+       assert_spin_locked(&wl->wl_lock);
        return test_bit(reason, &wl->queue_stop_reasons[hwq]);
 }
 
 {
        int hwq = wlcore_tx_get_mac80211_queue(wlvif, queue);
 
-       WARN_ON_ONCE(!spin_is_locked(&wl->wl_lock));
+       assert_spin_locked(&wl->wl_lock);
        return !!wl->queue_stop_reasons[hwq];
 }