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 /drivers/net/wireless/adm8211.h | |
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 'drivers/net/wireless/adm8211.h')
-rw-r--r-- | drivers/net/wireless/adm8211.h | 65 |
1 files changed, 7 insertions, 58 deletions
diff --git a/drivers/net/wireless/adm8211.h b/drivers/net/wireless/adm8211.h index ef326fed42e4..8d7c564b3b04 100644 --- a/drivers/net/wireless/adm8211.h +++ b/drivers/net/wireless/adm8211.h | |||
@@ -534,61 +534,6 @@ struct adm8211_eeprom { | |||
534 | u8 cis_data[0]; /* 0x80, 384 bytes */ | 534 | u8 cis_data[0]; /* 0x80, 384 bytes */ |
535 | } __attribute__ ((packed)); | 535 | } __attribute__ ((packed)); |
536 | 536 | ||
537 | static const struct ieee80211_rate adm8211_rates[] = { | ||
538 | { .rate = 10, | ||
539 | .val = 10, | ||
540 | .val2 = -10, | ||
541 | .flags = IEEE80211_RATE_CCK_2 }, | ||
542 | { .rate = 20, | ||
543 | .val = 20, | ||
544 | .val2 = -20, | ||
545 | .flags = IEEE80211_RATE_CCK_2 }, | ||
546 | { .rate = 55, | ||
547 | .val = 55, | ||
548 | .val2 = -55, | ||
549 | .flags = IEEE80211_RATE_CCK_2 }, | ||
550 | { .rate = 110, | ||
551 | .val = 110, | ||
552 | .val2 = -110, | ||
553 | .flags = IEEE80211_RATE_CCK_2 } | ||
554 | }; | ||
555 | |||
556 | struct ieee80211_chan_range { | ||
557 | u8 min; | ||
558 | u8 max; | ||
559 | }; | ||
560 | |||
561 | static const struct ieee80211_channel adm8211_channels[] = { | ||
562 | { .chan = 1, | ||
563 | .freq = 2412}, | ||
564 | { .chan = 2, | ||
565 | .freq = 2417}, | ||
566 | { .chan = 3, | ||
567 | .freq = 2422}, | ||
568 | { .chan = 4, | ||
569 | .freq = 2427}, | ||
570 | { .chan = 5, | ||
571 | .freq = 2432}, | ||
572 | { .chan = 6, | ||
573 | .freq = 2437}, | ||
574 | { .chan = 7, | ||
575 | .freq = 2442}, | ||
576 | { .chan = 8, | ||
577 | .freq = 2447}, | ||
578 | { .chan = 9, | ||
579 | .freq = 2452}, | ||
580 | { .chan = 10, | ||
581 | .freq = 2457}, | ||
582 | { .chan = 11, | ||
583 | .freq = 2462}, | ||
584 | { .chan = 12, | ||
585 | .freq = 2467}, | ||
586 | { .chan = 13, | ||
587 | .freq = 2472}, | ||
588 | { .chan = 14, | ||
589 | .freq = 2484}, | ||
590 | }; | ||
591 | |||
592 | struct adm8211_priv { | 537 | struct adm8211_priv { |
593 | struct pci_dev *pdev; | 538 | struct pci_dev *pdev; |
594 | spinlock_t lock; | 539 | spinlock_t lock; |
@@ -603,9 +548,8 @@ struct adm8211_priv { | |||
603 | unsigned int cur_tx, dirty_tx, cur_rx; | 548 | unsigned int cur_tx, dirty_tx, cur_rx; |
604 | 549 | ||
605 | struct ieee80211_low_level_stats stats; | 550 | struct ieee80211_low_level_stats stats; |
606 | struct ieee80211_hw_mode modes[1]; | 551 | struct ieee80211_supported_band band; |
607 | struct ieee80211_channel channels[ARRAY_SIZE(adm8211_channels)]; | 552 | struct ieee80211_channel channels[14]; |
608 | struct ieee80211_rate rates[ARRAY_SIZE(adm8211_rates)]; | ||
609 | int mode; | 553 | int mode; |
610 | 554 | ||
611 | int channel; | 555 | int channel; |
@@ -643,6 +587,11 @@ struct adm8211_priv { | |||
643 | } transceiver_type; | 587 | } transceiver_type; |
644 | }; | 588 | }; |
645 | 589 | ||
590 | struct ieee80211_chan_range { | ||
591 | u8 min; | ||
592 | u8 max; | ||
593 | }; | ||
594 | |||
646 | static const struct ieee80211_chan_range cranges[] = { | 595 | static const struct ieee80211_chan_range cranges[] = { |
647 | {1, 11}, /* FCC */ | 596 | {1, 11}, /* FCC */ |
648 | {1, 11}, /* IC */ | 597 | {1, 11}, /* IC */ |