Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314075
b: refs/heads/master
c: ebc7e57
h: refs/heads/master
i:
  314073: 3f2e25a
  314071: 786e6d2
v: v3
  • Loading branch information
Arik Nemtsov authored and Luciano Coelho committed Jun 5, 2012
1 parent e8718dd commit 5392cf6
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 2 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: b3a47ee0ec07b16f68c38052e8cd1b5cb417bdca
refs/heads/master: ebc7e57ddd01ffa4c996dde7095746259693755d
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ti/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1315,6 +1315,7 @@ static struct wlcore_ops wl12xx_ops = {
.get_mac = wl12xx_get_mac,
.set_tx_desc_csum = wl12xx_set_tx_desc_csum,
.set_rx_csum = NULL,
.ap_get_mimo_wide_rate_mask = NULL,
};

static struct ieee80211_sta_ht_cap wl12xx_ht_cap = {
Expand Down
14 changes: 14 additions & 0 deletions trunk/drivers/net/wireless/ti/wl18xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,19 @@ static u32 wl18xx_sta_get_ap_rate_mask(struct wl1271 *wl,
return hw_rate_set;
}

static u32 wl18xx_ap_get_mimo_wide_rate_mask(struct wl1271 *wl,
struct wl12xx_vif *wlvif)
{
if (wlvif->channel_type == NL80211_CHAN_HT40MINUS ||
wlvif->channel_type == NL80211_CHAN_HT40PLUS) {
wl1271_debug(DEBUG_ACX, "using wide channel rate mask");
return CONF_TX_RATE_USE_WIDE_CHAN;
} else {
wl1271_debug(DEBUG_ACX, "using MIMO rate mask");
return CONF_TX_MIMO_RATES;
}
}

static void wl18xx_conf_init(struct wl1271 *wl)
{
struct wl18xx_priv *priv = wl->priv;
Expand Down Expand Up @@ -906,6 +919,7 @@ static struct wlcore_ops wl18xx_ops = {
.set_tx_desc_csum = wl18xx_set_tx_desc_csum,
.set_rx_csum = wl18xx_set_rx_csum,
.sta_get_ap_rate_mask = wl18xx_sta_get_ap_rate_mask,
.ap_get_mimo_wide_rate_mask = wl18xx_ap_get_mimo_wide_rate_mask,
};

int __devinit wl18xx_probe(struct platform_device *pdev)
Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/net/wireless/ti/wlcore/hw_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,14 @@ wlcore_hw_set_rx_csum(struct wl1271 *wl,
wl->ops->set_rx_csum(wl, desc, skb);
}

static inline u32
wlcore_hw_ap_get_mimo_wide_rate_mask(struct wl1271 *wl,
struct wl12xx_vif *wlvif)
{
if (wl->ops->ap_get_mimo_wide_rate_mask)
return wl->ops->ap_get_mimo_wide_rate_mask(wl, wlvif);

return 0;
}

#endif
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/ti/wlcore/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,9 @@ int wl1271_init_ap_rates(struct wl1271 *wl, struct wl12xx_vif *wlvif)
/* unconditionally enable HT rates */
supported_rates |= CONF_TX_MCS_RATES;

/* get extra MIMO or wide-chan rates where the HW supports it */
supported_rates |= wlcore_hw_ap_get_mimo_wide_rate_mask(wl, wlvif);

/* configure unicast TX rate classes */
for (i = 0; i < wl->conf.tx.ac_conf_count; i++) {
rc.enabled_rates = supported_rates;
Expand Down
7 changes: 6 additions & 1 deletion trunk/drivers/net/wireless/ti/wlcore/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2479,7 +2479,12 @@ static int wl12xx_config_vif(struct wl1271 *wl, struct wl12xx_vif *wlvif,
wlvif->channel = channel;
wlvif->channel_type = conf->channel_type;

if (!is_ap) {
if (is_ap) {
ret = wl1271_init_ap_rates(wl, wlvif);
if (ret < 0)
wl1271_error("AP rate policy change failed %d",
ret);
} else {
/*
* FIXME: the mac80211 should really provide a fixed
* rate to use here. for now, just use the smallest
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/ti/wlcore/wlcore.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ struct wlcore_ops {
void (*set_rx_csum)(struct wl1271 *wl,
struct wl1271_rx_descriptor *desc,
struct sk_buff *skb);
u32 (*ap_get_mimo_wide_rate_mask)(struct wl1271 *wl,
struct wl12xx_vif *wlvif);
};

enum wlcore_partitions {
Expand Down

0 comments on commit 5392cf6

Please sign in to comment.