Compilare zd1211 (non rw) con kernel 2.6.22

Su gentoo, emerge zd1211 fallisce perché nel kernel 2.6.22 non c’è più CONFIG_NET_RADIO (il wireless è abilitato ma ha cambiato nome), quindi gentoo:
* Checking for suitable kernel configuration options...
* zd1211-85 requires support for Wireless LAN drivers (non-hamradio) & Wireless Extensions (CONFIG_NET_RADIO).
* Please check to make sure these options are set correctly.
* Failure to do so may cause unexpected problems.
* Once you have satisfied these options, please try merging
* this package again.
*
* ERROR: net-wireless/zd1211-85 failed.


Però si può modificare l’ebuild per togliere il check a CONFIG_NET_RADIO, creando un portage overlay:
# mkdir -p /usr/local/portage/net-wireless/zd1211
# mv /usr/portage/net-wireless/zd1211/zd1211-85.ebuild /usr/local/portage/net-wireless/zd1211/zd1211-85.ebuild
# nano /usr/local/portage/net-wireless/zd1211/zd1211-85.ebuild

e commentare la linea:
CONFIG_CHECK="NET_RADIO"
Comunque la compilazione fallisce al file zd1205.c, sempre per le nuove caratteristiche del kernel:
CC [M] /var/tmp/portage/net-wireless/zd1211-85/work/zd1211-driver-r85/src/zd1205.o
/var/tmp/portage/net-wireless/zd1211-85/work/zd1211-driver-r85/src/zd1205.c: In function 'zd1205_rx_isr':
/var/tmp/portage/net-wireless/zd1211-85/work/zd1211-driver-r85/src/zd1205.c:4162: error: 'struct sk_buff' has no member named 'mac'
/var/tmp/portage/net-wireless/zd1211-85/work/zd1211-driver-r85/src/zd1205.c: In function 'zd1205wext_iw_get_stats':
/var/tmp/portage/net-wireless/zd1211-85/work/zd1211-driver-r85/src/zd1205.c:4783: error: 'struct driver_stats' has no member named 'iw_stats'
make[3]: *** [/var/tmp/portage/net-wireless/zd1211-85/work/zd1211-driver-r85/src/zd1205.o] Error 1
make[2]: *** [_module_/var/tmp/portage/net-wireless/zd1211-85/work/zd1211-driver-r85] Error 2
make[2]: Leaving directory `/usr/src/linux-2.6.22-gentoo-r8'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/tmp/portage/net-wireless/zd1211-85/work/zd1211-driver-r85'
make: *** [all] Error 2
*
* ERROR: net-wireless/zd1211-85 failed.

Qui c’è un workaround:
===================================================================
--- src/zd1205.c (revisión: 85)
+++ src/zd1205.c (copia de trabajo)
@@ -4159,7 +4159,7 @@
skb->tail = skb->data = pHdr;
/* ath_desc: fix monitor mode frame length */
skb_put(skb, data_sz - PLCP_HEADER - EXTRA_INFO_LEN -
CRC32_LEN);
- skb->mac.raw = skb->data;
+ //skb->mac.raw = skb->data;
skb->pkt_type = PACKET_OTHERHOST;
skb->protocol = __constant_htons(ETH_P_802_2);
skb->dev = dev;
@@ -4780,7 +4780,7 @@
struct iw_statistics *zd1205wext_iw_get_stats(struct net_device *dev)
{
struct zd1205_private *macp = dev->priv;
- struct iw_statistics *iw_stats = &macp->drv_stats.iw_stats;
+ struct iw_statistics *iw_stats = &macp->device->stats;

iw_stats->qual.noise = 0;
iw_stats->qual.qual = macp->rxSignalQuality;

struct iw_statistics *iw_stats = &macp->drv_stats.iw_stats;
Comunque non voglio più modificare l’ebuild e scarico il trunk (ramo principale di sviluppo) da svn:
# emerge subversion
# svn co https://zd1211.svn.sourceforge.net/svnroot/zd1211/trunk zd1211

Patcho il file incriminato, make && make install. Fine. Per ora… (devo capire perché la chiavetta va solo a 1 Mb/s)

webografia:

Leave a Reply

XHTML: You can use these tags:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>