Saturday, September 1, 2012

Comparison of 802.11n and legacy (non 802.11n) beacons

In terms of sheer size the 802.11n beacons are almost 4 times as large at about 225bytes, while the legacy beacons are usually only 62bytes.

This big difference is due to the HT (high throughput) information element (IE) in the new beacon. This contains all the information relating to the HT features supported by this 11n AP. For example it will include information about the max. AMPDU and AMSDUs supported by this AP.

The second HT IE is known as the extended information element. It provides information like whether the secondary channel is above or below the primary channel.

With 802.11ac, the beacon sizes have grown even more. Additional IEs are now supported for different other features which result in the beacon becoming relatively large.

Friday, August 31, 2012

What does IRQ save do in Linux?


Use local_irq_save to disable interrupts on the local processor and remember their previous state. The flags can be passed to local_irq_restore to restore the previous interrupt state.


void local_irq_save(unsigned long flags);
void local_irq_restore(unsigned long flags);

The spinlock version will disable interrupts on all the cores*


What is a gratuitous ARP?

ARP may also be used as a simple announcement protocol. This is useful for updating other hosts' mapping of a hardware address when the sender's IP address or MAC address has changed. Such an announcement, also called a gratuitous ARP message, is usually broadcast as an ARP request containing the sender's protocol address (SPA) in the target field (TPA=SPA), with the target hardware address (THA) set to zero. An alternative is to broadcast an ARP reply with the sender's hardware and protocol addresses (SHA and SPA) duplicated in the target fields (TPA=SPA, THA=SHA).
An ARP announcement is not intended to solicit a reply; instead it updates any cached entries in the ARP tables of other hosts that receive the packet. The operation code may indicate a request or a reply because the ARP standard specifies that the opcode is only processed after the ARP table has been updated from the address fields.
Many operating systems perform gratuitous ARP during startup. That helps to resolve problems which would otherwise occur if, for example, a network card was recently changed (changing the IP-address-to-MAC-address mapping) and other hosts still have the old mapping in their ARP caches.
Gratuitous ARP is also used by some interface drivers to provide load balancing for incoming traffic. In a team of network cards, it is used to announce a different MAC address within the team that should receive incoming packets.