wireless: rename ht_info to ht_operation

Since some of the HT code pre-dates 802.11n-2009
some names are wrong. The one that bothers me most
is that "HT operation" is called "HT information"
in our code and that causes confusion.

Rename "HT information" to "HT operation" and also
the control_chan field to primary_chan to match
the name used in the spec.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
mac80211: fix the sparse warnings on endian handling in RANN propagation

The HWMP sequence number of received RANN element is compared to decide whether to be
propagated. The sequence number is required to covert from 32bit little endian data into
CPUs endianness for comparison. The same applies to the RANN metric.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
mac80211: Implement mesh synchronization framework

This patch adds MBSS extensible synchronization framework (Sec.
13.13.2 of IEEE Std. 802.11-2012).

The framework is implemented via an ops table which defines the
following functions:

    rx_bcn_presp() - this is called every time a mesh beacon is
received.
    adjust_tbtt() - this is called immediately before a beacon is about
to be transmitted.

The default neighbor offset synchronization defined in the standard is
implemented.  We also provide template functions for vendor specific
methods.

When neighbor offset synchronization is active (which is the default)
mesh neighbors in the same MBSS will track timing offsets to each other
and compensate clock drift.

In our tests we observed that this mesh synchronization implementation
successfully corrected drifts between stations of ~2PPM while
introducing a jitter of ~20us.

It is also possible to test this framework on mac80211_hwsim simulated
phys to see how it behaves under different topologies, over poor links,
etc.

Signed-off-by: Marco Porsch <marco.porsch@s2005.tu-chemnitz.de>
Signed-off-by: Pavel Zubarev <pavel.zubarev@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
mac80211: Set the correct values for hwmp (1) and airtimeLinkMetric (1)

Per sections 8.4.2.100.2 and 8.4.2.100.3 of Std 802.11-2012

Reported-by: Shinichi Hotori <hotorinn@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Merge branch 'master' of git://github.com/chunkeey/carl9170fw
Merge branch 'master' of git://github.com/chunkeey/carl9170fw
Merge branch 'master' of git://github.com/chunkeey/carl9170fw
Merge branch 'master' of git://github.com/chunkeey/carl9170fw
Merge branch 'master' of git://github.com/chunkeey/carl9170fw
Merge branch 'master' of git://github.com/chunkeey/carl9170fw
Merge branch 'master' of git://github.com/chunkeey/carl9170fw
Merge branch 'master' of git://github.com/chunkeey/carl9170fw
Merge branch 'master' of git://github.com/chunkeey/carl9170fw
Merge branch 'master' of git://github.com/chunkeey/carl9170fw
Merge branch 'master' of git://github.com/chunkeey/carl9170fw
Merge branch 'master' of git://github.com/chunkeey/carl9170fw
Merge branch 'master' of git://github.com/chunkeey/carl9170fw
Merge branch 'master' of git://github.com/chunkeey/carl9170fw
Merge branch 'master' of git://github.com/chunkeey/carl9170fw
Merge branch 'master' of git://github.com/chunkeey/carl9170fw