• Helmut Schaa's avatar
    rt2x00: rt2800pci: fix tx path by not accessing the skb after it was DMA mapped · 745b1ae3
    Helmut Schaa authored
    rt2800pci used the callback write_tx_desc to write the tx descriptor but
    also to update the txwi which is part of the dma mapped skb. Since the
    memory was already DMA mapped _before_ the call to write_tx_desc the
    device didn't get the txwi data at all or only sporadically.
    
    The call order is basically as follows (from rt2x00queue.c):
    1) write_tx_data
    2) rt2x00queue_map_txskb
    3) write_tx_desc
    
    Hence, we shouldn't touch the skb in write_tx_desc anymore.
    
    To fix this issue create a new rt2800pci_write_tx_data callback and use it
    for updating the txwi _before_ the memory gets DMA mapped.
    
    The tx descriptor is still written (as before) in write_tx_desc.
    
    This patch allows basic TX on an rt305x soc device but I'm pretty sure
    that it will fix pci based cards as well. I can associate just fine with
    an AP now but I wasn't able to get a wpa secured connection working yet.
    Signed-off-by: default avatarHelmut Schaa <helmut.schaa@googlemail.com>
    Acked-by: default avatarGertjan van Wingerde <gwingerde@gmail.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    745b1ae3
rt2800pci.c 38.7 KB