005-mac80211_update.patch 14 KB

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