staging: brcm80211: bugfix for control.sta NULL ptr dereference

Mac80211 can transmit packets where the control.sta field is NULL.
The driver dereferenced this. Bugfix was to only dereference a non NULL
ieee80211_sta pointer.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Roland Vossen 2011-03-10 11:35:07 +01:00 committed by Greg Kroah-Hartman
parent 0bf97bb1cf
commit 8ada0be340
1 changed files with 2 additions and 1 deletions

View File

@ -6613,7 +6613,8 @@ wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2)
tx_info = IEEE80211_SKB_CB(p);
h = (struct ieee80211_hdr *)((u8 *) (txh + 1) + D11_PHY_HDR_LEN);
scb = (struct scb *)tx_info->control.sta->drv_priv;
if (tx_info->control.sta)
scb = (struct scb *)tx_info->control.sta->drv_priv;
if (N_ENAB(wlc->pub)) {
u8 *plcp = (u8 *) (txh + 1);