- if (ndev) {
-+ struct txq_info *txqi = NULL;
-+
-+ if (local->ops->wake_tx_queue) {
-+ txqi = kzalloc(sizeof(*txqi) +
-+ local->hw.txq_data_size, GFP_KERNEL);
-+ if (txqi)
-+ ieee80211_init_tx_queue(sdata, NULL, txqi, 0);
+@@ -1693,10 +1701,18 @@ int ieee80211_if_add(struct ieee80211_lo
+ ieee80211_assign_perm_addr(local, wdev->address, type);
+ memcpy(sdata->vif.addr, wdev->address, ETH_ALEN);
+ } else {
++ int size = ALIGN(sizeof(*sdata) + local->hw.vif_data_size,
++ sizeof(void *));
++ int txq_size = 0;
++
++ if (local->ops->wake_tx_queue)
++ txq_size += sizeof(struct txq_info) +
++ local->hw.txq_data_size;
++
+ if (local->hw.queues >= IEEE80211_NUM_ACS)
+ txqs = IEEE80211_NUM_ACS;
+
+- ndev = alloc_netdev_mqs(sizeof(*sdata) + local->hw.vif_data_size,
++ ndev = alloc_netdev_mqs(size + txq_size,
+ name, NET_NAME_UNKNOWN,
+ ieee80211_if_setup, txqs, 1);
+ if (!ndev)
+@@ -1731,6 +1747,11 @@ int ieee80211_if_add(struct ieee80211_lo
+ memcpy(sdata->vif.addr, ndev->dev_addr, ETH_ALEN);
+ memcpy(sdata->name, ndev->name, IFNAMSIZ);
+
++ if (txq_size) {
++ txqi = netdev_priv(ndev) + size;
++ ieee80211_init_tx_queue(sdata, NULL, txqi, 0);