tree: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git pending head: 9bf2356413bc7e5f5bece0ee6bf8d7320a864ecb commit: b824faffc7053cf76ecf0b14cf87d15907a69521 [8/30] ath10k: add extended per sta tx statistics support config: arm64-defconfig (attached as .config) compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout b824faffc7053cf76ecf0b14cf87d15907a69521 # save the attached .config to linux build tree GCC_VERSION=7.2.0 make.cross ARCH=arm64
All errors (new ones prefixed by >>):
drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_sta_state':
>> drivers/net/wireless/ath/ath10k/mac.c:6335:9: error: 'struct ath10k' has no
>> member named 'debug'
if (ar->debug.enable_extd_tx_stats)
^~
--
drivers/net/wireless/ath/ath10k/htt_rx.c: In function
'ath10k_update_per_peer_tx_stats':
>> drivers/net/wireless/ath/ath10k/htt_rx.c:2666:8: error: 'struct ath10k' has
>> no member named 'debug'
if (ar->debug.enable_extd_tx_stats)
^~
vim +6335 drivers/net/wireless/ath/ath10k/mac.c
6200
6201 static int ath10k_sta_state(struct ieee80211_hw *hw,
6202 struct ieee80211_vif *vif,
6203 struct ieee80211_sta *sta,
6204 enum ieee80211_sta_state old_state,
6205 enum ieee80211_sta_state new_state)
6206 {
6207 struct ath10k *ar = hw->priv;
6208 struct ath10k_vif *arvif = (void *)vif->drv_priv;
6209 struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
6210 struct ath10k_peer *peer;
6211 int ret = 0;
6212 int i;
6213
6214 if (old_state == IEEE80211_STA_NOTEXIST &&
6215 new_state == IEEE80211_STA_NONE) {
6216 memset(arsta, 0, sizeof(*arsta));
6217 arsta->arvif = arvif;
6218 INIT_WORK(&arsta->update_wk, ath10k_sta_rc_update_wk);
6219
6220 for (i = 0; i < ARRAY_SIZE(sta->txq); i++)
6221 ath10k_mac_txq_init(sta->txq[i]);
6222 }
6223
6224 /* cancel must be done outside the mutex to avoid deadlock */
6225 if ((old_state == IEEE80211_STA_NONE &&
6226 new_state == IEEE80211_STA_NOTEXIST))
6227 cancel_work_sync(&arsta->update_wk);
6228
6229 mutex_lock(&ar->conf_mutex);
6230
6231 if (old_state == IEEE80211_STA_NOTEXIST &&
6232 new_state == IEEE80211_STA_NONE) {
6233 /*
6234 * New station addition.
6235 */
6236 enum wmi_peer_type peer_type = WMI_PEER_TYPE_DEFAULT;
6237 u32 num_tdls_stations;
6238 u32 num_tdls_vifs;
6239
6240 ath10k_dbg(ar, ATH10K_DBG_MAC,
6241 "mac vdev %d peer create %pM (new sta) sta
%d / %d peer %d / %d\n",
6242 arvif->vdev_id, sta->addr,
6243 ar->num_stations + 1, ar->max_num_stations,
6244 ar->num_peers + 1, ar->max_num_peers);
6245
6246 arsta->tx_stats = kzalloc(sizeof(*arsta->tx_stats),
GFP_KERNEL);
6247 if (!arsta->tx_stats)
6248 goto exit;
6249
6250 num_tdls_stations =
ath10k_mac_tdls_vif_stations_count(hw, vif);
6251 num_tdls_vifs = ath10k_mac_tdls_vifs_count(hw);
6252
6253 if (sta->tdls) {
6254 if (num_tdls_stations >=
ar->max_num_tdls_vdevs) {
6255 ath10k_warn(ar, "vdev %i exceeded
maximum number of tdls vdevs %i\n",
6256 arvif->vdev_id,
6257 ar->max_num_tdls_vdevs);
6258 ret = -ELNRNG;
6259 goto exit;
6260 }
6261 peer_type = WMI_PEER_TYPE_TDLS;
6262 }
6263
6264 ret = ath10k_mac_inc_num_stations(arvif, sta);
6265 if (ret) {
6266 ath10k_warn(ar, "refusing to associate station:
too many connected already (%d)\n",
6267 ar->max_num_stations);
6268 goto exit;
6269 }
6270
6271 ret = ath10k_peer_create(ar, vif, sta, arvif->vdev_id,
6272 sta->addr, peer_type);
6273 if (ret) {
6274 ath10k_warn(ar, "failed to add peer %pM for
vdev %d when adding a new sta: %i\n",
6275 sta->addr, arvif->vdev_id, ret);
6276 ath10k_mac_dec_num_stations(arvif, sta);
6277 goto exit;
6278 }
6279
6280 spin_lock_bh(&ar->data_lock);
6281
6282 peer = ath10k_peer_find(ar, arvif->vdev_id, sta->addr);
6283 if (!peer) {
6284 ath10k_warn(ar, "failed to lookup peer %pM on
vdev %i\n",
6285 vif->addr, arvif->vdev_id);
6286 spin_unlock_bh(&ar->data_lock);
6287 ath10k_peer_delete(ar, arvif->vdev_id,
sta->addr);
6288 ath10k_mac_dec_num_stations(arvif, sta);
6289 ret = -ENOENT;
6290 goto exit;
6291 }
6292
6293 arsta->peer_id = find_first_bit(peer->peer_ids,
6294
ATH10K_MAX_NUM_PEER_IDS);
6295
6296 spin_unlock_bh(&ar->data_lock);
6297
6298 if (!sta->tdls)
6299 goto exit;
6300
6301 ret = ath10k_wmi_update_fw_tdls_state(ar,
arvif->vdev_id,
6302
WMI_TDLS_ENABLE_ACTIVE);
6303 if (ret) {
6304 ath10k_warn(ar, "failed to update fw tdls state
on vdev %i: %i\n",
6305 arvif->vdev_id, ret);
6306 ath10k_peer_delete(ar, arvif->vdev_id,
6307 sta->addr);
6308 ath10k_mac_dec_num_stations(arvif, sta);
6309 goto exit;
6310 }
6311
6312 ret = ath10k_mac_tdls_peer_update(ar, arvif->vdev_id,
sta,
6313
WMI_TDLS_PEER_STATE_PEERING);
6314 if (ret) {
6315 ath10k_warn(ar,
6316 "failed to update tdls peer %pM for
vdev %d when adding a new sta: %i\n",
6317 sta->addr, arvif->vdev_id, ret);
6318 ath10k_peer_delete(ar, arvif->vdev_id,
sta->addr);
6319 ath10k_mac_dec_num_stations(arvif, sta);
6320
6321 if (num_tdls_stations != 0)
6322 goto exit;
6323 ath10k_wmi_update_fw_tdls_state(ar,
arvif->vdev_id,
6324
WMI_TDLS_DISABLE);
6325 }
6326 } else if ((old_state == IEEE80211_STA_NONE &&
6327 new_state == IEEE80211_STA_NOTEXIST)) {
6328 /*
6329 * Existing station deletion.
6330 */
6331 ath10k_dbg(ar, ATH10K_DBG_MAC,
6332 "mac vdev %d peer delete %pM sta %pK (sta
gone)\n",
6333 arvif->vdev_id, sta->addr, sta);
6334
> 6335 if (ar->debug.enable_extd_tx_stats)
6336 kfree(arsta->tx_stats);
6337
6338 if (sta->tdls) {
6339 ret = ath10k_mac_tdls_peer_update(ar,
arvif->vdev_id,
6340 sta,
6341
WMI_TDLS_PEER_STATE_TEARDOWN);
6342 if (ret)
6343 ath10k_warn(ar, "failed to update tdls
peer state for %pM state %d: %i\n",
6344 sta->addr,
6345
WMI_TDLS_PEER_STATE_TEARDOWN, ret);
6346 }
6347
6348 ret = ath10k_peer_delete(ar, arvif->vdev_id, sta->addr);
6349 if (ret)
6350 ath10k_warn(ar, "failed to delete peer %pM for
vdev %d: %i\n",
6351 sta->addr, arvif->vdev_id, ret);
6352
6353 ath10k_mac_dec_num_stations(arvif, sta);
6354
6355 spin_lock_bh(&ar->data_lock);
6356 for (i = 0; i < ARRAY_SIZE(ar->peer_map); i++) {
6357 peer = ar->peer_map[i];
6358 if (!peer)
6359 continue;
6360
6361 if (peer->sta == sta) {
6362 ath10k_warn(ar, "found sta peer %pM
(ptr %pK id %d) entry on vdev %i after it was supposedly removed\n",
6363 sta->addr, peer, i,
arvif->vdev_id);
6364 peer->sta = NULL;
6365
6366 /* Clean up the peer object as well
since we
6367 * must have failed to do this above.
6368 */
6369 list_del(&peer->list);
6370 ar->peer_map[i] = NULL;
6371 kfree(peer);
6372 ar->num_peers--;
6373 }
6374 }
6375 spin_unlock_bh(&ar->data_lock);
6376
6377 for (i = 0; i < ARRAY_SIZE(sta->txq); i++)
6378 ath10k_mac_txq_unref(ar, sta->txq[i]);
6379
6380 if (!sta->tdls)
6381 goto exit;
6382
6383 if (ath10k_mac_tdls_vif_stations_count(hw, vif))
6384 goto exit;
6385
6386 /* This was the last tdls peer in current vif */
6387 ret = ath10k_wmi_update_fw_tdls_state(ar,
arvif->vdev_id,
6388 WMI_TDLS_DISABLE);
6389 if (ret) {
6390 ath10k_warn(ar, "failed to update fw tdls state
on vdev %i: %i\n",
6391 arvif->vdev_id, ret);
6392 }
6393 } else if (old_state == IEEE80211_STA_AUTH &&
6394 new_state == IEEE80211_STA_ASSOC &&
6395 (vif->type == NL80211_IFTYPE_AP ||
6396 vif->type == NL80211_IFTYPE_MESH_POINT ||
6397 vif->type == NL80211_IFTYPE_ADHOC)) {
6398 /*
6399 * New association.
6400 */
6401 ath10k_dbg(ar, ATH10K_DBG_MAC, "mac sta %pM
associated\n",
6402 sta->addr);
6403
6404 ret = ath10k_station_assoc(ar, vif, sta, false);
6405 if (ret)
6406 ath10k_warn(ar, "failed to associate station
%pM for vdev %i: %i\n",
6407 sta->addr, arvif->vdev_id, ret);
6408 } else if (old_state == IEEE80211_STA_ASSOC &&
6409 new_state == IEEE80211_STA_AUTHORIZED &&
6410 sta->tdls) {
6411 /*
6412 * Tdls station authorized.
6413 */
6414 ath10k_dbg(ar, ATH10K_DBG_MAC, "mac tdls sta %pM
authorized\n",
6415 sta->addr);
6416
6417 ret = ath10k_station_assoc(ar, vif, sta, false);
6418 if (ret) {
6419 ath10k_warn(ar, "failed to associate tdls
station %pM for vdev %i: %i\n",
6420 sta->addr, arvif->vdev_id, ret);
6421 goto exit;
6422 }
6423
6424 ret = ath10k_mac_tdls_peer_update(ar, arvif->vdev_id,
sta,
6425
WMI_TDLS_PEER_STATE_CONNECTED);
6426 if (ret)
6427 ath10k_warn(ar, "failed to update tdls peer %pM
for vdev %i: %i\n",
6428 sta->addr, arvif->vdev_id, ret);
6429 } else if (old_state == IEEE80211_STA_ASSOC &&
6430 new_state == IEEE80211_STA_AUTH &&
6431 (vif->type == NL80211_IFTYPE_AP ||
6432 vif->type == NL80211_IFTYPE_MESH_POINT ||
6433 vif->type == NL80211_IFTYPE_ADHOC)) {
6434 /*
6435 * Disassociation.
6436 */
6437 ath10k_dbg(ar, ATH10K_DBG_MAC, "mac sta %pM
disassociated\n",
6438 sta->addr);
6439
6440 ret = ath10k_station_disassoc(ar, vif, sta);
6441 if (ret)
6442 ath10k_warn(ar, "failed to disassociate
station: %pM vdev %i: %i\n",
6443 sta->addr, arvif->vdev_id, ret);
6444 }
6445 exit:
6446 mutex_unlock(&ar->conf_mutex);
6447 return ret;
6448 }
6449
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
.config.gz
Description: application/gzip
_______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
