Advertisement
Guest User

Untitled

a guest
Aug 18th, 2021
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
  2. index c272b290fa73..e85c3f107d2e 100644
  3. --- a/drivers/net/wireless/ath/ath10k/mac.c
  4. +++ b/drivers/net/wireless/ath/ath10k/mac.c
  5. @@ -5576,15 +5576,17 @@ static int ath10k_add_interface(struct ieee80211_hw *hw,
  6. if (vif->type == NL80211_IFTYPE_ADHOC ||
  7. vif->type == NL80211_IFTYPE_MESH_POINT ||
  8. vif->type == NL80211_IFTYPE_AP) {
  9. - arvif->beacon_buf = dma_alloc_coherent(ar->dev,
  10. - IEEE80211_MAX_FRAME_LEN,
  11. - &arvif->beacon_paddr,
  12. - GFP_ATOMIC);
  13. - if (!arvif->beacon_buf) {
  14. - ret = -ENOMEM;
  15. - ath10k_warn(ar, "failed to allocate beacon buffer: %d\n",
  16. - ret);
  17. - goto err;
  18. + if (!(ar->hif.bus == ATH10K_BUS_SDIO) && !(ar->hif.bus == ATH10K_BUS_USB)) {
  19. + arvif->beacon_buf = dma_alloc_coherent(ar->dev,
  20. + IEEE80211_MAX_FRAME_LEN,
  21. + &arvif->beacon_paddr,
  22. + GFP_ATOMIC);
  23. + if (!arvif->beacon_buf) {
  24. + ret = -ENOMEM;
  25. + ath10k_warn(ar, "failed to allocate beacon buffer: %d\n",
  26. + ret);
  27. + goto err;
  28. + }
  29. }
  30. }
  31. if (test_bit(ATH10K_FLAG_HW_CRYPTO_DISABLED, &ar->dev_flags))
  32. --
  33. 2.25.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement