[PATCH] ZyDAS ZD1211 USB-WLAN driver
There are 60+ USB wifi adapters available on the market based on the ZyDAS
ZD1211 chip.
Unlike the predecessor (ZD1201), ZD1211 does not have a hardware MAC, so most
data operations are coordinated by the device driver. The ZD1211 chip sits
alongside an RF transceiver which is also controlled by the driver. Our driver
currently supports 2 RF types, we know of one other available in a few marketed
products which we will be supporting soon.
Our driver also supports the newer revision of ZD1211, called ZD1211B. The
initialization and RF operations are slightly different for the new revision,
but the main difference is 802.11e support. Our driver does not support the
QoS features yet, but we think we know how to use them.
This driver is based on ZyDAS's own GPL driver available from www.zydas.com.tw.
ZyDAS engineers have been responsive and supportive of our efforts, so thumbs
up to them. Additionally, the firmware is redistributable and they have
provided device specs.
This driver has been written primarily by Ulrich Kunitz and myself. Graham
Gower, Greg KH, Remco and Bryan Rittmeyer have also contributed. The
developers of ieee80211 and softmac have made our lives so much easier- thanks!
We maintain a small info-page: http://zd1211.ath.cx/wiki/DriverRewrite
If there is enough time for review, we would like to aim for inclusion in
2.6.18. The driver works nicely as a STA, and can connect to both open and
encrypted networks (we are using software-based encryption for now). We will
work towards supporting more advanced features in the future (ad-hoc, master
mode, 802.11a, ...).
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-06-02 12:11:32 -04:00
|
|
|
#ifndef _ZD_IEEE80211_H
|
|
|
|
#define _ZD_IEEE80211_H
|
|
|
|
|
|
|
|
#include <net/ieee80211.h>
|
|
|
|
#include "zd_types.h"
|
|
|
|
|
|
|
|
/* Additional definitions from the standards.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define ZD_REGDOMAIN_FCC 0x10
|
|
|
|
#define ZD_REGDOMAIN_IC 0x20
|
|
|
|
#define ZD_REGDOMAIN_ETSI 0x30
|
|
|
|
#define ZD_REGDOMAIN_SPAIN 0x31
|
|
|
|
#define ZD_REGDOMAIN_FRANCE 0x32
|
|
|
|
#define ZD_REGDOMAIN_JAPAN_ADD 0x40
|
|
|
|
#define ZD_REGDOMAIN_JAPAN 0x41
|
|
|
|
|
|
|
|
enum {
|
|
|
|
MIN_CHANNEL24 = 1,
|
|
|
|
MAX_CHANNEL24 = 14,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct channel_range {
|
|
|
|
u8 start;
|
|
|
|
u8 end; /* exclusive (channel must be less than end) */
|
|
|
|
};
|
|
|
|
|
|
|
|
struct iw_freq;
|
|
|
|
|
|
|
|
int zd_geo_init(struct ieee80211_device *ieee, u8 regdomain);
|
|
|
|
|
|
|
|
const struct channel_range *zd_channel_range(u8 regdomain);
|
|
|
|
int zd_regdomain_supports_channel(u8 regdomain, u8 channel);
|
|
|
|
int zd_regdomain_supported(u8 regdomain);
|
|
|
|
|
|
|
|
/* for 2.4 GHz band */
|
|
|
|
int zd_channel_to_freq(struct iw_freq *freq, u8 channel);
|
|
|
|
int zd_find_channel(u8 *channel, const struct iw_freq *freq);
|
|
|
|
|
|
|
|
#define ZD_PLCP_SERVICE_LENGTH_EXTENSION 0x80
|
|
|
|
|
|
|
|
struct ofdm_plcp_header {
|
|
|
|
u8 prefix[3];
|
|
|
|
__le16 service;
|
|
|
|
} __attribute__((packed));
|
|
|
|
|
|
|
|
static inline u8 zd_ofdm_plcp_header_rate(
|
|
|
|
const struct ofdm_plcp_header *header)
|
|
|
|
{
|
|
|
|
return header->prefix[0] & 0xf;
|
|
|
|
}
|
|
|
|
|
|
|
|
#define ZD_OFDM_RATE_6M 0xb
|
|
|
|
#define ZD_OFDM_RATE_9M 0xf
|
|
|
|
#define ZD_OFDM_RATE_12M 0xa
|
|
|
|
#define ZD_OFDM_RATE_18M 0xe
|
|
|
|
#define ZD_OFDM_RATE_24M 0x9
|
|
|
|
#define ZD_OFDM_RATE_36M 0xd
|
|
|
|
#define ZD_OFDM_RATE_48M 0x8
|
|
|
|
#define ZD_OFDM_RATE_54M 0xc
|
|
|
|
|
|
|
|
struct cck_plcp_header {
|
|
|
|
u8 signal;
|
|
|
|
u8 service;
|
|
|
|
__le16 length;
|
|
|
|
__le16 crc16;
|
2006-11-28 14:16:37 -05:00
|
|
|
} __attribute__((packed));
|
[PATCH] ZyDAS ZD1211 USB-WLAN driver
There are 60+ USB wifi adapters available on the market based on the ZyDAS
ZD1211 chip.
Unlike the predecessor (ZD1201), ZD1211 does not have a hardware MAC, so most
data operations are coordinated by the device driver. The ZD1211 chip sits
alongside an RF transceiver which is also controlled by the driver. Our driver
currently supports 2 RF types, we know of one other available in a few marketed
products which we will be supporting soon.
Our driver also supports the newer revision of ZD1211, called ZD1211B. The
initialization and RF operations are slightly different for the new revision,
but the main difference is 802.11e support. Our driver does not support the
QoS features yet, but we think we know how to use them.
This driver is based on ZyDAS's own GPL driver available from www.zydas.com.tw.
ZyDAS engineers have been responsive and supportive of our efforts, so thumbs
up to them. Additionally, the firmware is redistributable and they have
provided device specs.
This driver has been written primarily by Ulrich Kunitz and myself. Graham
Gower, Greg KH, Remco and Bryan Rittmeyer have also contributed. The
developers of ieee80211 and softmac have made our lives so much easier- thanks!
We maintain a small info-page: http://zd1211.ath.cx/wiki/DriverRewrite
If there is enough time for review, we would like to aim for inclusion in
2.6.18. The driver works nicely as a STA, and can connect to both open and
encrypted networks (we are using software-based encryption for now). We will
work towards supporting more advanced features in the future (ad-hoc, master
mode, 802.11a, ...).
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-06-02 12:11:32 -04:00
|
|
|
|
|
|
|
static inline u8 zd_cck_plcp_header_rate(const struct cck_plcp_header *header)
|
|
|
|
{
|
|
|
|
return header->signal;
|
|
|
|
}
|
|
|
|
|
|
|
|
#define ZD_CCK_SIGNAL_1M 0x0a
|
|
|
|
#define ZD_CCK_SIGNAL_2M 0x14
|
|
|
|
#define ZD_CCK_SIGNAL_5M5 0x37
|
|
|
|
#define ZD_CCK_SIGNAL_11M 0x6e
|
|
|
|
|
|
|
|
enum ieee80211_std {
|
|
|
|
IEEE80211B = 0x01,
|
|
|
|
IEEE80211A = 0x02,
|
|
|
|
IEEE80211G = 0x04,
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _ZD_IEEE80211_H */
|