jeudi 17 février 2011

Connexion Wifi Artheros dopée avec driver ath5k


J'ai installé récemment la distribution Mandriva 2010.2 KDE sur un PC fixe Compaq CQ5325FR en double boot avec Windows Seven.
La connexion au réseau est assurée par une carte Wifi PCI Artheros AR5001X+

Très rapidement, la personne utilisant ce PC s'est plaint du faible débit de la connexion Wifi sur Mandriva par comparaison avec Windows.

J'ai commencé à analyser le paramétrage sous Mandriva pour focaliser sur l'utilisation du driver Madwifi qui semblait être la cause des problèmes. En effet, par la commande iwconfig, j'ai pu constater d'importantes variations du débit oscillant sans arrêt dans des valeurs allant de 1Mb/S à 54Mb/S

Sur le site du projet Madwifi il est question d'un driver plus récent et plus performant : ath5k

L'activation du driver ath5k en lieu et place de madwifi installé de base a eu des résultats fulgurants en terme de débit. Le pourcentage de signal est passé de 30% à plus de 60%.

Voici les actions effectuées pour remplacer le driver madwifi (nommé ath_pci) par le driver ath5k

Mon type de carte 
[root@localhost ~]# lspcidrake -v | grep ath
ath5k : Atheros Communications Inc.|Atheros AR5001X+ Wireless Network Adapter [NETWORK_ETHERNET] (vendor:168c device:0013 subv:1186 subd:3a13) (rev: 01)


1) Dans le fichier /etc/modprobe.conf

J'ai mis en commentaire les 2 lignes faisant référence au driver ath_pci (comme ça en cas de souci, je peux facilement le réactiver)
[root@localhost etc]# cat modprobe.conf
install scsi_hostadapter /sbin/modprobe sata_nv; /bin/true
install usb-interface /sbin/modprobe ehci_hcd; /sbin/modprobe ohci_hcd; /bin/true
options ipv6 disable=1
#alias ath0 ath_pci
#alias pci:
v0000168Cd00000013sv00001186sd00003A13bc02sc00i00 ath_pci
[root@localhost etc]#

2) Dans le fichier /etc/modprobe.d/blacklist-mdv
J'ai blacklisté le driver ath_pci en l'ajoutant à la fin du fichier
[root@localhost modprobe.d]# cat blacklist-mdv
# blacklisted modules for PCI coldplug
# see also /etc/modprobe.d/blacklist-compat

blacklist rivatv

# For some bridges both intel-agp and i82875p_edac are loaded. If i82875p_edac
# is loaded first it will grab the device. Then intel-agp doesn't work.
# Therefore we disable automatic loading of 82875p_edac. (Bug 213840)
# https://bugzilla.novell.com/show_bug.cgi?id=213840
blacklist i82875p_edac

# do not use "Boot Protocol" drivers, we prefer usbhid
# and they cause problems when loaded together with usbhid (#37726, #40861)
blacklist usbkbd
blacklist usbmouse

# disable PC speaker by default
# pcspkr is the standard driver, while snd-pcsp is the ALSA driver
blacklist pcspkr
blacklist snd-pcsp

# disable autoloading of proprietary display drivers by default
# They interfere with the free drivers.
# The proprietary drivers are loaded later (if enabled) by:
# (1) /etc/modprobe.preload.d/alternative-display-driver, or
# (2) X.org server when initializing devices
# The drivers will therefore work even while they are blacklisted.
blacklist nvidia-current
blacklist nvidia173
blacklist nvidia96xx
blacklist nvidia
blacklist fglrx

# disable automatic loading of KMS drivers by udev for now
# They interfere with vesa/nv drivers and a more complex solution will be
# needed before they can be safely enabled.
# Despite the below entries, KMS drivers are still loaded by
# (1) initrd when enabled (i915 by default)
# (2) X.org server when it starts (nouveau)
# (3) a manual /etc/modprobe.preload entry (radeon)
# The drivers will therefore work even while they are blacklisted.
blacklist i915
blacklist nouveau
blacklist radeon

blacklist ath_pci
[root@localhost modprobe.d]#

3) Activation du driver "ath5k"
[root@localhost ~]# modprobe -r ath_pci

[root@localhost ~]# modprobe ath5k
Ces commandes ne doivent pas renvoyer d'erreur

4) Reboot du PC 
Suivi du paramétrage de la connexion Wifi au travers du MCC en passant par "Explorer et Configurer le matériel" ou l'on pourra constater que le driver associé est bien ath5k

5) Suppression de madwifi
Par le gestionnaire de logiciel (supprimer les paquets contenant le nom madwifi)