Development of Marvell 88w8686 WiFi driver in linux-2.6.26

Source: Internet
Author: User
From: http://blog.csdn.net/samssm/article/details/6635942
I recently developed the Marvell 88w8686 Driver Based on 2440 + linux. Since the hardware design was SPI interface in March, I downloaded the SPI interface driver src_gspi8686.tar.bz2 from the Marvell official website, this driver is based on PXA270, so you need to port it to the 2440 platform. The main work is as follows: 1. set the gspi In the IO folder under src_gspi8686. C and gspi. h these two files are modified. For each specific function, write the SPI driver according to the 2440 SPI sequence. 2. modify makefile and compile the modified Code to generate gspi. ko and gspi8xxx. ko3. load the SPI driver insmod gspi. ko4. load the WiFi driver insmod gspi8686.ko helper_name =. /helper_gspi.bin
Fw_name =. /gspi8686.bin mfdmode = 15. the ID of the Wi-Fi chip is 0xb6. firmware loaded successfully. set the WiFi MAC address, IP address ifconfig eth1 192.168.1.138 netmask 255.255.255.0, and other information 8. scan the network iwlist eth0 scanning and set the connection points and passwords. 9. Ping the server to ping 192.168.1.130 successfully, and the WiFi drive to porting is successful. problems occurred during the transplantation process: 1. Hardware problems: We downloaded the firmware through the host interface, not the external EEPROM. Debugging takes a lot of time. 2. The chain table header for receiving data is not initialized. It should be initialized after use. This is a bug. 3. network configuration problems. IwconfigDownload the Source Code related to the iwconfig tool and use it in the actual project.
You can modify the "cc = GCC", "Ar = Ar" and installation path in makefile based on your actual needs. I am cc = $ (toolchain)/bin/ARM-Linux-GCC, and AR =$ (toolchain)/bin/ARM-Linux-Ar;
The remaining makefiles do not need to be modified; use make clean; Make; make install to compile and install the files.
The generated libiw. so.29 is used with other tools. Copy the generated file to the/bin folder of the target board, and copy libiw. so.29 to/lib to run related commands. The following is from the Network: iwconfig is Linux Wireless
One of the User-layer configuration tools of extensions (LWE. LWE is a tool for wireless network configuration in Linux, including Kernel support, user-layer Configuration tool, and Driver Interface Support.
Points. Many wireless network cards now support LWE, and mainstream Linux versions, such as RedHat Linux and Ubuntu Linux, already have this configuration tool.
1. iwconfig
Usage: iwconfig interface [Essid {NN | on | off}]
[Nwid {NN | on | off}]
[Mode {managed | ad-hoc | ...}
[Freq N. NNNN [k | M | G]
[Channel N]
[AP {n | off | auto}]
[Sens N]
[Nick N]
[Rate {n | auto | fixed}]
[RTS {n | auto | fixed | off}]
[Frag {n | auto | fixed | off}]
[ENC {NNNN-NNNN | off}]
[Power {period N | timeout n}]
[Retry {limit n | lifetime n}]
[Txpower n {MW | dBm}]
[Commit]
Note: iwconfig is the most important tool for LWE. It can be used to configure most parameters of the wireless network card.
Parameters:
Essid: Essid (Extension Service Set ID) of the wireless network card ). Essid is used to distinguish different wireless networks. Normally, only wireless sites with the same Essid are available.
Can communicate with each other, unless you want to listen to the wireless network. The following parameter is an Essid string enclosed by double quotation marks, or any/ON/OFF. If the Essid string contains
Any/no/off, you need to add "--" in front "--".
Example:
# Iwconfig eth0 Essid any allows any Essid, that is, the hybrid mode
# Iwconfig eth0 Essid "My network" Configure Essid to "my network"
# Iwconfig eth0 Essid -- "any" Configure Essid to "any"

Nwid: network ID, used only for the wireless network card of the pre-802.11, 802.11 Network card uses Essid and the MAC address of the AP to replace nwid, now basically no configuration.
Example:
# Iwconfig eth0 nwid ab34
# Iwconfig eth0 nwid off

NICK: nickname. Some NICs need to configure this parameter, but this parameter is not used in the 802.11 protocol stack and Mac, and generally does not need to be configured.
Example:
# Iwconfig eth0 nickname "My Linux node"

Mode: configure the working mode of the wireless network card, which can be
Ad-hoc: point-to-point wireless network without AP
Managed: a network composed of multiple APs, which allows wireless devices to roam.
MASTER: configure the wireless network card as an AP
Repeater: configured as a wireless network relay device that can forward network packets
Secondary: the AP/repeater configured for backup
Monitor: listening mode
Auto: the working mode is automatically selected by the wireless network adapter.

Example:
# Iwconfig eth0 mode managed
# Iwconfig eth0 mode ad-hoc

Freq/channel: configure the frequency or channel of the wireless network adapter. A parameter smaller than 1000 is considered as a channel, and a parameter greater than 10000 is considered as a frequency. Frequency Unit: Hz,
The numbers can be appended with K, M, and g to change the order of magnitude, for example, 2.4g. The channel starts from 1. Use the lwlist tool to view the frequency supported by the wireless network card
And channels. The off/auto parameter indicates the automatic selection frequency of the wireless network.
Note: In managed mode, the AP indicates the working frequency of the wireless network adapter. Therefore, the parameters of this configuration are ignored. Only the specified frequency is used in ad-hoc mode.
In the initial wireless network, if an existing ad-hoc network is added, the frequency parameter of this configuration is ignored.
Example:
# Iwconfig eth0 freq2422000000
# Iwconfig eth0 freq 2.422g
# Iwconfig eth0 Channel 3
# Iwconfig eth0 Channel Auto
AP: connect to the specified AP or wireless network. The following parameters can be the MAC address of the AP or the identifier of iwlist scan. If it is ad-hoc, connect
An existing ad-hoc network. Use the off parameter to enable the wireless network adapter to enter the automatic mode without changing the connected AP. Any/auto parameter. The wireless network card is automatically selected.
The best AP.
Note: If the wireless signal is low to a certain extent, the wireless network will automatically select the AP mode.
Example:
# Iwconfig eth0 AP 00: 60: 1D: 01: 23: 45
# Iwconfig eth0 AP any
# Iwconfig eth0 AP off
Rate/bit: If the wireless network card supports multiple rates, you can use this command to configure the working rate. The parameter smaller than 1000 is defined by the specific wireless NIC Driver, which is generally the transmission speed.
Rate index value. If the value is greater than 1000, the speed is measured in BPS. It can be attached with K, M, and g numbers to specify the order of magnitude. Auto parameter enables the wireless network card to automatically select a rate
The fixed parameter prevents the wireless network adapter from using the automatic rate mode.

Example:
# Iwconfig eth0 rate 11 m
# Iwconfig eth0 rate auto
# Iwconfig eth0 rate 5.5 m auto // automatically select the rate below 5 MB

Txpower: If the wireless network card supports multiple transmit power settings, use this parameter to set the transmit unit to dBm. If it is specified as W (MW), only the conversion formula is as follows:
DBM = 30 + Log (W ). The on/off parameter can be used to enable or disable the transmitting unit. Auto and fixed specify whether the transmitting power is automatically selected for the wireless device.
Example:
# Iwconfig eth0 txpower 15
# Iwconfig eth0 txpower 30 MW
# Iwconfig eth0 txpower auto
# Iwconfig eth0 txpower off

SENS: Set the lower limit of the receiver sensitivity. Under this lower limit, the wireless network adapter determines that the wireless network signal is too bad, and different network adapters take different measures. Some modern wireless network adapters
The new AP is automatically selected. The positive parameter is raw data, which is directly transmitted to the wireless NIC Driver for processing. This is generally considered as a percentage. A negative value indicates the DBM value.

Example:
# Iwconfig eth0 sens-80
# Iwconfig eth0 sens 2

Retry: configure the retransmission mechanism of the wireless network adapter. Limit 'value' specifies the maximum number of retransmissions; lifetime 'value' specifies the maximum retry time, measured in seconds, can be attached with M and U
The Unit is millisecond and microsecond. If the wireless network adapter supports automatic mode, the upper and lower limits can be specified by attaching min and max before limit and lifetime.

Example:
# Iwconfig eth0 retry 16
# Iwconfig eth0 retry lifetime 300 m
# Iwconfig eth0 retry min limit 8

RTS: Specifies the RTS/CTS handshake mode. Using the RTS/CTS handshake will increase the overhead, but performance can be improved if there are hidden wireless nodes or many wireless nodes in the wireless network.
The following parameter specifies the minimum package size using this mechanism. If this value is equal to the maximum package size, this mechanism is not allowed. Use Auto/Off/fixed
Parameters.

Example:
# Iwconfig eth0 RTS 250
# Iwconfig eth0 RTS off

Frag: configure the shard size of the sent data packet. Configuring shards increases the overhead, but increases the packet arrival rate in a noisy environment. Generally, this parameter is smaller than the maximum package.
Size. Some wireless NICs that support the burst mode can be configured with a value greater than the maximum package size to allow the burst mode. You can also use the Auto/fixed/off parameter.

Example:
# Iwconfig eth0 frag 512
# Iwconfig eth0 frag off

Key/ENC [ryption]: configure the encryption key used by the wireless network adapter. Here is the encryption key configured in WEP mode. If you want to use WPA, you need the wpa_supplicant toolkit.
Key parameters can be either hexadecimal values in XXXX-XXXX-XXXX-XXXX or XXXXXXXX format, or ASCII characters in S: xxxxxx. Assume that
If [Index] is added, only the key corresponding to the index value is configured and the current key is not changed. Specify the [Index] value to configure which key is currently used. Specify on/
Off can control whether the encryption mode is used. Open/restricted specifies the encryption mode, which depends on different wireless network adapters. The open mode of most wireless network adapters does not use encryption and
Allow to receive unencrypted data packets. Restricted mode uses encryption. Multiple key parameters can be used, but only the last one takes effect.
The WEP key can be 40 bits, expressed in 10 hexadecimal digits or 5 ASCII characters, or bits, expressed in 26 hexadecimal digits or 13 ASCII values tables.
.
Example:
# Iwconfig eth0 key 0123-4567-89
# Iwconfig eth0 key [3] 0123-4567-89
# Iwconfig eth0 key s: Password [2]
# Iwconfig eth0 key [2]
# Iwconfig eth0 key open
# Iwconfig eth0 key off
# Iwconfig eth0 key restricted [3] 0123456789
# Iwconfig eth0 key 01-23 key 45-67 [4] Key [4]

Power: configure the power management mode of the wireless network card. Period 'value' specifies the wake-up period, and timeout 'value' specifies the waiting time for sleep.
Add min and max values. The unit of these values is seconds. You can append m and u to specify milliseconds and microseconds. Off/on parameter specifies whether to allow power management, all/unicast/Multicast
Specifies the data packet type that can be awakened.

Example:
# Iwconfig eth0 power period 2
# Iwconfig eth0 power 500 m unicast
# Iwconfig eth0 power timeout 300u all
# Iwconfig eth0 power off
# Iwconfig eth0 power min period 2 power Max period 4

Commit: Submit any parameter changes to the wireless NIC Driver. Some wireless network card drivers cache the parameter repair of the wireless network card. Use this command to make the parameter modification of the wireless network card take effect. However
You do not need to use this command, because the wireless NIC driver will eventually take effect of parameter modification, which is generally used in debug.
To facilitate configuration, you can write the configuration to/etc/Network/interfaces, so that you do not need to configure it repeatedly in the future.

  • Auto loiface lo Inet loopback
  • Auto eth1
  • Iface eth1 Inet staticaddress 192.168.1.3
  • Netmask 255.255.255.0gateway 192.168.1.1
  • Echo nameserver 192.168.1.1>/etc/resolv. confpre-up/sbin/iwconfig eth1 Essid "LW home link"
  • Pre-up/sbin/iwconfig eth1 key s: Liwei
  • Auto usb0iface usb0 Inet static
  • Address 192.168.0.200netmask 255.255.255.0
  • Auto DSL-provideriface DSL-provider Inet PPP
  • Pre-up/sbin/ifconfig eth0 up # line maintained by pppoeconfprovider DSL-provider
  • Auto eth0
  • Iface eth0 Inet Manual
  • (Come From http://blog.csdn.net/control_tech)
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.