100-api_update.patch 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. --- a/mt76.h
  2. +++ b/mt76.h
  3. @@ -14,6 +14,7 @@
  4. #include <linux/usb.h>
  5. #include <linux/average.h>
  6. #include <linux/soc/mediatek/mtk_wed.h>
  7. +#include <net/netlink.h>
  8. #include <net/mac80211.h>
  9. #if LINUX_VERSION_CODE < KERNEL_VERSION(6,6,0)
  10. #include <net/page_pool.h>
  11. @@ -1475,6 +1476,7 @@ static inline void mt76_testmode_reset(s
  12. #endif
  13. }
  14. +extern const struct nla_policy mt76_tm_policy[NUM_MT76_TM_ATTRS];
  15. /* internal */
  16. static inline struct ieee80211_hw *
  17. --- a/mt7603/main.c
  18. +++ b/mt7603/main.c
  19. @@ -23,7 +23,7 @@ mt7603_start(struct ieee80211_hw *hw)
  20. }
  21. static void
  22. -mt7603_stop(struct ieee80211_hw *hw)
  23. +mt7603_stop(struct ieee80211_hw *hw, bool suspend)
  24. {
  25. struct mt7603_dev *dev = hw->priv;
  26. --- a/mt7615/main.c
  27. +++ b/mt7615/main.c
  28. @@ -91,7 +91,7 @@ out:
  29. return ret;
  30. }
  31. -static void mt7615_stop(struct ieee80211_hw *hw)
  32. +static void mt7615_stop(struct ieee80211_hw *hw, bool suspend)
  33. {
  34. struct mt7615_dev *dev = mt7615_hw_dev(hw);
  35. struct mt7615_phy *phy = mt7615_hw_phy(hw);
  36. --- a/mt7615/usb.c
  37. +++ b/mt7615/usb.c
  38. @@ -79,7 +79,7 @@ static void mt7663u_copy(struct mt76_dev
  39. mutex_unlock(&usb->usb_ctrl_mtx);
  40. }
  41. -static void mt7663u_stop(struct ieee80211_hw *hw)
  42. +static void mt7663u_stop(struct ieee80211_hw *hw, bool suspend)
  43. {
  44. struct mt7615_phy *phy = mt7615_hw_phy(hw);
  45. struct mt7615_dev *dev = hw->priv;
  46. --- a/mt76x0/pci.c
  47. +++ b/mt76x0/pci.c
  48. @@ -44,7 +44,7 @@ static void mt76x0e_stop_hw(struct mt76x
  49. mt76_clear(dev, MT_WPDMA_GLO_CFG, MT_WPDMA_GLO_CFG_RX_DMA_EN);
  50. }
  51. -static void mt76x0e_stop(struct ieee80211_hw *hw)
  52. +static void mt76x0e_stop(struct ieee80211_hw *hw, bool suspend)
  53. {
  54. struct mt76x02_dev *dev = hw->priv;
  55. --- a/mt76x0/usb.c
  56. +++ b/mt76x0/usb.c
  57. @@ -77,7 +77,7 @@ static void mt76x0u_cleanup(struct mt76x
  58. mt76u_queues_deinit(&dev->mt76);
  59. }
  60. -static void mt76x0u_stop(struct ieee80211_hw *hw)
  61. +static void mt76x0u_stop(struct ieee80211_hw *hw, bool suspend)
  62. {
  63. struct mt76x02_dev *dev = hw->priv;
  64. --- a/mt76x2/pci_main.c
  65. +++ b/mt76x2/pci_main.c
  66. @@ -24,7 +24,7 @@ mt76x2_start(struct ieee80211_hw *hw)
  67. }
  68. static void
  69. -mt76x2_stop(struct ieee80211_hw *hw)
  70. +mt76x2_stop(struct ieee80211_hw *hw, bool suspend)
  71. {
  72. struct mt76x02_dev *dev = hw->priv;
  73. --- a/mt76x2/usb_main.c
  74. +++ b/mt76x2/usb_main.c
  75. @@ -22,7 +22,7 @@ static int mt76x2u_start(struct ieee8021
  76. return 0;
  77. }
  78. -static void mt76x2u_stop(struct ieee80211_hw *hw)
  79. +static void mt76x2u_stop(struct ieee80211_hw *hw, bool suspend)
  80. {
  81. struct mt76x02_dev *dev = hw->priv;
  82. --- a/mt7915/main.c
  83. +++ b/mt7915/main.c
  84. @@ -108,7 +108,7 @@ static int mt7915_start(struct ieee80211
  85. return ret;
  86. }
  87. -static void mt7915_stop(struct ieee80211_hw *hw)
  88. +static void mt7915_stop(struct ieee80211_hw *hw, bool suspend)
  89. {
  90. struct mt7915_dev *dev = mt7915_hw_dev(hw);
  91. struct mt7915_phy *phy = mt7915_hw_phy(hw);
  92. --- a/mt7915/mcu.c
  93. +++ b/mt7915/mcu.c
  94. @@ -335,7 +335,7 @@ mt7915_mcu_cca_finish(void *priv, u8 *ma
  95. if (!vif->bss_conf.color_change_active || vif->type == NL80211_IFTYPE_STATION)
  96. return;
  97. - ieee80211_color_change_finish(vif);
  98. + ieee80211_color_change_finish(vif, 0);
  99. }
  100. static void
  101. --- a/mt7921/main.c
  102. +++ b/mt7921/main.c
  103. @@ -268,7 +268,7 @@ static int mt7921_start(struct ieee80211
  104. return err;
  105. }
  106. -static void mt7921_stop(struct ieee80211_hw *hw)
  107. +static void mt7921_stop(struct ieee80211_hw *hw, bool suspend)
  108. {
  109. struct mt792x_dev *dev = mt792x_hw_dev(hw);
  110. int err = 0;
  111. @@ -281,7 +281,7 @@ static void mt7921_stop(struct ieee80211
  112. return;
  113. }
  114. - mt792x_stop(hw);
  115. + mt792x_stop(hw, false);
  116. }
  117. static int
  118. --- a/mt792x.h
  119. +++ b/mt792x.h
  120. @@ -337,7 +337,7 @@ static inline bool mt792x_dma_need_reini
  121. #define mt792x_mutex_release(dev) \
  122. mt76_connac_mutex_release(&(dev)->mt76, &(dev)->pm)
  123. -void mt792x_stop(struct ieee80211_hw *hw);
  124. +void mt792x_stop(struct ieee80211_hw *hw, bool suspend);
  125. void mt792x_pm_wake_work(struct work_struct *work);
  126. void mt792x_pm_power_save_work(struct work_struct *work);
  127. void mt792x_reset(struct mt76_dev *mdev);
  128. @@ -457,7 +457,7 @@ void mt792xu_wr(struct mt76_dev *dev, u3
  129. u32 mt792xu_rmw(struct mt76_dev *dev, u32 addr, u32 mask, u32 val);
  130. void mt792xu_copy(struct mt76_dev *dev, u32 offset, const void *data, int len);
  131. void mt792xu_disconnect(struct usb_interface *usb_intf);
  132. -void mt792xu_stop(struct ieee80211_hw *hw);
  133. +void mt792xu_stop(struct ieee80211_hw *hw, bool suspend);
  134. static inline void
  135. mt792x_skb_add_usb_sdio_hdr(struct mt792x_dev *dev, struct sk_buff *skb,
  136. --- a/mt792x_core.c
  137. +++ b/mt792x_core.c
  138. @@ -113,7 +113,7 @@ void mt792x_tx(struct ieee80211_hw *hw,
  139. }
  140. EXPORT_SYMBOL_GPL(mt792x_tx);
  141. -void mt792x_stop(struct ieee80211_hw *hw)
  142. +void mt792x_stop(struct ieee80211_hw *hw, bool suspend)
  143. {
  144. struct mt792x_dev *dev = mt792x_hw_dev(hw);
  145. struct mt792x_phy *phy = mt792x_hw_phy(hw);
  146. --- a/mt792x_usb.c
  147. +++ b/mt792x_usb.c
  148. @@ -285,12 +285,12 @@ int mt792xu_init_reset(struct mt792x_dev
  149. }
  150. EXPORT_SYMBOL_GPL(mt792xu_init_reset);
  151. -void mt792xu_stop(struct ieee80211_hw *hw)
  152. +void mt792xu_stop(struct ieee80211_hw *hw, bool suspend)
  153. {
  154. struct mt792x_dev *dev = mt792x_hw_dev(hw);
  155. mt76u_stop_tx(&dev->mt76);
  156. - mt792x_stop(hw);
  157. + mt792x_stop(hw, false);
  158. }
  159. EXPORT_SYMBOL_GPL(mt792xu_stop);
  160. --- a/mt7996/main.c
  161. +++ b/mt7996/main.c
  162. @@ -93,7 +93,7 @@ static int mt7996_start(struct ieee80211
  163. return ret;
  164. }
  165. -static void mt7996_stop(struct ieee80211_hw *hw)
  166. +static void mt7996_stop(struct ieee80211_hw *hw, bool suspend)
  167. {
  168. struct mt7996_dev *dev = mt7996_hw_dev(hw);
  169. struct mt7996_phy *phy = mt7996_hw_phy(hw);
  170. --- a/mt7996/mcu.c
  171. +++ b/mt7996/mcu.c
  172. @@ -421,7 +421,7 @@ mt7996_mcu_cca_finish(void *priv, u8 *ma
  173. if (!vif->bss_conf.color_change_active || vif->type == NL80211_IFTYPE_STATION)
  174. return;
  175. - ieee80211_color_change_finish(vif);
  176. + ieee80211_color_change_finish(vif, 0);
  177. }
  178. static void
  179. --- a/testmode.h
  180. +++ b/testmode.h
  181. @@ -193,6 +193,4 @@ enum mt76_testmode_tx_mode {
  182. MT76_TM_TX_MODE_MAX = NUM_MT76_TM_TX_MODES - 1,
  183. };
  184. -extern const struct nla_policy mt76_tm_policy[NUM_MT76_TM_ATTRS];
  185. -
  186. #endif