306-mac80211-set-up-the-fwd_skb-dev-for-mesh-forwarding.patch 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. From: Xing Song <[email protected]>
  2. Date: Tue, 23 Nov 2021 11:31:23 +0800
  3. Subject: [PATCH] mac80211: set up the fwd_skb->dev for mesh forwarding
  4. Mesh forwarding requires that the fwd_skb->dev is set up for TX handling,
  5. otherwise the following warning will be generated, so set it up for the
  6. pending frames.
  7. [ 72.835674 ] WARNING: CPU: 0 PID: 1193 at __skb_flow_dissect+0x284/0x1298
  8. [ 72.842379 ] Modules linked in: ksmbd pppoe ppp_async l2tp_ppp ...
  9. [ 72.962020 ] CPU: 0 PID: 1193 Comm: kworker/u5:1 Tainted: P S 5.4.137 #0
  10. [ 72.969938 ] Hardware name: MT7622_MT7531 RFB (DT)
  11. [ 72.974659 ] Workqueue: napi_workq napi_workfn
  12. [ 72.979025 ] pstate: 60000005 (nZCv daif -PAN -UAO)
  13. [ 72.983822 ] pc : __skb_flow_dissect+0x284/0x1298
  14. [ 72.988444 ] lr : __skb_flow_dissect+0x54/0x1298
  15. [ 72.992977 ] sp : ffffffc010c738c0
  16. [ 72.996293 ] x29: ffffffc010c738c0 x28: 0000000000000000
  17. [ 73.001615 ] x27: 000000000000ffc2 x26: ffffff800c2eb818
  18. [ 73.006937 ] x25: ffffffc010a987c8 x24: 00000000000000ce
  19. [ 73.012259 ] x23: ffffffc010c73a28 x22: ffffffc010a99c60
  20. [ 73.017581 ] x21: 000000000000ffc2 x20: ffffff80094da800
  21. [ 73.022903 ] x19: 0000000000000000 x18: 0000000000000014
  22. [ 73.028226 ] x17: 00000000084d16af x16: 00000000d1fc0bab
  23. [ 73.033548 ] x15: 00000000715f6034 x14: 000000009dbdd301
  24. [ 73.038870 ] x13: 00000000ea4dcbc3 x12: 0000000000000040
  25. [ 73.044192 ] x11: 000000000eb00ff0 x10: 0000000000000000
  26. [ 73.049513 ] x9 : 000000000eb00073 x8 : 0000000000000088
  27. [ 73.054834 ] x7 : 0000000000000000 x6 : 0000000000000001
  28. [ 73.060155 ] x5 : 0000000000000000 x4 : 0000000000000000
  29. [ 73.065476 ] x3 : ffffffc010a98000 x2 : 0000000000000000
  30. [ 73.070797 ] x1 : 0000000000000000 x0 : 0000000000000000
  31. [ 73.076120 ] Call trace:
  32. [ 73.078572 ] __skb_flow_dissect+0x284/0x1298
  33. [ 73.082846 ] __skb_get_hash+0x7c/0x228
  34. [ 73.086629 ] ieee80211_txq_may_transmit+0x7fc/0x17b8 [mac80211]
  35. [ 73.092564 ] ieee80211_tx_prepare_skb+0x20c/0x268 [mac80211]
  36. [ 73.098238 ] ieee80211_tx_pending+0x144/0x330 [mac80211]
  37. [ 73.103560 ] tasklet_action_common.isra.16+0xb4/0x158
  38. [ 73.108618 ] tasklet_action+0x2c/0x38
  39. [ 73.112286 ] __do_softirq+0x168/0x3b0
  40. [ 73.115954 ] do_softirq.part.15+0x88/0x98
  41. [ 73.119969 ] __local_bh_enable_ip+0xb0/0xb8
  42. [ 73.124156 ] napi_workfn+0x58/0x90
  43. [ 73.127565 ] process_one_work+0x20c/0x478
  44. [ 73.131579 ] worker_thread+0x50/0x4f0
  45. [ 73.135249 ] kthread+0x124/0x128
  46. [ 73.138484 ] ret_from_fork+0x10/0x1c
  47. Signed-off-by: Xing Song <[email protected]>
  48. ---
  49. --- a/net/mac80211/rx.c
  50. +++ b/net/mac80211/rx.c
  51. @@ -2947,6 +2947,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
  52. if (!fwd_skb)
  53. goto out;
  54. + fwd_skb->dev = sdata->dev;
  55. fwd_hdr = (struct ieee80211_hdr *) fwd_skb->data;
  56. fwd_hdr->frame_control &= ~cpu_to_le16(IEEE80211_FCTL_RETRY);
  57. info = IEEE80211_SKB_CB(fwd_skb);