1 /* SPDX-License-Identifier: GPL-2.0-only */
10 #include <linux/skbuff.h>
11 #include <linux/bitops.h>
12 #include <linux/bitfield.h>
14 #define MT76_INCR(_var, _size) \
15 (_var = (((_var) + 1) % (_size)))
17 int mt76_wcid_alloc(unsigned long *mask, int size);
20 mt76_wcid_free(unsigned long *mask, int idx)
22 mask[idx / BITS_PER_LONG] &= ~BIT(idx % BITS_PER_LONG);
26 mt76_skb_set_moredata(struct sk_buff *skb, bool enable)
28 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
31 hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_MOREDATA);
33 hdr->frame_control &= ~cpu_to_le16(IEEE80211_FCTL_MOREDATA);