diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-01-24 13:38:38 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-02-29 15:19:32 -0500 |
commit | 8318d78a44d49ac1edf2bdec7299de3617c4232e (patch) | |
tree | d434634418edd7399737801615d247be06616fdd /net/mac80211/cfg.c | |
parent | 10b6b80145cc93887dd8aab99bfffa375e9add31 (diff) |
cfg80211 API for channels/bitrates, mac80211 and driver conversion
This patch creates new cfg80211 wiphy API for channel and bitrate
registration and converts mac80211 and drivers to the new API. The
old mac80211 API is completely ripped out. All drivers (except ath5k)
are updated to the new API, in many cases I expect that optimisations
can be done.
Along with the regulatory code I've also ripped out the
IEEE80211_HW_DEFAULT_REG_DOMAIN_CONFIGURED flag, I believe it to be
unnecessary if the hardware simply gives us whatever channels it wants
to support and we then enable/disable them as required, which is pretty
much required for travelling.
Additionally, the patch adds proper "basic" rate handling for STA
mode interface, AP mode interface will have to have new API added
to allow userspace to set the basic rate set, currently it'll be
empty... However, the basic rate handling will need to be moved to
the BSS conf stuff.
I do expect there to be bugs in this, especially wrt. transmit
power handling where I'm basically clueless about how it should work.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 22c9619ba776..15b8cf94f510 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -498,7 +498,7 @@ static void sta_apply_parameters(struct ieee80211_local *local, | |||
498 | { | 498 | { |
499 | u32 rates; | 499 | u32 rates; |
500 | int i, j; | 500 | int i, j; |
501 | struct ieee80211_hw_mode *mode; | 501 | struct ieee80211_supported_band *sband; |
502 | 502 | ||
503 | if (params->station_flags & STATION_FLAG_CHANGED) { | 503 | if (params->station_flags & STATION_FLAG_CHANGED) { |
504 | sta->flags &= ~WLAN_STA_AUTHORIZED; | 504 | sta->flags &= ~WLAN_STA_AUTHORIZED; |
@@ -525,15 +525,16 @@ static void sta_apply_parameters(struct ieee80211_local *local, | |||
525 | 525 | ||
526 | if (params->supported_rates) { | 526 | if (params->supported_rates) { |
527 | rates = 0; | 527 | rates = 0; |
528 | mode = local->oper_hw_mode; | 528 | sband = local->hw.wiphy->bands[local->oper_channel->band]; |
529 | |||
529 | for (i = 0; i < params->supported_rates_len; i++) { | 530 | for (i = 0; i < params->supported_rates_len; i++) { |
530 | int rate = (params->supported_rates[i] & 0x7f) * 5; | 531 | int rate = (params->supported_rates[i] & 0x7f) * 5; |
531 | for (j = 0; j < mode->num_rates; j++) { | 532 | for (j = 0; j < sband->n_bitrates; j++) { |
532 | if (mode->rates[j].rate == rate) | 533 | if (sband->bitrates[j].bitrate == rate) |
533 | rates |= BIT(j); | 534 | rates |= BIT(j); |
534 | } | 535 | } |
535 | } | 536 | } |
536 | sta->supp_rates = rates; | 537 | sta->supp_rates[local->oper_channel->band] = rates; |
537 | } | 538 | } |
538 | } | 539 | } |
539 | 540 | ||