diff options
author | Herton Ronaldo Krzesinski <herton@mandriva.com.br> | 2008-10-13 14:10:59 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-10-31 19:00:18 -0400 |
commit | 64761077f815660276f69b497edb9842d880df9a (patch) | |
tree | a7b5f6c0bd9f901ee57f9353b13c732f864ff8e8 /drivers | |
parent | da966bcae70e4012b7d999820b728dd6502047e0 (diff) |
rtl8187: adapt for deprecated IEEE80211_CONF_SHORT_SLOT_TIME flag
This updates 8187L handling for short slot after "mac80211: fix short
slot handling". For 8187B, there was no handling done for short slot
timing so nothing done, support for it will come in a following patch.
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/rtl8187_dev.c | 46 |
1 files changed, 30 insertions, 16 deletions
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c index b211a5154289..991d65c27088 100644 --- a/drivers/net/wireless/rtl8187_dev.c +++ b/drivers/net/wireless/rtl8187_dev.c | |||
@@ -877,22 +877,6 @@ static int rtl8187_config(struct ieee80211_hw *dev, u32 changed) | |||
877 | msleep(10); | 877 | msleep(10); |
878 | rtl818x_iowrite32(priv, &priv->map->TX_CONF, reg); | 878 | rtl818x_iowrite32(priv, &priv->map->TX_CONF, reg); |
879 | 879 | ||
880 | if (!priv->is_rtl8187b) { | ||
881 | rtl818x_iowrite8(priv, &priv->map->SIFS, 0x22); | ||
882 | |||
883 | if (conf->flags & IEEE80211_CONF_SHORT_SLOT_TIME) { | ||
884 | rtl818x_iowrite8(priv, &priv->map->SLOT, 0x9); | ||
885 | rtl818x_iowrite8(priv, &priv->map->DIFS, 0x14); | ||
886 | rtl818x_iowrite8(priv, &priv->map->EIFS, 91 - 0x14); | ||
887 | rtl818x_iowrite8(priv, &priv->map->CW_VAL, 0x73); | ||
888 | } else { | ||
889 | rtl818x_iowrite8(priv, &priv->map->SLOT, 0x14); | ||
890 | rtl818x_iowrite8(priv, &priv->map->DIFS, 0x24); | ||
891 | rtl818x_iowrite8(priv, &priv->map->EIFS, 91 - 0x24); | ||
892 | rtl818x_iowrite8(priv, &priv->map->CW_VAL, 0xa5); | ||
893 | } | ||
894 | } | ||
895 | |||
896 | rtl818x_iowrite16(priv, &priv->map->ATIM_WND, 2); | 880 | rtl818x_iowrite16(priv, &priv->map->ATIM_WND, 2); |
897 | rtl818x_iowrite16(priv, &priv->map->ATIMTR_INTERVAL, 100); | 881 | rtl818x_iowrite16(priv, &priv->map->ATIMTR_INTERVAL, 100); |
898 | rtl818x_iowrite16(priv, &priv->map->BEACON_INTERVAL, 100); | 882 | rtl818x_iowrite16(priv, &priv->map->BEACON_INTERVAL, 100); |
@@ -927,6 +911,35 @@ static int rtl8187_config_interface(struct ieee80211_hw *dev, | |||
927 | return 0; | 911 | return 0; |
928 | } | 912 | } |
929 | 913 | ||
914 | static void rtl8187_conf_erp(struct rtl8187_priv *priv, bool use_short_slot) | ||
915 | { | ||
916 | if (!priv->is_rtl8187b) { | ||
917 | rtl818x_iowrite8(priv, &priv->map->SIFS, 0x22); | ||
918 | if (use_short_slot) { | ||
919 | rtl818x_iowrite8(priv, &priv->map->SLOT, 0x9); | ||
920 | rtl818x_iowrite8(priv, &priv->map->DIFS, 0x14); | ||
921 | rtl818x_iowrite8(priv, &priv->map->EIFS, 91 - 0x14); | ||
922 | rtl818x_iowrite8(priv, &priv->map->CW_VAL, 0x73); | ||
923 | } else { | ||
924 | rtl818x_iowrite8(priv, &priv->map->SLOT, 0x14); | ||
925 | rtl818x_iowrite8(priv, &priv->map->DIFS, 0x24); | ||
926 | rtl818x_iowrite8(priv, &priv->map->EIFS, 91 - 0x24); | ||
927 | rtl818x_iowrite8(priv, &priv->map->CW_VAL, 0xa5); | ||
928 | } | ||
929 | } | ||
930 | } | ||
931 | |||
932 | static void rtl8187_bss_info_changed(struct ieee80211_hw *dev, | ||
933 | struct ieee80211_vif *vif, | ||
934 | struct ieee80211_bss_conf *info, | ||
935 | u32 changed) | ||
936 | { | ||
937 | struct rtl8187_priv *priv = dev->priv; | ||
938 | |||
939 | if (changed & BSS_CHANGED_ERP_SLOT) | ||
940 | rtl8187_conf_erp(priv, info->use_short_slot); | ||
941 | } | ||
942 | |||
930 | static void rtl8187_configure_filter(struct ieee80211_hw *dev, | 943 | static void rtl8187_configure_filter(struct ieee80211_hw *dev, |
931 | unsigned int changed_flags, | 944 | unsigned int changed_flags, |
932 | unsigned int *total_flags, | 945 | unsigned int *total_flags, |
@@ -967,6 +980,7 @@ static const struct ieee80211_ops rtl8187_ops = { | |||
967 | .remove_interface = rtl8187_remove_interface, | 980 | .remove_interface = rtl8187_remove_interface, |
968 | .config = rtl8187_config, | 981 | .config = rtl8187_config, |
969 | .config_interface = rtl8187_config_interface, | 982 | .config_interface = rtl8187_config_interface, |
983 | .bss_info_changed = rtl8187_bss_info_changed, | ||
970 | .configure_filter = rtl8187_configure_filter, | 984 | .configure_filter = rtl8187_configure_filter, |
971 | }; | 985 | }; |
972 | 986 | ||