]> git.baikalelectronics.ru Git - kernel.git/commit
ath5k: fix error handling in ath5k_beacon_send
authorBob Copeland <me@bobcopeland.com>
Sun, 7 Aug 2011 23:36:07 +0000 (19:36 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 9 Aug 2011 20:11:33 +0000 (16:11 -0400)
commitd9646fcc6781c0170f27b4f99cc7a3bf1d8cfd4b
treef67004e74a4a566c27ee5eb801a4c86b3f58ab1b
parent019d308e4f16861e41179a5363b5fee4e87aa553
ath5k: fix error handling in ath5k_beacon_send

This cleans up error handling for the beacon in case of dma mapping
failure.  We need to free the skb when dma mapping fails instead of
nulling and leaking the pointer, and we should bail out to avoid
giving the hardware the bad descriptor.

Finally, we need to perform the null check after trying to update
the beacon, or else beacons will never be sent after a single
mapping failure.

Cc: stable@kernel.org
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/base.c