Hi!
Here are some patches for using linux-wlan-ng with Linux 2.6.27. Compile
tested only.
--
Sakari Ailus
[email protected]
--- linux-wlan-ng-0.2.9+dfsg/src/p80211/p80211netdev.c 2008-06-14 18:40:35.000000000 +0300
+++ linux-wlan-ng-0.2.9+dfsg.new/src/p80211/p80211netdev.c 2008-12-16 18:40:49.000000000 +0200
@@ -947,8 +947,9 @@
#endif
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) )
- dev->nd_net = &init_net;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) \
+ && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27))
+ dev->nd_net = &init_net
#endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38) )
--- linux-wlan-ng-0.2.9+dfsg/src/p80211/p80211wext.c 2008-06-14 18:40:35.000000000 +0300
+++ linux-wlan-ng-0.2.9+dfsg.new/src/p80211/p80211wext.c 2008-12-16 18:38:09.000000000 +0200
@@ -1520,7 +1520,7 @@
* airo driver code.
*/
static char *
-wext_translate_bss(char *current_ev, char *end_buf, p80211msg_dot11req_scan_results_t *bss)
+wext_translate_bss(struct iw_request_info *info, char *current_ev, char *end_buf, p80211msg_dot11req_scan_results_t *bss)
{
struct iw_event iwe; /* Temporary buffer */
@@ -1528,7 +1528,7 @@
memcpy(iwe.u.ap_addr.sa_data, bss->bssid.data.data, WLAN_BSSID_LEN);
iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
iwe.cmd = SIOCGIWAP;
- current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_ADDR_LEN);
+ current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_ADDR_LEN);
/* The following entries will be displayed in the same order we give them */
@@ -1544,7 +1544,7 @@
iwe.u.data.length = size;
iwe.u.data.flags = 1;
iwe.cmd = SIOCGIWESSID;
- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, &essid[0]);
+ current_ev = iwe_stream_add_point(info, current_ev, end_buf, &iwe, &essid[0]);
WLAN_LOG_DEBUG(1, " essid size OK.\n");
}
@@ -1563,7 +1563,7 @@
}
iwe.cmd = SIOCGIWMODE;
if (iwe.u.mode)
- current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_UINT_LEN);
+ current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_UINT_LEN);
/* Encryption capability */
if (bss->privacy.data == P80211ENUM_truth_true)
@@ -1572,13 +1572,13 @@
iwe.u.data.flags = IW_ENCODE_DISABLED;
iwe.u.data.length = 0;
iwe.cmd = SIOCGIWENCODE;
- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, NULL);
+ current_ev = iwe_stream_add_point(info, current_ev, end_buf, &iwe, NULL);
/* Add frequency. (short) bss->channel is the frequency in MHz */
iwe.u.freq.m = bss->dschannel.data;
iwe.u.freq.e = 0;
iwe.cmd = SIOCGIWFREQ;
- current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_FREQ_LEN);
+ current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_FREQ_LEN);
/* Add quality statistics */
iwe.u.qual.level = bss->signal.data;
@@ -1586,7 +1586,7 @@
/* do a simple SNR for quality */
iwe.u.qual.qual = qual_as_percent(bss->signal.data - bss->noise.data);
iwe.cmd = IWEVQUAL;
- current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_QUAL_LEN);
+ current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_QUAL_LEN);
return current_ev;
}
@@ -1627,7 +1627,7 @@
break;
}
- current_ev = wext_translate_bss(current_ev, extra + IW_SCAN_MAX_DATA, &msg);
+ current_ev = wext_translate_bss(info, current_ev, extra + IW_SCAN_MAX_DATA, &msg);
scan_good = 1;
i++;
} while (i < IW_MAX_AP);