summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/p54/fwio.c
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@googlemail.com>2011-02-24 16:12:20 +0300
committerJohn W. Linville <linville@tuxdriver.com>2011-02-25 23:32:33 +0300
commit3083e83c86e604ac7005c100b7d7242389407ba5 (patch)
treeeda332de50da769ea0d4fddec5530a6c6edf0c21 /drivers/net/wireless/p54/fwio.c
parent41cae2d01385af4199666db57274c0df3283b065 (diff)
downloadlinux-3083e83c86e604ac7005c100b7d7242389407ba5.tar.xz
p54: implement set_coverage_class
The callback sets slot time as specified in IEEE 802.11-2007 section 17.3.8.6 and raises round trip delay accordingly. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/p54/fwio.c')
-rw-r--r--drivers/net/wireless/p54/fwio.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/p54/fwio.c b/drivers/net/wireless/p54/fwio.c
index 0d3d108f6fe2..2fab7d20ffc2 100644
--- a/drivers/net/wireless/p54/fwio.c
+++ b/drivers/net/wireless/p54/fwio.c
@@ -559,6 +559,7 @@ int p54_set_edcf(struct p54_common *priv)
{
struct sk_buff *skb;
struct p54_edcf *edcf;
+ u8 rtd;
skb = p54_alloc_skb(priv, P54_HDR_FLAG_CONTROL_OPSET, sizeof(*edcf),
P54_CONTROL_TYPE_DCFINIT, GFP_ATOMIC);
@@ -575,9 +576,15 @@ int p54_set_edcf(struct p54_common *priv)
edcf->sifs = 0x0a;
edcf->eofpad = 0x06;
}
+ /*
+ * calculate the extra round trip delay according to the
+ * formula from 802.11-2007 17.3.8.6.
+ */
+ rtd = 3 * priv->coverage_class;
+ edcf->slottime += rtd;
+ edcf->round_trip_delay = cpu_to_le16(rtd);
/* (see prism54/isl_oid.h for further details) */
edcf->frameburst = cpu_to_le16(0);
- edcf->round_trip_delay = cpu_to_le16(0);
edcf->flags = 0;
memset(edcf->mapping, 0, sizeof(edcf->mapping));
memcpy(edcf->queue, priv->qos_params, sizeof(edcf->queue));