|
@@ -390,6 +390,18 @@ struct dentry *mt76_register_debugfs(struct mt76_dev *dev);
|
|
|
int mt76_eeprom_init(struct mt76_dev *dev, int len);
|
|
|
void mt76_eeprom_override(struct mt76_dev *dev);
|
|
|
|
|
|
+/* increment with wrap-around */
|
|
|
+static inline int mt76_incr(int val, int size)
|
|
|
+{
|
|
|
+ return (val + 1) & (size - 1);
|
|
|
+}
|
|
|
+
|
|
|
+/* decrement with wrap-around */
|
|
|
+static inline int mt76_decr(int val, int size)
|
|
|
+{
|
|
|
+ return (val - 1) & (size - 1);
|
|
|
+}
|
|
|
+
|
|
|
static inline struct ieee80211_txq *
|
|
|
mtxq_to_txq(struct mt76_txq *mtxq)
|
|
|
{
|