]> git.karo-electronics.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 17 Aug 2011 17:55:53 +0000 (10:55 -0700)
commita4e0b4cc115c938f75ca7cf24b0a739da846a6c7
treecf2ee70c8f3cb929f2dd8aa47aecbfb682b4afd5
parentcbdeede6a6725dcc13f1a1dc1fc1d1ebe238c7fd
ath5k: fix error handling in ath5k_beacon_send

commit bdc71bc59231f5542af13b5061b9ab124d093050 upstream.

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.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/ath/ath5k/base.c