reorganize madwifi patches slightly
[openwrt.git] / package / madwifi / patches / 368-sta_ie_preserve.patch
1 --- a/net80211/ieee80211_scan_sta.c
2 +++ b/net80211/ieee80211_scan_sta.c
3 @@ -201,8 +201,10 @@ sta_flush_table(struct sta_table *st)
4 }
5
6 static void
7 -saveie(u_int8_t **iep, const u_int8_t *ie)
8 +saveie(u_int8_t **iep, const u_int8_t *ie, int preserve)
9 {
10 + if (preserve && *iep)
11 + return;
12 if (ie == NULL)
13 *iep = NULL;
14 else
15 @@ -304,10 +306,10 @@ found:
16 (const struct ieee80211_tim_ie *) sp->tim;
17 ise->se_dtimperiod = tim->tim_period;
18 }
19 - saveie(&ise->se_wme_ie, sp->wme);
20 - saveie(&ise->se_wpa_ie, sp->wpa);
21 - saveie(&ise->se_rsn_ie, sp->rsn);
22 - saveie(&ise->se_ath_ie, sp->ath);
23 + saveie(&ise->se_wme_ie, sp->wme, 0);
24 + saveie(&ise->se_wpa_ie, sp->wpa, !sp->isprobe);
25 + saveie(&ise->se_rsn_ie, sp->rsn, !sp->isprobe);
26 + saveie(&ise->se_ath_ie, sp->ath, 0);
27
28 /* clear failure count after STA_FAIL_AGE passes */
29 if (se->se_fails && (jiffies - se->se_lastfail) > STA_FAILS_AGE*HZ) {
30 --- a/net80211/ieee80211_input.c
31 +++ b/net80211/ieee80211_input.c
32 @@ -3106,6 +3106,7 @@ ieee80211_recv_mgmt(struct ieee80211vap
33 */
34 IEEE80211_VERIFY_LENGTH(efrm - frm, 12);
35 memset(&scan, 0, sizeof(scan));
36 + scan.isprobe = (subtype == IEEE80211_FC0_SUBTYPE_PROBE_RESP) && IEEE80211_ADDR_EQ(wh->i_addr2, vap->iv_myaddr);
37 scan.tstamp = frm;
38 frm += 8;
39 scan.bintval = le16toh(*(__le16 *)frm);
40 --- a/net80211/ieee80211_scan.h
41 +++ b/net80211/ieee80211_scan.h
42 @@ -133,6 +133,7 @@ struct ieee80211_scanparams {
43 u_int8_t erp;
44 u_int16_t bintval;
45 u_int8_t timoff;
46 + u_int8_t isprobe;
47 u_int8_t *tim;
48 u_int8_t *tstamp;
49 u_int8_t *country;
This page took 0.049077 seconds and 5 git commands to generate.