Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121587
b: refs/heads/master
c: 6476107
h: refs/heads/master
i:
  121585: b350c0a
  121583: e95efc1
v: v3
  • Loading branch information
Herton Ronaldo Krzesinski authored and John W. Linville committed Oct 31, 2008
1 parent 5f2fa27 commit 96b3537
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da966bcae70e4012b7d999820b728dd6502047e0
refs/heads/master: 64761077f815660276f69b497edb9842d880df9a
46 changes: 30 additions & 16 deletions trunk/drivers/net/wireless/rtl8187_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,22 +877,6 @@ static int rtl8187_config(struct ieee80211_hw *dev, u32 changed)
msleep(10);
rtl818x_iowrite32(priv, &priv->map->TX_CONF, reg);

if (!priv->is_rtl8187b) {
rtl818x_iowrite8(priv, &priv->map->SIFS, 0x22);

if (conf->flags & IEEE80211_CONF_SHORT_SLOT_TIME) {
rtl818x_iowrite8(priv, &priv->map->SLOT, 0x9);
rtl818x_iowrite8(priv, &priv->map->DIFS, 0x14);
rtl818x_iowrite8(priv, &priv->map->EIFS, 91 - 0x14);
rtl818x_iowrite8(priv, &priv->map->CW_VAL, 0x73);
} else {
rtl818x_iowrite8(priv, &priv->map->SLOT, 0x14);
rtl818x_iowrite8(priv, &priv->map->DIFS, 0x24);
rtl818x_iowrite8(priv, &priv->map->EIFS, 91 - 0x24);
rtl818x_iowrite8(priv, &priv->map->CW_VAL, 0xa5);
}
}

rtl818x_iowrite16(priv, &priv->map->ATIM_WND, 2);
rtl818x_iowrite16(priv, &priv->map->ATIMTR_INTERVAL, 100);
rtl818x_iowrite16(priv, &priv->map->BEACON_INTERVAL, 100);
Expand Down Expand Up @@ -927,6 +911,35 @@ static int rtl8187_config_interface(struct ieee80211_hw *dev,
return 0;
}

static void rtl8187_conf_erp(struct rtl8187_priv *priv, bool use_short_slot)
{
if (!priv->is_rtl8187b) {
rtl818x_iowrite8(priv, &priv->map->SIFS, 0x22);
if (use_short_slot) {
rtl818x_iowrite8(priv, &priv->map->SLOT, 0x9);
rtl818x_iowrite8(priv, &priv->map->DIFS, 0x14);
rtl818x_iowrite8(priv, &priv->map->EIFS, 91 - 0x14);
rtl818x_iowrite8(priv, &priv->map->CW_VAL, 0x73);
} else {
rtl818x_iowrite8(priv, &priv->map->SLOT, 0x14);
rtl818x_iowrite8(priv, &priv->map->DIFS, 0x24);
rtl818x_iowrite8(priv, &priv->map->EIFS, 91 - 0x24);
rtl818x_iowrite8(priv, &priv->map->CW_VAL, 0xa5);
}
}
}

static void rtl8187_bss_info_changed(struct ieee80211_hw *dev,
struct ieee80211_vif *vif,
struct ieee80211_bss_conf *info,
u32 changed)
{
struct rtl8187_priv *priv = dev->priv;

if (changed & BSS_CHANGED_ERP_SLOT)
rtl8187_conf_erp(priv, info->use_short_slot);
}

static void rtl8187_configure_filter(struct ieee80211_hw *dev,
unsigned int changed_flags,
unsigned int *total_flags,
Expand Down Expand Up @@ -967,6 +980,7 @@ static const struct ieee80211_ops rtl8187_ops = {
.remove_interface = rtl8187_remove_interface,
.config = rtl8187_config,
.config_interface = rtl8187_config_interface,
.bss_info_changed = rtl8187_bss_info_changed,
.configure_filter = rtl8187_configure_filter,
};

Expand Down

0 comments on commit 96b3537

Please sign in to comment.