update madwifi to latest trunk, include a few more fixes/improvements
[openwrt/svn-archive/archive.git] / package / madwifi / patches / 320-no_kzalloc.patch
1 Index: madwifi-dfs-r3280/ath/if_ath.c
2 ===================================================================
3 --- madwifi-dfs-r3280.orig/ath/if_ath.c 2008-01-28 17:18:52.497966105 +0100
4 +++ madwifi-dfs-r3280/ath/if_ath.c 2008-01-28 17:19:06.982791546 +0100
5 @@ -526,7 +526,8 @@
6
7 /* Allocate space for dynamically determined maximum VAP count */
8 sc->sc_bslot =
9 - kzalloc(ath_maxvaps * sizeof(struct ieee80211vap), GFP_KERNEL);
10 + kmalloc(ath_maxvaps * sizeof(struct ieee80211vap), GFP_KERNEL);
11 + memset(sc->sc_bslot, 0, ath_maxvaps * sizeof(struct ieee80211vap));
12
13 /*
14 * Cache line size is used to size and align various
15 Index: madwifi-dfs-r3280/ath/if_ath_radar.c
16 ===================================================================
17 --- madwifi-dfs-r3280.orig/ath/if_ath_radar.c 2008-01-28 17:14:16.411947654 +0100
18 +++ madwifi-dfs-r3280/ath/if_ath_radar.c 2008-01-28 17:19:07.290809101 +0100
19 @@ -1539,9 +1539,11 @@
20
21 ath_rp_clear(sc);
22
23 - sc->sc_rp = (struct ath_rp *)kzalloc(
24 - sizeof(struct ath_rp) *
25 + sc->sc_rp = (struct ath_rp *)kmalloc(
26 + sizeof(struct ath_rp) *
27 ATH_RADAR_PULSE_NR, GFP_KERNEL);
28 + memset(sc->sc_rp, 0, sizeof(struct ath_rp) *
29 + ATH_RADAR_PULSE_NR);
30
31 if (sc->sc_rp == NULL)
32 return;