aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtl8180_rtl8225.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-01-24 13:38:38 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:19:32 -0500
commit8318d78a44d49ac1edf2bdec7299de3617c4232e (patch)
treed434634418edd7399737801615d247be06616fdd /drivers/net/wireless/rtl8180_rtl8225.c
parent10b6b80145cc93887dd8aab99bfffa375e9add31 (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/rtl8180_rtl8225.c')
-rw-r--r--drivers/net/wireless/rtl8180_rtl8225.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/wireless/rtl8180_rtl8225.c b/drivers/net/wireless/rtl8180_rtl8225.c
index ef3832bee85c..cd22781728a9 100644
--- a/drivers/net/wireless/rtl8180_rtl8225.c
+++ b/drivers/net/wireless/rtl8180_rtl8225.c
@@ -261,8 +261,8 @@ static void rtl8225_rf_set_tx_power(struct ieee80211_hw *dev, int channel)
261 u32 reg; 261 u32 reg;
262 int i; 262 int i;
263 263
264 cck_power = priv->channels[channel - 1].val & 0xFF; 264 cck_power = priv->channels[channel - 1].hw_value & 0xFF;
265 ofdm_power = priv->channels[channel - 1].val >> 8; 265 ofdm_power = priv->channels[channel - 1].hw_value >> 8;
266 266
267 cck_power = min(cck_power, (u8)35); 267 cck_power = min(cck_power, (u8)35);
268 ofdm_power = min(ofdm_power, (u8)35); 268 ofdm_power = min(ofdm_power, (u8)35);
@@ -476,8 +476,8 @@ static void rtl8225z2_rf_set_tx_power(struct ieee80211_hw *dev, int channel)
476 const u8 *tmp; 476 const u8 *tmp;
477 int i; 477 int i;
478 478
479 cck_power = priv->channels[channel - 1].val & 0xFF; 479 cck_power = priv->channels[channel - 1].hw_value & 0xFF;
480 ofdm_power = priv->channels[channel - 1].val >> 8; 480 ofdm_power = priv->channels[channel - 1].hw_value >> 8;
481 481
482 if (channel == 14) 482 if (channel == 14)
483 tmp = rtl8225z2_tx_power_cck_ch14; 483 tmp = rtl8225z2_tx_power_cck_ch14;
@@ -716,13 +716,14 @@ static void rtl8225_rf_set_channel(struct ieee80211_hw *dev,
716 struct ieee80211_conf *conf) 716 struct ieee80211_conf *conf)
717{ 717{
718 struct rtl8180_priv *priv = dev->priv; 718 struct rtl8180_priv *priv = dev->priv;
719 int chan = ieee80211_frequency_to_channel(conf->channel->center_freq);
719 720
720 if (priv->rf->init == rtl8225_rf_init) 721 if (priv->rf->init == rtl8225_rf_init)
721 rtl8225_rf_set_tx_power(dev, conf->channel); 722 rtl8225_rf_set_tx_power(dev, chan);
722 else 723 else
723 rtl8225z2_rf_set_tx_power(dev, conf->channel); 724 rtl8225z2_rf_set_tx_power(dev, chan);
724 725
725 rtl8225_write(dev, 0x7, rtl8225_chan[conf->channel - 1]); 726 rtl8225_write(dev, 0x7, rtl8225_chan[chan - 1]);
726 msleep(10); 727 msleep(10);
727 728
728 if (conf->flags & IEEE80211_CONF_SHORT_SLOT_TIME) { 729 if (conf->flags & IEEE80211_CONF_SHORT_SLOT_TIME) {