005-mac80211_update.patch 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  1. --- a/core.c
  2. +++ b/core.c
  3. @@ -718,7 +718,7 @@ static void mwl_chnl_switch_event(struct
  4. vif = container_of((void *)mwl_vif, struct ieee80211_vif,
  5. drv_priv);
  6. - if (vif->csa_active)
  7. + if (vif->bss_conf.csa_active)
  8. ieee80211_csa_finish(vif);
  9. }
  10. spin_unlock_bh(&priv->vif_lock);
  11. --- a/debugfs.c
  12. +++ b/debugfs.c
  13. @@ -498,9 +498,9 @@ static ssize_t mwl_debugfs_vif_read(stru
  14. switch (vif->type) {
  15. case NL80211_IFTYPE_AP:
  16. len += scnprintf(p + len, size - len, "type: ap\n");
  17. - memcpy(ssid, vif->bss_conf.ssid,
  18. - vif->bss_conf.ssid_len);
  19. - ssid[vif->bss_conf.ssid_len] = 0;
  20. + memcpy(ssid, vif->cfg.ssid,
  21. + vif->cfg.ssid_len);
  22. + ssid[vif->cfg.ssid_len] = 0;
  23. len += scnprintf(p + len, size - len,
  24. "ssid: %s\n", ssid);
  25. len += scnprintf(p + len, size - len,
  26. @@ -522,8 +522,8 @@ static ssize_t mwl_debugfs_vif_read(stru
  27. "type: unknown\n");
  28. break;
  29. }
  30. - if (vif->chanctx_conf) {
  31. - chan_def = &vif->chanctx_conf->def;
  32. + if (vif->bss_conf.chanctx_conf) {
  33. + chan_def = &vif->bss_conf.chanctx_conf->def;
  34. len += scnprintf(p + len, size - len,
  35. "channel: %d: width: %d\n",
  36. chan_def->chan->hw_value,
  37. @@ -596,18 +596,18 @@ static ssize_t mwl_debugfs_sta_read(stru
  38. sta_info->wds ? "true" : "false",
  39. sta_info->ba_hist.enable ? "enable" : "disable",
  40. sta_info->is_amsdu_allowed ? sta_info->amsdu_ctrl.cap : 0 ,
  41. - sta->ht_cap.ht_supported ? sta->ht_cap.cap : 0,
  42. - sta->ht_cap.ht_supported ? sta->ht_cap.ampdu_factor : 0,
  43. - sta->ht_cap.ht_supported ? sta->ht_cap.ampdu_density : 0,
  44. - sta->ht_cap.ht_supported ? sta->ht_cap.mcs.rx_mask[0] : 0,
  45. - sta->ht_cap.ht_supported ? sta->ht_cap.mcs.rx_mask[1] : 0,
  46. - sta->ht_cap.ht_supported ? sta->ht_cap.mcs.rx_mask[2] : 0,
  47. - sta->ht_cap.ht_supported ? sta->ht_cap.mcs.rx_mask[3] : 0,
  48. - sta->vht_cap.vht_supported ? sta->vht_cap.cap : 0,
  49. - sta->vht_cap.vht_supported ? sta->vht_cap.vht_mcs.rx_mcs_map : 0,
  50. - sta->vht_cap.vht_supported ? sta->vht_cap.vht_mcs.tx_mcs_map : 0,
  51. - sta->bandwidth,
  52. - sta->rx_nss,
  53. + sta->deflink.ht_cap.ht_supported ? sta->deflink.ht_cap.cap : 0,
  54. + sta->deflink.ht_cap.ht_supported ? sta->deflink.ht_cap.ampdu_factor : 0,
  55. + sta->deflink.ht_cap.ht_supported ? sta->deflink.ht_cap.ampdu_density : 0,
  56. + sta->deflink.ht_cap.ht_supported ? sta->deflink.ht_cap.mcs.rx_mask[0] : 0,
  57. + sta->deflink.ht_cap.ht_supported ? sta->deflink.ht_cap.mcs.rx_mask[1] : 0,
  58. + sta->deflink.ht_cap.ht_supported ? sta->deflink.ht_cap.mcs.rx_mask[2] : 0,
  59. + sta->deflink.ht_cap.ht_supported ? sta->deflink.ht_cap.mcs.rx_mask[3] : 0,
  60. + sta->deflink.vht_cap.vht_supported ? sta->deflink.vht_cap.cap : 0,
  61. + sta->deflink.vht_cap.vht_supported ? sta->deflink.vht_cap.vht_mcs.rx_mcs_map : 0,
  62. + sta->deflink.vht_cap.vht_supported ? sta->deflink.vht_cap.vht_mcs.tx_mcs_map : 0,
  63. + sta->deflink.bandwidth,
  64. + sta->deflink.rx_nss,
  65. sta->tdls,
  66. sta->tdls_initiator,
  67. sta->wme,
  68. --- a/hif/fwcmd.c
  69. +++ b/hif/fwcmd.c
  70. @@ -633,11 +633,15 @@ einval:
  71. }
  72. static int mwl_fwcmd_set_ap_beacon(struct mwl_priv *priv,
  73. - struct mwl_vif *mwl_vif,
  74. - struct ieee80211_bss_conf *bss_conf)
  75. + struct ieee80211_vif *vif)
  76. {
  77. struct hostcmd_cmd_ap_beacon *pcmd;
  78. struct ds_params *phy_ds_param_set;
  79. + struct mwl_vif *mwl_vif;
  80. + struct ieee80211_bss_conf *bss_conf;
  81. +
  82. + mwl_vif = mwl_dev_get_vif(vif);
  83. + bss_conf = &vif->bss_conf;
  84. /* wmm structure of start command is defined less one byte,
  85. * due to following field country is not used, add byte one
  86. @@ -664,7 +668,7 @@ static int mwl_fwcmd_set_ap_beacon(struc
  87. pcmd->cmd_hdr.macid = mwl_vif->macid;
  88. ether_addr_copy(pcmd->start_cmd.sta_mac_addr, mwl_vif->bssid);
  89. - memcpy(pcmd->start_cmd.ssid, bss_conf->ssid, bss_conf->ssid_len);
  90. + memcpy(pcmd->start_cmd.ssid, vif->cfg.ssid, vif->cfg.ssid_len);
  91. if (priv->chip_type == MWL8997)
  92. ether_addr_copy(pcmd->start_cmd.bssid, mwl_vif->bssid);
  93. pcmd->start_cmd.bss_type = 1;
  94. @@ -2090,7 +2094,7 @@ int mwl_fwcmd_set_beacon(struct ieee8021
  95. if (mwl_fwcmd_set_wsc_ie(hw, b_inf->ie_wsc_len, b_inf->ie_wsc_ptr))
  96. goto err;
  97. - if (mwl_fwcmd_set_ap_beacon(priv, mwl_vif, &vif->bss_conf))
  98. + if (mwl_fwcmd_set_ap_beacon(priv, vif))
  99. goto err;
  100. if (b_inf->cap_info & WLAN_CAPABILITY_SPECTRUM_MGMT)
  101. @@ -2152,38 +2156,38 @@ int mwl_fwcmd_set_new_stn_add(struct iee
  102. ether_addr_copy(pcmd->mac_addr, sta->addr);
  103. if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ)
  104. - rates = sta->supp_rates[NL80211_BAND_2GHZ];
  105. + rates = sta->deflink.supp_rates[NL80211_BAND_2GHZ];
  106. else
  107. - rates = sta->supp_rates[NL80211_BAND_5GHZ] << 5;
  108. + rates = sta->deflink.supp_rates[NL80211_BAND_5GHZ] << 5;
  109. pcmd->peer_info.legacy_rate_bitmap = cpu_to_le32(rates);
  110. - if (sta->ht_cap.ht_supported) {
  111. + if (sta->deflink.ht_cap.ht_supported) {
  112. int i;
  113. for (i = 0; i < 4; i++) {
  114. - if (i < sta->rx_nss) {
  115. + if (i < sta->deflink.rx_nss) {
  116. pcmd->peer_info.ht_rates[i] =
  117. - sta->ht_cap.mcs.rx_mask[i];
  118. + sta->deflink.ht_cap.mcs.rx_mask[i];
  119. } else {
  120. pcmd->peer_info.ht_rates[i] = 0;
  121. }
  122. }
  123. - pcmd->peer_info.ht_cap_info = cpu_to_le16(sta->ht_cap.cap);
  124. + pcmd->peer_info.ht_cap_info = cpu_to_le16(sta->deflink.ht_cap.cap);
  125. pcmd->peer_info.mac_ht_param_info =
  126. - (sta->ht_cap.ampdu_factor & 3) |
  127. - ((sta->ht_cap.ampdu_density & 7) << 2);
  128. + (sta->deflink.ht_cap.ampdu_factor & 3) |
  129. + ((sta->deflink.ht_cap.ampdu_density & 7) << 2);
  130. }
  131. - if (sta->vht_cap.vht_supported) {
  132. + if (sta->deflink.vht_cap.vht_supported) {
  133. u32 rx_mcs_map_mask = 0;
  134. - rx_mcs_map_mask = ((0x0000FFFF) >> (sta->rx_nss * 2))
  135. - << (sta->rx_nss * 2);
  136. + rx_mcs_map_mask = ((0x0000FFFF) >> (sta->deflink.rx_nss * 2))
  137. + << (sta->deflink.rx_nss * 2);
  138. pcmd->peer_info.vht_max_rx_mcs =
  139. cpu_to_le32((*((u32 *)
  140. - &sta->vht_cap.vht_mcs.rx_mcs_map)) | rx_mcs_map_mask);
  141. - pcmd->peer_info.vht_cap = cpu_to_le32(sta->vht_cap.cap);
  142. - pcmd->peer_info.vht_rx_channel_width = sta->bandwidth;
  143. + &sta->deflink.vht_cap.vht_mcs.rx_mcs_map)) | rx_mcs_map_mask);
  144. + pcmd->peer_info.vht_cap = cpu_to_le32(sta->deflink.vht_cap.cap);
  145. + pcmd->peer_info.vht_rx_channel_width = sta->deflink.bandwidth;
  146. }
  147. pcmd->is_qos_sta = sta->wme;
  148. @@ -2239,38 +2243,38 @@ int mwl_fwcmd_set_new_stn_add_sc4(struct
  149. ether_addr_copy(pcmd->mac_addr, sta->addr);
  150. if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ)
  151. - rates = sta->supp_rates[NL80211_BAND_2GHZ];
  152. + rates = sta->deflink.supp_rates[NL80211_BAND_2GHZ];
  153. else
  154. - rates = sta->supp_rates[NL80211_BAND_5GHZ] << 5;
  155. + rates = sta->deflink.supp_rates[NL80211_BAND_5GHZ] << 5;
  156. pcmd->peer_info.legacy_rate_bitmap = cpu_to_le32(rates);
  157. - if (sta->ht_cap.ht_supported) {
  158. + if (sta->deflink.ht_cap.ht_supported) {
  159. int i;
  160. for (i = 0; i < 4; i++) {
  161. - if (i < sta->rx_nss) {
  162. + if (i < sta->deflink.rx_nss) {
  163. pcmd->peer_info.ht_rates[i] =
  164. - sta->ht_cap.mcs.rx_mask[i];
  165. + sta->deflink.ht_cap.mcs.rx_mask[i];
  166. } else {
  167. pcmd->peer_info.ht_rates[i] = 0;
  168. }
  169. }
  170. - pcmd->peer_info.ht_cap_info = cpu_to_le16(sta->ht_cap.cap);
  171. + pcmd->peer_info.ht_cap_info = cpu_to_le16(sta->deflink.ht_cap.cap);
  172. pcmd->peer_info.mac_ht_param_info =
  173. - (sta->ht_cap.ampdu_factor & 3) |
  174. - ((sta->ht_cap.ampdu_density & 7) << 2);
  175. + (sta->deflink.ht_cap.ampdu_factor & 3) |
  176. + ((sta->deflink.ht_cap.ampdu_density & 7) << 2);
  177. }
  178. - if (sta->vht_cap.vht_supported) {
  179. + if (sta->deflink.vht_cap.vht_supported) {
  180. u32 rx_mcs_map_mask = 0;
  181. - rx_mcs_map_mask = ((0x0000FFFF) >> (sta->rx_nss * 2))
  182. - << (sta->rx_nss * 2);
  183. + rx_mcs_map_mask = ((0x0000FFFF) >> (sta->deflink.rx_nss * 2))
  184. + << (sta->deflink.rx_nss * 2);
  185. pcmd->peer_info.vht_max_rx_mcs =
  186. cpu_to_le32((*((u32 *)
  187. - &sta->vht_cap.vht_mcs.rx_mcs_map)) | rx_mcs_map_mask);
  188. - pcmd->peer_info.vht_cap = cpu_to_le32(sta->vht_cap.cap);
  189. - pcmd->peer_info.vht_rx_channel_width = sta->bandwidth;
  190. + &sta->deflink.vht_cap.vht_mcs.rx_mcs_map)) | rx_mcs_map_mask);
  191. + pcmd->peer_info.vht_cap = cpu_to_le32(sta->deflink.vht_cap.cap);
  192. + pcmd->peer_info.vht_rx_channel_width = sta->deflink.bandwidth;
  193. }
  194. pcmd->is_qos_sta = sta->wme;
  195. @@ -2787,9 +2791,9 @@ int mwl_fwcmd_create_ba(struct ieee80211
  196. pcmd->ba_info.create_params.flags = cpu_to_le32(ba_flags);
  197. pcmd->ba_info.create_params.queue_id = stream->idx;
  198. pcmd->ba_info.create_params.param_info =
  199. - (stream->sta->ht_cap.ampdu_factor &
  200. + (stream->sta->deflink.ht_cap.ampdu_factor &
  201. IEEE80211_HT_AMPDU_PARM_FACTOR) |
  202. - ((stream->sta->ht_cap.ampdu_density << 2) &
  203. + ((stream->sta->deflink.ht_cap.ampdu_density << 2) &
  204. IEEE80211_HT_AMPDU_PARM_DENSITY);
  205. if (direction == BA_FLAG_DIRECTION_UP) {
  206. pcmd->ba_info.create_params.reset_seq_no = 0;
  207. @@ -2799,9 +2803,9 @@ int mwl_fwcmd_create_ba(struct ieee80211
  208. pcmd->ba_info.create_params.current_seq = cpu_to_le16(0);
  209. }
  210. if (priv->chip_type == MWL8964 &&
  211. - stream->sta->vht_cap.vht_supported) {
  212. + stream->sta->deflink.vht_cap.vht_supported) {
  213. pcmd->ba_info.create_params.vht_rx_factor =
  214. - cpu_to_le32((stream->sta->vht_cap.cap &
  215. + cpu_to_le32((stream->sta->deflink.vht_cap.cap &
  216. IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK) >>
  217. IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT);
  218. }
  219. --- a/hif/pcie/8864/tx.c
  220. +++ b/hif/pcie/8864/tx.c
  221. @@ -743,7 +743,7 @@ void pcie_8864_tx_xmit(struct ieee80211_
  222. index = SYSADPT_TX_WMM_QUEUES - index - 1;
  223. txpriority = index;
  224. - if (sta && sta->ht_cap.ht_supported &&
  225. + if (sta && sta->deflink.ht_cap.ht_supported &&
  226. !(xmitcontrol & EAGLE_TXD_XMITCTRL_USE_MC_RATE) &&
  227. ieee80211_is_data_qos(wh->frame_control)) {
  228. tid = qos & 0xf;
  229. --- a/hif/pcie/8964/tx_ndp.c
  230. +++ b/hif/pcie/8964/tx_ndp.c
  231. @@ -607,7 +607,7 @@ void pcie_tx_xmit_ndp(struct ieee80211_h
  232. pcie_tx_encapsulate_frame(priv, skb, k_conf);
  233. } else {
  234. tid = qos & 0x7;
  235. - if (sta && sta->ht_cap.ht_supported && !eapol_frame &&
  236. + if (sta && sta->deflink.ht_cap.ht_supported && !eapol_frame &&
  237. qos != 0xFFFF) {
  238. pcie_tx_count_packet(sta, tid);
  239. spin_lock_bh(&priv->stream_lock);
  240. --- a/hif/pcie/8997/tx.c
  241. +++ b/hif/pcie/8997/tx.c
  242. @@ -81,7 +81,7 @@ static int pcie_txbd_ring_create(struct
  243. wiphy_info(priv->hw->wiphy,
  244. "TX ring: - base: %p, pbase: 0x%x, len: %d\n",
  245. pcie_priv->txbd_ring_vbase,
  246. - pcie_priv->txbd_ring_pbase,
  247. + (u32)pcie_priv->txbd_ring_pbase,
  248. pcie_priv->txbd_ring_size);
  249. for (num = 0; num < PCIE_MAX_TXRX_BD; num++) {
  250. @@ -694,7 +694,7 @@ void pcie_8997_tx_xmit(struct ieee80211_
  251. index = SYSADPT_TX_WMM_QUEUES - index - 1;
  252. txpriority = index;
  253. - if (sta && sta->ht_cap.ht_supported &&
  254. + if (sta && sta->deflink.ht_cap.ht_supported &&
  255. !(xmitcontrol & EAGLE_TXD_XMITCTRL_USE_MC_RATE) &&
  256. ieee80211_is_data_qos(wh->frame_control)) {
  257. tid = qos & 0xf;
  258. --- a/mac80211.c
  259. +++ b/mac80211.c
  260. @@ -368,15 +368,15 @@ static void mwl_mac80211_bss_info_change
  261. }
  262. }
  263. - if ((changed & BSS_CHANGED_ASSOC) && vif->bss_conf.assoc)
  264. + if ((changed & BSS_CHANGED_ASSOC) && vif->cfg.assoc)
  265. mwl_fwcmd_set_aid(hw, vif, (u8 *)vif->bss_conf.bssid,
  266. - vif->bss_conf.aid);
  267. + vif->cfg.aid);
  268. }
  269. static void mwl_mac80211_bss_info_changed_ap(struct ieee80211_hw *hw,
  270. struct ieee80211_vif *vif,
  271. struct ieee80211_bss_conf *info,
  272. - u32 changed)
  273. + u64 changed)
  274. {
  275. struct mwl_priv *priv = hw->priv;
  276. struct mwl_vif *mwl_vif;
  277. @@ -426,8 +426,8 @@ static void mwl_mac80211_bss_info_change
  278. if (changed & (BSS_CHANGED_BEACON_INT | BSS_CHANGED_BEACON)) {
  279. struct sk_buff *skb;
  280. - if ((info->ssid[0] != '\0') &&
  281. - (info->ssid_len != 0) &&
  282. + if ((vif->cfg.ssid[0] != '\0') &&
  283. + (vif->cfg.ssid_len != 0) &&
  284. (!info->hidden_ssid)) {
  285. if (mwl_vif->broadcast_ssid != true) {
  286. mwl_fwcmd_broadcast_ssid_enable(hw, vif, true);
  287. @@ -441,7 +441,7 @@ static void mwl_mac80211_bss_info_change
  288. }
  289. if (!mwl_vif->set_beacon) {
  290. - skb = ieee80211_beacon_get(hw, vif);
  291. + skb = ieee80211_beacon_get(hw, vif, 0);
  292. if (skb) {
  293. mwl_fwcmd_set_beacon(hw, vif, skb->data, skb->len);
  294. @@ -458,7 +458,7 @@ static void mwl_mac80211_bss_info_change
  295. static void mwl_mac80211_bss_info_changed(struct ieee80211_hw *hw,
  296. struct ieee80211_vif *vif,
  297. struct ieee80211_bss_conf *info,
  298. - u32 changed)
  299. + u64 changed)
  300. {
  301. switch (vif->type) {
  302. case NL80211_IFTYPE_AP:
  303. @@ -583,10 +583,10 @@ static int mwl_mac80211_sta_add(struct i
  304. if (vif->type == NL80211_IFTYPE_MESH_POINT)
  305. sta_info->is_mesh_node = true;
  306. - if (sta->ht_cap.ht_supported) {
  307. + if (sta->deflink.ht_cap.ht_supported) {
  308. sta_info->is_ampdu_allowed = true;
  309. sta_info->is_amsdu_allowed = false;
  310. - if (sta->ht_cap.cap & IEEE80211_HT_CAP_MAX_AMSDU) {
  311. + if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_MAX_AMSDU) {
  312. sta_info->amsdu_ctrl.cap = MWL_AMSDU_SIZE_8K;
  313. sta_info->amsdu_ctrl.amsdu_allow_size = SYSADPT_AMSDU_8K_MAX_SIZE;
  314. }
  315. @@ -670,7 +670,7 @@ static int mwl_mac80211_sta_remove(struc
  316. static int mwl_mac80211_conf_tx(struct ieee80211_hw *hw,
  317. struct ieee80211_vif *vif,
  318. - u16 queue,
  319. + unsigned int link_id, u16 queue,
  320. const struct ieee80211_tx_queue_params *params)
  321. {
  322. struct mwl_priv *priv = hw->priv;
  323. @@ -934,4 +934,5 @@ const struct ieee80211_ops mwl_mac80211_
  324. .pre_channel_switch = mwl_mac80211_chnl_switch,
  325. .sw_scan_start = mwl_mac80211_sw_scan_start,
  326. .sw_scan_complete = mwl_mac80211_sw_scan_complete,
  327. + .wake_tx_queue = ieee80211_handle_wake_tx_queue,
  328. };
  329. --- a/utils.c
  330. +++ b/utils.c
  331. @@ -173,9 +173,9 @@ u32 utils_get_init_tx_rate(struct mwl_pr
  332. u32 tx_rate;
  333. u16 format, nss, bw, rate_mcs;
  334. - if (sta->vht_cap.vht_supported)
  335. + if (sta->deflink.vht_cap.vht_supported)
  336. format = TX_RATE_FORMAT_11AC;
  337. - else if (sta->ht_cap.ht_supported)
  338. + else if (sta->deflink.ht_cap.ht_supported)
  339. format = TX_RATE_FORMAT_11N;
  340. else
  341. format = TX_RATE_FORMAT_LEGACY;
  342. @@ -192,11 +192,11 @@ u32 utils_get_init_tx_rate(struct mwl_pr
  343. nss = 3;
  344. break;
  345. default:
  346. - nss = sta->rx_nss;
  347. + nss = sta->deflink.rx_nss;
  348. break;
  349. }
  350. - if (nss > sta->rx_nss)
  351. - nss = sta->rx_nss;
  352. + if (nss > sta->deflink.rx_nss)
  353. + nss = sta->deflink.rx_nss;
  354. switch (conf->chandef.width) {
  355. case NL80211_CHAN_WIDTH_20_NOHT:
  356. @@ -213,11 +213,11 @@ u32 utils_get_init_tx_rate(struct mwl_pr
  357. bw = TX_RATE_BANDWIDTH_160;
  358. break;
  359. default:
  360. - bw = sta->bandwidth;
  361. + bw = sta->deflink.bandwidth;
  362. break;
  363. }
  364. - if (bw > sta->bandwidth)
  365. - bw = sta->bandwidth;
  366. + if (bw > sta->deflink.bandwidth)
  367. + bw = sta->deflink.bandwidth;
  368. switch (format) {
  369. case TX_RATE_FORMAT_LEGACY: