SSID-service set identifier
BSS-basic service set
ESS-extended service set
RSSI-received signal strength indication
NIC-Network Interface Cards
NDIS-Network Driver Interface Specification
The following list shows the operating modes that the IEEE 802.11 standard defines:
Ad hoc mode
In ad hoc mode, wireless clients communicate directly with each other without the use of a wireless access point (AP) or a wired network. Ad hoc mode connects wireless clients together when there is no wireless AP present, when the wireless AP rejects an association due to failed authentication, or when the wireless client is explicitly configured to use ad hoc mode.
In infrastructure mode, wireless and possibly wired clients communicate with each other through a wireless AP. The wireless client uses the wireless AP to access the resources of a wired network. The wired network can be an organization intranet or the Internet, depending on the placement of the wireless AP.
A single wireless AP supporting one or multiple wireless clients is known as a Basic Service Set (BSS). A set of two or more wireless APs connected to the same wired network is known as an Extended Service Set (ESS). An ESS is a single logical network segment, also known as a subnet, and is identified by its Service Set Identifier (SSID).
When a wireless network adapter is powered on, it begins to scan across the wireless frequencies for wireless APs and other wireless clients. Assuming that it is in infrastructure mode, after scanning, a wireless adapter chooses a wireless AP with which to associate. This selection is made automatically by using the SSID of the wireless network and the wireless AP with the best signal strength. Next, the wireless client switches to the assigned channel of the chosen wireless AP and negotiates the use of a logical wireless port. This step is known as an association.
The settings of the wireless client determine whether the wireless client prefers to associate with wireless APs or with individual wireless clients. If the signal strength of the wireless AP is too low, if the error rate is too high, or if it is instructed by the operating system, the wireless client scans for other wireless APs to determine whether a different wireless AP can provide a stronger signal to the same wireless network. If so, the wireless client switches to the channel of that wireless AP. This is known as re-association.
By switching to another wireless AP, the wireless client can distribute the load over other wireless APs, increasing the performance for other wireless clients. You can achieve wireless connectivity for large areas by placing wireless APs so that their coverage areas overlap slightly but their channels do not. As a wireless client moves its physical location, it can associate and re-associate from one wireless AP to another, and maintain a continuous connection during physical relocation.
If the coverage areas of the wireless APs within an ESS overlap, a wireless client can roam, or move from one location with a wireless AP to another location with a different wireless AP, and still maintain network layer connectivity.
Due to the nature of wireless LAN networks, implementing a security infrastructure that monitors physical access to the network is difficult. Unlike a wired network where a physical connection is required, anyone within range of a wireless AP can conceivably send and receive frames as well as listen for other frames being sent. This makes eavesdropping and remote sniffing of wireless LAN frames very easy. Wired Equivalent Privacy (WEP) is defined by the IEEE 802.11 standard and is intended to provide a level of data confidentiality that is equivalent to a wired network.
WEP provides data confidentiality services by encrypting the data sent between wireless nodes. WEP encryption for an 802.11 frame is indicated by setting a WEP flag in the MAC header of the 802.11 frame. WEP provides data integrity for random errors by including an integrity check value (ICV) in the encrypted portion of the wireless frame.
The following tables shows the two shared keys that WEP defines.
Encryption key that helps to protect multicast and broadcast traffic from a wireless AP to all of its connected wireless clients.
Unicast session key
Encryption key that helps to protect unicast traffic between a wireless client and a wireless AP and multicast and broadcast traffic sent by a wireless client to the wireless AP.
WEP encryption uses the RC4 symmetric stream cipher with 40-bit and 104-bit encryption keys. 104-bit encryption keys are not standard, however, many wireless AP vendors support them.
在wince下的任何网络驱动都要实现的函数有DriverEntry。在该函数中初始化一个NDIS_MINIPORT_CHARACTERISTICS变量。这是一个关键的变量，它的类型是一个结构体，并且具有很多函数指针的元素，几乎所有的adapter的功能函数都是通过这个变量来开放给NDIS来调用。接着就是用NdisMRegisterMiniport这个NDIS提供的函数来注册这个变量，其实就是相当于注册了一个adapter的driver了，在这个函数返回之前，上述结构体变量的InitializeHandler函数指针（被赋值为MrvDrvInitialize）被调用，以初始化adapter设备（This routine will check medium support and call resource allocation and HW initialization routines to set up the staion.）
NdisMInitializeWrapper通知NDIS一个新的miniport正在初始化。NIC（网络接口卡）驱动在调用其他NdisXXX函数之前必须要先调用该函数。在这个函数中有一个out参数：in which NDIS returns a handle that represents itself。根据MS的操作习惯，可以知道这个HANDLE是要用来指示下面很多操作的。
InitializeWirelessConfig，这个函数就不得不说了，从名字知道，这是对无线的初始配置。首先通过SDIO发送HostCmd_CMD_GET_HW_SPEC命令，并等待device的响应。这个命令应该是获取填充Adapter->PermanentAddr的值。接着是通过PrepareAndSendCommand来设置fragmentation threshold和RTS threshold。最后是通过PrepareAndSendCommand来设置对Mac的控制值，值为Adapter->CurrentMacControl（接收、发送、广播、多播）。
This function specifies a function to be called when an SDIO card interrupt occurs.