Friday, January 28, 2011

IEEE 802.11n-2009


From Wikipedia, the free encyclopedia
IEEE 802.11n-2009 is an amendment to the IEEE 802.11-2007 wireless networking standard to improve network throughput over the two previous standards — 802.11a and 802.11g — with a significant increase in the maximum raw data rate from 54 Mbit/s to 600 Mbit/s with the use of four spatial streams at a channel width of 40 MHz.[1][2]
802.11 is a set of IEEE standards that govern wireless networking transmission methods. They are commonly used today in their 802.11a, 802.11b, 802.11g and 802.11n versions to provide wireless connectivity in the home, office and some commercial establishments.

Contents

[hide]

 Description

IEEE 802.11n is an amendment to IEEE 802.11-2007 as amended by IEEE 802.11k-2008, IEEE 802.11r-2008, IEEE 802.11y-2008, and IEEE 802.11w-2009, and builds on previous 802.11 standards by adding multiple-input multiple-output (MIMO) and 40 MHz channels to the PHY (physical layer), and frame aggregation to the MAC layer.
MIMO is a technology which uses multiple antennas to coherently resolve more information than possible using a single antenna. One way it provides this is through Spatial Division Multiplexing (SDM). SDM spatially multiplexes multiple independent data streams, transferred simultaneously within one spectral channel of bandwidth. MIMO SDM can significantly increase data throughput as the number of resolved spatial data streams is increased. Each spatial stream requires a discrete antenna at both the transmitter and the receiver. In addition, MIMO technology requires a separate radio frequency chain and analog-to-digital converter for each MIMO antenna which translates to higher implementation costs compared to non-MIMO systems.
Channels operating at 40 MHz are another feature incorporated into 802.11n which doubles the channel width from 20 MHz in previous 802.11 PHYs to transmit data. This allows for a doubling of the PHY data rate over a single 20 MHz channel. It can be enabled in the 5 GHz mode, or within the 2.4 GHz if there is knowledge that it will not interfere with any other 802.11 or non-802.11 (such as Bluetooth) system using those same frequencies.[3]
Coupling MIMO architecture with wider bandwidth channels offers increased physical transfer rate over 802.11a (5 GHz) and 802.11g (2.4 GHz).[4]

Data encoding

The transmitter and receiver use precoding and postcoding techniques, respectively, to achieve the capacity of a MIMO link. Precoding includes spatial beamforming and spatial coding, where spatial beamforming improves the received signal quality at the decoding stage. Spatial coding can increase data throughput via spatial multiplexing and increase range by exploiting the spatial diversity, through techniques such as Alamouti coding.

Number of antennas

The number of simultaneous data streams is limited by the minimum number of antennas in use on both sides of the link. However, the individual radios often further limit the number of spatial streams that may carry unique data. The a \times b \colon c notation helps identify what a given radio is capable of. The first number (a) is the maximum number of transmit antennas or RF chains that can be used by the radio. The second number (b) is the maximum number of receive antennas or RF chains that can be used by the radio. The third number (c) is the maximum number of data spatial streams the radio can use. For example, a radio that can transmit on two antennas and receive on three, but can only send or receive two data streams would be 2 \times 3 \colon 2.
The 802.11n draft allows up to 4 \times 4 \colon 4. Common configurations of 11n devices are 2 \times 2 \colon 2, 2 \times 3 \colon 2, and 3 \times 3 \colon 2. All three configurations have the same maximum throughputs and features, and differ only in the amount of diversity the antenna systems provide. In addition, a fourth configuration, 3 \times 3 \colon 3 is becoming common, which has a higher throughput, due to the additional data stream.[5]

Data rates

Data rates up to 600 Mbit/s are achieved only with the maximum of four spatial streams using a 40 MHz-wide channel. Various modulation schemes and coding rates are defined by the standard and are represented by a Modulation and Coding Scheme (MCS) index value. The table below shows the relationships between the variables that allow for the maximum data rate.[6]
MCS
Index
Spatial
Streams
Modulation
Type
Coding
Rate
Data Rate Mb/s
20 MHz channel 40 MHz channel
800ns GI 400ns GI 800ns GI 400ns GI
0 1 BPSK 1/2 6.50 7.20 13.50 15.00
1 1 QPSK 1/2 13.00 14.40 27.00 30.00
2 1 QPSK 3/4 19.50 21.70 40.50 45.00
3 1 16-QAM 1/2 26.00 28.90 54.00 60.00
4 1 16-QAM 3/4 39.00 43.30 81.00 90.00
5 1 64-QAM 2/3 52.00 57.80 108.00 120.00
6 1 64-QAM 3/4 58.50 65.00 121.50 135.00
7 1 64-QAM 5/6 65.00 72.20 135.00 150.00
8 2 BPSK 1/2 13.00 14.40 27.00 30.00
9 2 QPSK 1/2 26.00 28.90 54.00 60.00
10 2 QPSK 3/4 39.00 43.30 81.00 90.00
11 2 16-QAM 1/2 52.00 57.80 108.00 120.00
12 2 16-QAM 3/4 78.00 86.70 162.00 180.00
13 2 64-QAM 2/3 104.00 115.60 216.00 240.00
14 2 64-QAM 3/4 117.00 130.00 243.00 270.00
15 2 64-QAM 5/6 130.00 144.40 270.00 300.00
16 3 BPSK 1/2 19.50 21.70 40.50 45.00
17 3 QPSK 1/2 39.00 43.30 81.00 90.00
18 3 QPSK 3/4 58.50 65.00 121.50 135.00
19 3 16-QAM 1/2 78.00 86.70 162.00 180.00
20 3 16-QAM 3/4 117.00 130.70 243.00 270.00
21 3 64-QAM 2/3 156.00 173.30 324.00 360.00
22 3 64-QAM 3/4 175.50 195.00 364.50 405.00
23 3 64-QAM 5/6 195.00 216.70 405.00 450.00
... 4 ... ... ... ... ... ...
31 4 64-QAM 5/6 260.00 288.90 540.00 600.00

[edit] Frame aggregation

PHY level data rate improvements do not increase user level throughput beyond a point because of 802.11 protocol overheads, like the contention process, interframe spacing, PHY level headers (Preamble + PLCP) and acknowledgment frames. The main medium access control (MAC) feature that provides a performance improvement is aggregation. Two types of aggregation are defined:
  1. Aggregation of MAC Service Data Units (MSDUs) at the top of the MAC (referred to as MSDU aggregation or A-MSDU)
  2. Aggregation of MAC Protocol Data Units (MPDUs) at the bottom of the MAC (referred to as MPDU aggregation or A-MPDU)
Frame aggregation is a process of packing multiple MSDUs or MPDUs together to reduce the overheads and average them over multiple frames, thus increasing the user level data rate. A-MPDU aggregation requires the use of Block Acknowledgement or BlockAck, which was introduced in 802.11e and has been optimized in 802.11n.

Backward compatibility

When 802.11g was released to share the band with existing 802.11b devices, it provided ways of ensuring coexistence between legacy, and successor devices. 802.11n extends the coexistence management to protect its transmissions from legacy devices, which include 802.11g, 802.11b and 802.11a. There are MAC and PHY level protection mechanisms as listed below:
  1. PHY level protection: Mixed Mode Format protection (also known as L-SIG TXOP Protection): In mixed mode, each 802.11n transmission is always embedded in an 802.11a or 802.11g transmission. For 20 MHz transmissions, this embedding takes care of the protection with 802.11a and 802.11g. However, 802.11b devices still need CTS protection.
  2. PHY level protection: Transmissions using a 40 MHz channel in the presence of 802.11a or 802.11g clients require using CTS protection on both 20 MHz halves of the 40 MHz channel, to prevent interference with legacy devices.
  3. PHY level protection: An RTS/CTS frame exchange or CTS frame transmission at legacy rates can be used to protect subsequent 11n transmission.
Even with protection, large discrepancies can exist between the throughput an 802.11n device can achieve in a greenfield network, compared to a mixed-mode network, when legacy devices are present. This is an extension of the 802.11b/802.11g coexistence problem.

Deployment strategies

To achieve maximum output a pure 802.11n 5 GHz network is recommended. The 5 GHz band has substantial capacity due to many non-overlapping radio channels and less radio interference as compared to the 2.4 GHz band.[7] An 802.11n-only network may be impractical for many users because they need to support legacy equipment that still is 802.11b/g only. Consequently, it may be more practical in the short term to operate a mixed 802.11b/g/n network until 802.11n hardware becomes more prevalent. In a mixed-mode system, an optimal solution would be to use a dual-radio access point and place the 802.11b/g traffic on the 2.4 GHz radio and the 802.11n traffic on the 5 GHz radio.[8] This setup assumes that all the 802.11n clients are 5 GHz capable, which isn't a requirement of the standard.

40 MHz in 2.4 GHz

The 2.4 GHz ISM band is fairly congested. With 802.11n, there is the option to double the bandwidth per channel to 40 MHz which results in slightly more than double the data rate. However, when in 2.4 GHz enabling this option takes up to 82%[9] of the unlicensed band, which in many areas may prove to be unfeasible.
The specification calls for requiring one primary 20 MHz channel as well as a secondary adjacent channel spaced ±20 MHz away. The primary channel is used for communications with clients incapable of 40 MHz mode. When in 40 MHz mode the center frequency is actually the mean of the primary and secondary channels.
Primary
Channel
20 MHz 40 MHz above 40 MHz below
blocks Sec. Ch. center blocks Sec. Ch. center blocks
1 1-3 5 3 1-7 Not Available
2 1-4 6 4 1-8 Not Available
3 1-5 7 5 1-9 Not Available
4 2-6 8 6 2-10 Not Available
5 3-7 9 7 3-11 1 3 1-7
6 4-8 10 8 4-12 2 4 1-8
7 5-9 11 9 5-13 3 5 1-9
8 6-10 12 10 6-13 4 6 2-10
9 7-11 13 11 7-13 5 7 3-11
10 8-12 Not Available 6 8 4-12
11 9-13 Not Available 7 9 5-13
12 10-13 Not Available 8 10 6-13
13 11-13 Not Available 9 11 7-13
Local regulations may restrict certain channels from operation. For example, Channels 12 and 13 are normally unavailable for use as either a primary or secondary channel in North America. For further information, see List of WLAN channels.
Thanks to : http://en.wikipedia.org/wiki/IEEE_802.11n-2009

List of WLAN channels


From Wikipedia, the free encyclopedia
The List of WLAN channels is the legally allowed IEEE 802.11 or more commonly Wi-Fi Wireless LAN channels.
The 802.11 workgroup currently documents use in three distinct frequency ranges, 2.4 GHz, 3.6 GHz and 4.9/5.0 GHz bands.[1] Each range is divided into multitude of channels. Countries apply their own regulations to both the allowable channels, allowed users and maximum power levels within these frequency ranges. In some countries, such as the United States, licensed Amateur Radio operators may use some of the channels at much higher power for long distance wireless access.

Contents

[hide]

2.4 GHz (802.11b/g/n)

Graphical representation of Wi-Fi channels in 2.4 GHz band
There are 14 channels designated in the 2.4 GHz range spaced 5 MHz apart (with the exception of a 12 MHz spacing before Channel 14). As the protocol requires 25 MHz of channel separation, adjacent channels overlap and will interfere with each other. Consequently, using only channels 1, 6, 11, and 14 is recommended to avoid interference.[2]
Potential Wireless LAN uses of this range are documented by IEEE 802.11 clauses 18 (802.11b), 19 (802.11g) and 20 (802.11n). IEEE 802.11 clauses 14 and 15 also specify potential uses of this range, but did not see widespread implementation.
Countries apply their own regulations to both the allowable channels, allowed users and maximum power levels within these frequency ranges. Consult your local authorities as these regulations may be out of date as they are subject to change at any time. Most of the world will allow the first thirteen channels in the spectrum.
channel frequency
(MHz)
North America
[3]
Japan[3] Most of worldA
[3][4][5][6][7]
1 2412 Yes Yes Yes
2 2417 Yes Yes Yes
3 2422 Yes Yes Yes
4 2427 Yes Yes Yes
5 2432 Yes Yes Yes
6 2437 Yes Yes Yes
7 2442 Yes Yes Yes
8 2447 Yes Yes Yes
9 2452 Yes Yes Yes
10 2457 Yes Yes Yes
11 2462 Yes Yes Yes
12 2467 NoB Yes Yes
13 2472 NoB Yes Yes
14 2484 No 11b onlyC No
^A Earlier, in Spain the only allowable channels were 10–11, and in France 10–13. These restrictions have been removed since, and these countries are currently following the common European policy (channels 1–13).
^B In the USA, 802.11 operation in the channels 12 and 13 is actually allowed under low powered conditions. The 2.4 GHz Part 15 band in the US allows spread-spectrum operation as long as the 50-dB bandwidth of the signal is within in the range of 2400–2483.5 MHz[8] which wholly encompasses both channels 12 and 13. A Federal Communications Commission (FCC) document clarifies that only channel 14 is forbidden and furthermore low-power transmitters with low-gain antennas may legally operate in channels 12 and 13.[9] However, channels 12 and 13 are not normally used in order to avoid any potential interference in the adjacent restricted frequency band, 2483.5–2500 MHz[10], which is subject to strict emission limits set out in 47 CFR §15.205[11].
In Canada, 12 channels are available for use, 11 of which at full power and channel 12's transmit power limited. However, few devices have a method to enable a lower powered channel 12.
^C Channel 14 is valid only for DSSS and CCK modes (Clause 18 a.k.a. 802.11b) in Japan. OFDM (i.e. 802.11g) may not be used. (IEEE 802.11-2007 §19.4.2)

3.6 GHz (802.11y)

Except where noted, all information taken from Annex J of IEEE 802.11y-2008
This range is documented as only being allowed as a licensed band in the United States. Please see IEEE 802.11y for details.
Countries apply their own regulations to both the allowable channels, allowed users and maximum power levels within these frequency ranges. Consult your local authorities as these regulations may be out of date as they are subject to change at any time.
channel frequency
(MHz)
United States
5 MHz 10 MHz 20 MHz
131 3657.5 Yes No No
132 3662.5 Yes No No
132 3660.0 No Yes No
133 3667.5 Yes No No
133 3665.0 No No Yes
134 3672.5 Yes No No
134 3670.0 No Yes No
135 3677.5 Yes No No
136 3682.5 Yes No No
136 3680.0 No Yes No
137 3687.5 Yes No No
137 3685.0 No No Yes
138 3689.5 Yes No No
138 3690.0 No Yes No

5 GHz (802.11a/h/j/n)

Except where noted, all information taken from Annex J of IEEE 802.11-2007 modified by amendments k, y and n.
Countries apply their own regulations to both the allowable channels, allowed users and maximum power levels within these frequency ranges. Consult your local authorities as these regulations may be out of date as they are subject to change at any time.
channel frequency
(MHz)
United States Europe Japan Singapore China Israel Korea Turkey
40/20 MHz[12] 40/20 MHz 40/20 MHz[13] 10 MHz 20 MHz 20 MHz 20 MHz[6] 20 MHz[14] 20 MHz
183 4915 No No No Yes No No No No No
184 4920 No No Yes Yes No No No No No
185 4925 No No No Yes No No No No No
187 4935 No No No Yes No No No No No
188 4940 No No Yes Yes No No No No No
189 4945 No No No Yes No No No No No
192 4960 No No Yes No No No No No No
196 4980 No No Yes No No No No No No
7 5035 No No No Yes No No No No No
8 5040 No No No Yes No No No No No
9 5045 No No No Yes No No No No No
11 5055 No No No Yes No No No No No
12 5060 No No No No No No No No No
16 5080 No No No No No No No No No
34 5170 No No No No No No Yes Yes Yes
36 5180 Yes Yes Yes No Yes No Yes Yes Yes
38 5190 No No No No No No Yes Yes Yes
40 5200 Yes Yes Yes No Yes No Yes Yes Yes
42 5210 No No No No No No Yes Yes Yes
44 5220 Yes Yes Yes No Yes No Yes Yes Yes
46 5230 No No No No No No Yes Yes Yes
48 5240 Yes Yes Yes No No No Yes Yes Yes
52 5260 Yes Yes Yes No No No Yes Yes Yes
56 5280 Yes Yes Yes No No No Yes Yes Yes
60 5300 Yes Yes Yes No No No Yes Yes Yes
64 5320 Yes Yes Yes No No No Yes Yes Yes
100 5500 Yes[15] Yes Yes No No No No Yes No
104 5520 Yes[15] Yes Yes No No No No Yes No
108 5540 Yes[15] Yes Yes No No No No Yes No
112 5560 Yes[15] Yes Yes No No No No Yes No
116 5580 Yes[15] Yes Yes No No No No Yes No
120 5600 No[15] Yes Yes No No No No Yes No
124 5620 No[15] Yes Yes No No No No Yes No
128 5640 No[15] Yes Yes No No No No Yes No
132 5660 No[15] Yes Yes No No No No No No
136 5680 Yes[15] Yes Yes No No No No No No
140 5700 Yes[15] No Yes No No No No No No
149 5745 Yes No No No Yes Yes No Yes Yes
153 5765 Yes No No No Yes Yes No Yes Yes
157 5785 Yes No No No Yes Yes No Yes Yes
161 5805 Yes No No No Yes Yes No Yes Yes
165 5825 Yes No No No Yes Yes No Yes Yes

Thanks to: Wikipedia

Saturday, January 22, 2011

Git guide for Linux wireless users and developers

Git guide for Linux wireless users and developers

This is a quick git-guide for Linux users and developers with emphasis on Linux wireless. The latest Linux wireless development takes place on John Linville's wireless-testing git tree.

Cloning latest wireless-testing

First, clone the wireless-testing.git tree
git clone git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
cd wireless-testing

Get the latest updates

You will want to update your local git repository to match what John has last committed. You can do this as follows.
git pull

Review the changes last registered

git log

To review changes made to wireless drivers

git log -p drivers/net/wireless/

To review changes made to mac80211

git log -p net/mac80211/
You get the idea.

Hacking on Linux wireless

If you'd like to hack on Linux wireless you can create own branch based on the one you are using. This is so you don't screw your current branch up.
git checkout -b my-fix-for-foo
# hack hack hack
# To get a diff of your work:
git diff > my_changes.diff
# Or if you just want to read them:
git diff
# To revert to the original state of the branch:
git checkout -f
# If instead you want to commit
git commit -a

Check available branches

Suppose you have created a few branches, and just are not sure what you have anymore.
# To view local branches
git branch -l
# To view all remote branches
git branch -r

Reviewing changes between commmits

Suppose you want to get the log and diff between two commits.
# get the SHA of two commits
git log
# Then get the diff of them, by showing the logs in between
git log -p d8a285c8f83f728be2d056e6d4b0909972789d51..9202ec15da36ca060722c363575e0e390d85fb71
# Since SHAs are pretty unique you can just give it a short version
# and it will try to match what is right:
git log -p d8a28..9202e

Merging git branches

Say you have two local branches, and I want to merge them. If you're on local branch my-latest and I want to merge with local branch my-fix-for-foo, you would do:
git pull . my-fix-for-foo

Checkout code as it was from specific commit

Suppose you want to checkout what the codebase looked like at a specific commit SHA. You can do this with branches.
# Long form:
git checkout -b view-commit-foo d8a285c8f83f728be2d056e6d4b0909972789d51
# Or short form:
git checkout -b view-commit-foo d8a28

Delete branches

If you are fed up with a branch delete it. You must not be on that branch so go into another one.
git checkout master
git branch -D old-branch

No need to download more kernel tarballs

You can simply make your current directory look like a specific tag blessed by Linus (or Linville).
git checkout -b v2.6.27-rc7 v2.6.27-rc7

Generate patches

Say you have 3 commits and you want to send the patches now.
git format-patch --cover-letter -o some-dir d8a285c8f83f728be2d056e6d4b0909972789d51..9202ec15da36ca060722c363575e0e390d85fb71
# this is equivalent to, this is the short form
git format-patch --cover-letter -n -o some-dir d8a28..9202e
Where d8a28 was the last commit before you started hacking and 9202e is the current head, meaning the commit ID of your latest commit.

Generating patches for renames

If you are going to rename files you can add "-M" to the arguments to git-format-patch, this way the patches don't generate useless endless removals and adds for a simple rename.

Fixing patches after review

This section tells you how to deal with fixing patches with git after you have sent them out for review or in case you realize you need to go back in history and edit/fix something.

Fixing a patch or commit message

To fix a patch or commit message you have committed you can simply do:
# Edit the file you forgot to add a fix for, and then
# tell git (-a option) all the files you have edited
# should go into the commit, but that you want it to apply
# to the last commit and you also want to review/edit the
# commit message
git commit -a --amend
If you want to ignore all changes you have pending don't use the "-a" option.

Fixing a series of patches

When you a large set of patches and you are not the maintainer chances are pretty high you'll get feedback and you'll need to respin them. A nice trick to avoid having to use quilt/stgit/etc is to use git to edit the patch back in history and continue then. You can do this with git's rebase.
git rebase -i commit-id-foo
This will let you select which patches you want to edit, once done with editing you will have to add the file you fixed
git add drivers/net/wireless/foo/bar.c
And then amend the commit:
git commit --amend
You can skip the 'git add' part by just using 'git commit -a –amend' but keep in mind this will add into the commit *all* changes in your current diff (git diff).
If you didn't have to remove a commit, let the rebase continue.
git rebase --continue
Keep in mind you will have to edit the patches to deal with conflicts if any were found. To deal with them simply edit the files its complaining about, git add them, and do 'git rebase –continue' once done. The conflicts are marked with a set of "<<<<" in the sections. It'll have part from the original file and the part from the new file. You get to mangle with these to figure out what is the right code.

Annotating new revision

If developers raise issues with your patch you are expected to follow up with another iteration of your patch or series of patches. In your new iteration of patches you should specify that these patches are part of a new iteration. You can do this by specifying the iteration number on the subject. For example, for a second iteration you would use:
[PATCH v2]
You can specify this with git by using an argument to git format-patch:
--subject-prefix="PATCH v2"

Removing a commit from a series

If you want to *remove* a commit you can do this trick:
git rebase -i commit-id-foo
git checkout commit-id-before-change
git rebase --continue

Adding a new commit to the series

If you want to add a new commit to the series simply add the commit using the usual commit procedures. Once you are done continue with the rebase.

Sending patches

Read git-send-email man page. But here is a quick summary for those who just want to get it to work. Keep in mind git send-email is a perl script and is usually shipped separately from git core.
You can install your favorite mailer, one option is to use ssmtp.

Setting up ssmtp

Below is an example config that works with an exchange server, in etc/ssmtp/ssmtp.conf:
root=hacker@company.com
mailhub=smtp.company.com
hostname=smtp.company.com
FromLineOverride=YES

UseSTARTTLS=YES
AuthUser=hacker
AuthPass=my-uber-secret-password
Here is an example /etc/ssmtp/revaliases
user:hacker@company.com:smtp.company.com
hacker:hacker@company.com:smtp.company.com
user can be the username (whoami) on the system.

Sending e-mails

Once you have your mailer setup and patches in a directory, review them so they are correct. Once all done send them out using:
# Note new versions of git use: git send-email
git send-email --no-chain-reply-to --from "Random Developer " --to linville@tuxdriver.com --cc linux-wireless@vger.kernel.org --cc maintainer-of-driver@some-cool.org some-dir/
Where some-dir is where you stashed your patches. Keep in mind that if you are submitting a series it helps to send an introductory PATCH [0/n] as well, where n is the number of patches you want to send. You can add this to the git-send-email queue easily using –cover-letter when generating patches using git-format-patch. Be sure to edit the patch 0000-foo then. git-send-email will pick it up when you specify the directory :)