Apply patch from Stanislaw Gruszka to fix mac80211 issue (rhbz 862168)

This commit is contained in:
Josh Boyer 2012-10-18 08:33:53 -04:00
parent 05a71e9f31
commit df409ec92f
2 changed files with 73 additions and 0 deletions

View File

@ -750,6 +750,9 @@ Patch22070: net-tcp-bz857324.patch
#rhbz 770484
Patch22071: iwlwifi-fix-6000-ch-switch.patch
#rhbz 862168
Patch22073: mac80211_local_deauth_v3.6.patch
Patch22072: linux-3.6-arm-build-fixup.patch
# END OF PATCH DEFINITIONS
@ -1452,6 +1455,9 @@ ApplyPatch net-tcp-bz857324.patch
#rhbz 770484
ApplyPatch iwlwifi-fix-6000-ch-switch.patch
#rhbz 862168
ApplyPatch mac80211_local_deauth_v3.6.patch
# END OF PATCH APPLICATIONS
%endif
@ -2316,6 +2322,7 @@ fi
# '-'
%changelog
* Thu Oct 18 2012 Josh Boyer <jwboyer@redhat.com>
- Apply patch from Stanislaw Gruszka to fix mac80211 issue (rhbz 862168)
- Apply patch to fix iwlwifi crash (rhbz 770484)
* Wed Oct 17 2012 Josh Boyer <jwboyer@redhat.com>

View File

@ -0,0 +1,66 @@
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 3d254e1..f10553c 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1217,6 +1217,7 @@ struct cfg80211_deauth_request {
const u8 *ie;
size_t ie_len;
u16 reason_code;
+ bool local_state_change;
};
/**
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index f76b833..08343c2 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -3457,6 +3457,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
{
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
u8 frame_buf[DEAUTH_DISASSOC_LEN];
+ bool tx = !req->local_state_change;
mutex_lock(&ifmgd->mtx);
@@ -3473,12 +3474,11 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
if (ifmgd->associated &&
ether_addr_equal(ifmgd->associated->bssid, req->bssid))
ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH,
- req->reason_code, true, frame_buf);
+ req->reason_code, tx, frame_buf);
else
ieee80211_send_deauth_disassoc(sdata, req->bssid,
IEEE80211_STYPE_DEAUTH,
- req->reason_code, true,
- frame_buf);
+ req->reason_code, tx, frame_buf);
mutex_unlock(&ifmgd->mtx);
__cfg80211_send_deauth(sdata->dev, frame_buf, DEAUTH_DISASSOC_LEN);
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index 1cdb1d5..0877efb 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -457,21 +457,11 @@ int __cfg80211_mlme_deauth(struct cfg80211_registered_device *rdev,
.reason_code = reason,
.ie = ie,
.ie_len = ie_len,
+ .local_state_change = local_state_change,
};
ASSERT_WDEV_LOCK(wdev);
- if (local_state_change) {
- if (wdev->current_bss &&
- ether_addr_equal(wdev->current_bss->pub.bssid, bssid)) {
- cfg80211_unhold_bss(wdev->current_bss);
- cfg80211_put_bss(&wdev->current_bss->pub);
- wdev->current_bss = NULL;
- }
-
- return 0;
- }
-
return rdev->ops->deauth(&rdev->wiphy, dev, &req);
}