staging: wfx: simplify handling of IEEE80211_TX_CTL_SEND_AFTER_DTIM
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Wed, 15 Jan 2020 13:55:25 +0000 (13:55 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Jan 2020 19:59:52 +0000 (20:59 +0100)
commita3c529a835890b0eecd324d9f0c37c67345f84e2
tree6fe2feabcbb779233a3c2314d8d73abd781d3145
parent22c03264e5a914966c93baa367d63eb77f60ebaf
staging: wfx: simplify handling of IEEE80211_TX_CTL_SEND_AFTER_DTIM

When mac80211 ask for a frame to be sent after a DTIM, driver should:
  1. Update TIM with multicast bit set (using update_ie). This function
     can be called whenever.
  2. Keep buffered all frames marked "after dtim"
  3. When it receive a suspend_resume indication (see
     wfx_suspend_resume_mc()), send all the buffered frames. This
     indication is sent by the firmware 4ms before the dtim.
  4. If one of the frames returns status "REQUEUE", it means that the
     DTIM period was ended before to be able to send the frame.
  5. When all the buffered frames were sent or if DTIM period was ended,
     driver should update the TIM with multicast bit reset.

All the mess with the asynchronous works can be dropped.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-58-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/data_tx.c
drivers/staging/wfx/hif_api_cmd.h
drivers/staging/wfx/queue.c
drivers/staging/wfx/queue.h
drivers/staging/wfx/sta.c
drivers/staging/wfx/wfx.h