summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2008-10-20 03:11:20 +0000
committerPeter Volkov <pva@gentoo.org>2008-10-20 03:11:20 +0000
commitc9957c368cab61145c409c0a0a7d3d153d036bae (patch)
treeca69acff254dcbd55c188ada758d64cb0bccd1ea /net-wireless/madwifi-ng
parentMake USE='-openmp' work. Bug #234841. (diff)
downloadgentoo-2-c9957c368cab61145c409c0a0a7d3d153d036bae.tar.gz
gentoo-2-c9957c368cab61145c409c0a0a7d3d153d036bae.tar.bz2
gentoo-2-c9957c368cab61145c409c0a0a7d3d153d036bae.zip
Added patch to make it buildable with 2.6.27 kernel.
(Portage version: 2.2_rc12/cvs/Linux 2.6.26-openvz.git-777e816 i686)
Diffstat (limited to 'net-wireless/madwifi-ng')
-rw-r--r--net-wireless/madwifi-ng/ChangeLog6
-rw-r--r--net-wireless/madwifi-ng/files/madwifi-ng-0.9.4-2.6.27-r3811.patch161
-rw-r--r--net-wireless/madwifi-ng/madwifi-ng-0.9.4-r1.ebuild11
3 files changed, 172 insertions, 6 deletions
diff --git a/net-wireless/madwifi-ng/ChangeLog b/net-wireless/madwifi-ng/ChangeLog
index 545047e4ae08..a3fdca43518a 100644
--- a/net-wireless/madwifi-ng/ChangeLog
+++ b/net-wireless/madwifi-ng/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-wireless/madwifi-ng
# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/madwifi-ng/ChangeLog,v 1.60 2008/10/14 06:01:11 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/madwifi-ng/ChangeLog,v 1.61 2008/10/20 03:11:19 pva Exp $
+
+ 20 Oct 2008; Peter Volkov <pva@gentoo.org>
+ +files/madwifi-ng-0.9.4-2.6.27-r3811.patch, madwifi-ng-0.9.4-r1.ebuild:
+ Added patch to make it buildable with 2.6.27 kernel.
*madwifi-ng-0.9.4-r1 (14 Oct 2008)
diff --git a/net-wireless/madwifi-ng/files/madwifi-ng-0.9.4-2.6.27-r3811.patch b/net-wireless/madwifi-ng/files/madwifi-ng-0.9.4-2.6.27-r3811.patch
new file mode 100644
index 000000000000..96ae590be7df
--- /dev/null
+++ b/net-wireless/madwifi-ng/files/madwifi-ng-0.9.4-2.6.27-r3811.patch
@@ -0,0 +1,161 @@
+Index: /madwifi/branches/madwifi-0.9.4/net80211/ieee80211_wireless.c
+===================================================================
+--- /madwifi/branches/madwifi-0.9.4/net80211/ieee80211_wireless.c (revision 3080)
++++ /madwifi/branches/madwifi-0.9.4/net80211/ieee80211_wireless.c (revision 3811)
+@@ -1552,4 +1552,5 @@
+ struct iwscanreq { /* XXX: right place for this declaration? */
+ struct ieee80211vap *vap;
++ struct iw_request_info *info;
+ char *current_ev;
+ char *end_buf;
+@@ -1557,4 +1558,11 @@
+ };
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27) && !defined(IW_REQUEST_FLAG_COMPAT)
++#define iwe_stream_add_event(a, b, c, d, e) iwe_stream_add_event(b, c, d, e)
++#define iwe_stream_add_point(a, b, c, d, e) iwe_stream_add_point(b, c, d, e)
++#define iwe_stream_add_value(a, b, c, d, e, f) \
++ iwe_stream_add_value(b, c, d, e, f)
++#define iwe_stream_lcp_len(a) IW_EV_LCP_LEN
++#endif
+ static int
+ giwscan_cb(void *arg, const struct ieee80211_scan_entry *se)
+@@ -1591,5 +1599,6 @@
+ else
+ IEEE80211_ADDR_COPY(iwe.u.ap_addr.sa_data, se->se_bssid);
+- current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_ADDR_LEN);
++ current_ev = iwe_stream_add_event(req->info, current_ev, end_buf,
++ &iwe, IW_EV_ADDR_LEN);
+
+ /* We ran out of space in the buffer. */
+@@ -1604,9 +1613,9 @@
+ iwe.u.data.length = vap->iv_des_nssid > 0 ?
+ vap->iv_des_ssid[0].len : 0;
+- current_ev = iwe_stream_add_point(current_ev,
++ current_ev = iwe_stream_add_point(req->info, current_ev,
+ end_buf, &iwe, vap->iv_des_ssid[0].ssid);
+ } else {
+ iwe.u.data.length = se->se_ssid[1];
+- current_ev = iwe_stream_add_point(current_ev,
++ current_ev = iwe_stream_add_point(req->info, current_ev,
+ end_buf, &iwe, (char *) se->se_ssid+2);
+ }
+@@ -1622,6 +1631,6 @@
+ iwe.u.mode = se->se_capinfo & IEEE80211_CAPINFO_ESS ?
+ IW_MODE_MASTER : IW_MODE_ADHOC;
+- current_ev = iwe_stream_add_event(current_ev,
+- end_buf, &iwe, IW_EV_UINT_LEN);
++ current_ev = iwe_stream_add_event(req->info, current_ev,
++ end_buf, &iwe, IW_EV_UINT_LEN);
+
+ /* We ran out of space in the buffer. */
+@@ -1635,6 +1644,6 @@
+ iwe.u.freq.m = se->se_chan->ic_freq * 100000;
+ iwe.u.freq.e = 1;
+- current_ev = iwe_stream_add_event(current_ev,
+- end_buf, &iwe, IW_EV_FREQ_LEN);
++ current_ev = iwe_stream_add_event(req->info, current_ev,
++ end_buf, &iwe, IW_EV_FREQ_LEN);
+
+ /* We ran out of space in the buffer. */
+@@ -1646,6 +1655,6 @@
+ iwe.cmd = IWEVQUAL;
+ set_quality(&iwe.u.qual, se->se_rssi, ATH_DEFAULT_NOISE);
+- current_ev = iwe_stream_add_event(current_ev,
+- end_buf, &iwe, IW_EV_QUAL_LEN);
++ current_ev = iwe_stream_add_event(req->info, current_ev,
++ end_buf, &iwe, IW_EV_QUAL_LEN);
+
+ /* We ran out of space in the buffer */
+@@ -1661,5 +1670,6 @@
+ iwe.u.data.flags = IW_ENCODE_DISABLED;
+ iwe.u.data.length = 0;
+- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, "");
++ current_ev = iwe_stream_add_point(req->info, current_ev,
++ end_buf, &iwe, "");
+
+ /* We ran out of space in the buffer. */
+@@ -1670,5 +1680,5 @@
+ last_ev = current_ev;
+ iwe.cmd = SIOCGIWRATE;
+- current_val = current_ev + IW_EV_LCP_LEN;
++ current_val = current_ev + iwe_stream_lcp_len(req->info);
+ /* NB: not sorted, does it matter? */
+ for (j = 0; j < se->se_rates[1]; j++) {
+@@ -1676,7 +1686,7 @@
+ if (r != 0) {
+ iwe.u.bitrate.value = r * (1000000 / 2);
+- current_val = iwe_stream_add_value(current_ev,
+- current_val, end_buf, &iwe,
+- IW_EV_PARAM_LEN);
++ current_val = iwe_stream_add_value(req->info,
++ current_ev, current_val, end_buf,
++ &iwe, IW_EV_PARAM_LEN);
+ }
+ }
+@@ -1685,11 +1695,11 @@
+ if (r != 0) {
+ iwe.u.bitrate.value = r * (1000000 / 2);
+- current_val = iwe_stream_add_value(current_ev,
+- current_val, end_buf, &iwe,
+- IW_EV_PARAM_LEN);
++ current_val = iwe_stream_add_value(req->info,
++ current_ev, current_val, end_buf,
++ &iwe, IW_EV_PARAM_LEN);
+ }
+ }
+ /* remove fixed header if no rates were added */
+- if ((current_val - current_ev) > IW_EV_LCP_LEN) {
++ if ((current_val - current_ev) > iwe_stream_lcp_len(req->info)) {
+ current_ev = current_val;
+ } else {
+@@ -1705,5 +1715,6 @@
+ snprintf(buf, sizeof(buf), "bcn_int=%d", se->se_intval);
+ iwe.u.data.length = strlen(buf);
+- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, buf);
++ current_ev = iwe_stream_add_point(req->info, current_ev,
++ end_buf, &iwe, buf);
+
+ /* We ran out of space in the buffer. */
+@@ -1729,6 +1740,6 @@
+ #endif
+ if (iwe.u.data.length != 0) {
+- current_ev = iwe_stream_add_point(current_ev, end_buf,
+- &iwe, buf);
++ current_ev = iwe_stream_add_point(req->info,
++ current_ev, end_buf, &iwe, buf);
+
+ /* We ran out of space in the buffer */
+@@ -1755,6 +1766,6 @@
+ #endif
+ if (iwe.u.data.length != 0) {
+- current_ev = iwe_stream_add_point(current_ev, end_buf,
+- &iwe, buf);
++ current_ev = iwe_stream_add_point(req->info,
++ current_ev, end_buf, &iwe, buf);
+
+ /* We ran out of space in the buffer. */
+@@ -1774,6 +1785,6 @@
+ wme_leader, sizeof(wme_leader) - 1);
+ if (iwe.u.data.length != 0) {
+- current_ev = iwe_stream_add_point(current_ev, end_buf,
+- &iwe, buf);
++ current_ev = iwe_stream_add_point(req->info,
++ current_ev, end_buf, &iwe, buf);
+
+ /* We ran out of space in the buffer. */
+@@ -1792,6 +1803,6 @@
+ ath_leader, sizeof(ath_leader) - 1);
+ if (iwe.u.data.length != 0) {
+- current_ev = iwe_stream_add_point(current_ev, end_buf,
+- &iwe, buf);
++ current_ev = iwe_stream_add_point(req->info,
++ current_ev, end_buf, &iwe, buf);
+
+ /* We ran out of space in the buffer. */
+@@ -1816,4 +1827,5 @@
+
+ req.vap = vap;
++ req.info = info;
+ req.current_ev = extra;
+ if (data->length == 0) {
diff --git a/net-wireless/madwifi-ng/madwifi-ng-0.9.4-r1.ebuild b/net-wireless/madwifi-ng/madwifi-ng-0.9.4-r1.ebuild
index 334195e5744c..fd96235e6c17 100644
--- a/net-wireless/madwifi-ng/madwifi-ng-0.9.4-r1.ebuild
+++ b/net-wireless/madwifi-ng/madwifi-ng-0.9.4-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/madwifi-ng/madwifi-ng-0.9.4-r1.ebuild,v 1.1 2008/10/14 06:01:11 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/madwifi-ng/madwifi-ng-0.9.4-r1.ebuild,v 1.2 2008/10/20 03:11:19 pva Exp $
inherit linux-mod
@@ -54,16 +54,17 @@ src_unpack() {
unpack ${A}
cd "${S}"
- epatch "${FILESDIR}"/${PN}-0.9.3-uudecode-gcda-fix.patch
+ epatch "${FILESDIR}/${PN}-0.9.3-uudecode-gcda-fix.patch"
if use injection; then epatch "${FILESDIR}"/${PN}-r1886.patch; fi
for dir in ath ath_hal net80211 ath_rate ath_rate/amrr ath_rate/minstrel ath_rate/onoe ath_rate/sample; do
- convert_to_m "${S}"/${dir}/Makefile
+ convert_to_m "${S}/${dir}/Makefile"
done
- epatch "${FILESDIR}"/madwifi-dfs-ieee80211-skb-update.patch
+ epatch "${FILESDIR}/madwifi-dfs-ieee80211-skb-update.patch"
+ kernel_is ge 2 6 27 && epatch "${FILESDIR}/${P}-2.6.27-r3811.patch"
# Workaround our build system, bug #232099 (bug #237618 describes details)
touch Module.symvers
for ms in ath net80211 ath_hal ath_rate/{amrr,minstrel,onoe,sample}; do
- ln -s "${S}"/Module.symvers ${ms}
+ ln -s "${S}/Module.symvers" "${ms}"
done
}