*     level setting.
  * @WPAN_PHY_FLAG_CCA_MODE: Indicates that transceiver will support cca mode
  *     setting.
+ * @WPAN_PHY_FLAG_STATE_QUEUE_STOPPED: Indicates that the transmit queue was
+ *     temporarily stopped.
  */
 enum wpan_phy_flags {
        WPAN_PHY_FLAG_TXPOWER           = BIT(1),
        WPAN_PHY_FLAG_CCA_ED_LEVEL      = BIT(2),
        WPAN_PHY_FLAG_CCA_MODE          = BIT(3),
+       WPAN_PHY_FLAG_STATE_QUEUE_STOPPED = BIT(4),
 };
 
 struct wpan_phy {
         */
        const void *privid;
 
-       u32 flags;
+       unsigned long flags;
 
        /*
         * This is a PIB according to 802.15.4-2011.
 
 
 int ieee802154_sync_and_hold_queue(struct ieee802154_local *local)
 {
+       int ret;
+
        ieee802154_hold_queue(local);
+       ret = ieee802154_sync_queue(local);
+       set_bit(WPAN_PHY_FLAG_STATE_QUEUE_STOPPED, &local->phy->flags);
 
-       return ieee802154_sync_queue(local);
+       return ret;
 }
 
 int ieee802154_mlme_op_pre(struct ieee802154_local *local)
        return ret;
 }
 
+static bool ieee802154_queue_is_stopped(struct ieee802154_local *local)
+{
+       return test_bit(WPAN_PHY_FLAG_STATE_QUEUE_STOPPED, &local->phy->flags);
+}
+
 static netdev_tx_t
 ieee802154_hot_tx(struct ieee802154_local *local, struct sk_buff *skb)
 {
+       /* Warn if the net interface tries to transmit frames while the
+        * ieee802154 core assumes the queue is stopped.
+        */
+       WARN_ON_ONCE(ieee802154_queue_is_stopped(local));
+
        return ieee802154_tx(local, skb);
 }
 
 
        struct ieee802154_sub_if_data *sdata;
 
        rcu_read_lock();
+       clear_bit(WPAN_PHY_FLAG_STATE_QUEUE_STOPPED, &local->phy->flags);
        list_for_each_entry_rcu(sdata, &local->interfaces, list) {
                if (!sdata->dev)
                        continue;