Merge branch 'for-davem' of ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
This commit is contained in:
@@ -524,10 +524,13 @@ err_data:
|
||||
|
||||
struct p54_rssi_db_entry *p54_rssi_find(struct p54_common *priv, const u16 freq)
|
||||
{
|
||||
struct p54_rssi_db_entry *entry = (void *)(priv->rssi_db->data +
|
||||
priv->rssi_db->offset);
|
||||
struct p54_rssi_db_entry *entry;
|
||||
int i, found = -1;
|
||||
|
||||
if (!priv->rssi_db)
|
||||
return &p54_rssi_default;
|
||||
|
||||
entry = (void *)(priv->rssi_db->data + priv->rssi_db->offset);
|
||||
for (i = 0; i < priv->rssi_db->entries; i++) {
|
||||
if (!same_band(freq, entry[i].freq))
|
||||
continue;
|
||||
|
@@ -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));
|
||||
|
@@ -526,7 +526,7 @@ int p54_init_leds(struct p54_common *priv);
|
||||
void p54_unregister_leds(struct p54_common *priv);
|
||||
|
||||
/* xmit functions */
|
||||
int p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb);
|
||||
void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb);
|
||||
int p54_tx_cancel(struct p54_common *priv, __le32 req_id);
|
||||
void p54_tx(struct p54_common *priv, struct sk_buff *skb);
|
||||
|
||||
|
@@ -157,7 +157,7 @@ static int p54_beacon_update(struct p54_common *priv,
|
||||
* to cancel the old beacon template by hand, instead the firmware
|
||||
* will release the previous one through the feedback mechanism.
|
||||
*/
|
||||
WARN_ON(p54_tx_80211(priv->hw, beacon));
|
||||
p54_tx_80211(priv->hw, beacon);
|
||||
priv->tsf_high32 = 0;
|
||||
priv->tsf_low32 = 0;
|
||||
|
||||
@@ -566,6 +566,17 @@ static void p54_flush(struct ieee80211_hw *dev, bool drop)
|
||||
WARN(total, "tx flush timeout, unresponsive firmware");
|
||||
}
|
||||
|
||||
static void p54_set_coverage_class(struct ieee80211_hw *dev, u8 coverage_class)
|
||||
{
|
||||
struct p54_common *priv = dev->priv;
|
||||
|
||||
mutex_lock(&priv->conf_mutex);
|
||||
/* support all coverage class values as in 802.11-2007 Table 7-27 */
|
||||
priv->coverage_class = clamp_t(u8, coverage_class, 0, 31);
|
||||
p54_set_edcf(priv);
|
||||
mutex_unlock(&priv->conf_mutex);
|
||||
}
|
||||
|
||||
static const struct ieee80211_ops p54_ops = {
|
||||
.tx = p54_tx_80211,
|
||||
.start = p54_start,
|
||||
@@ -584,6 +595,7 @@ static const struct ieee80211_ops p54_ops = {
|
||||
.conf_tx = p54_conf_tx,
|
||||
.get_stats = p54_get_stats,
|
||||
.get_survey = p54_get_survey,
|
||||
.set_coverage_class = p54_set_coverage_class,
|
||||
};
|
||||
|
||||
struct ieee80211_hw *p54_init_common(size_t priv_data_len)
|
||||
|
@@ -217,6 +217,7 @@ struct p54_common {
|
||||
u32 tsf_low32, tsf_high32;
|
||||
u32 basic_rate_mask;
|
||||
u16 aid;
|
||||
u8 coverage_class;
|
||||
bool powersave_override;
|
||||
__le32 beacon_req_id;
|
||||
struct completion beacon_comp;
|
||||
|
@@ -367,7 +367,7 @@ static int p54_rx_data(struct p54_common *priv, struct sk_buff *skb)
|
||||
rx_status->mactime = ((u64)priv->tsf_high32) << 32 | tsf32;
|
||||
priv->tsf_low32 = tsf32;
|
||||
|
||||
rx_status->flag |= RX_FLAG_TSFT;
|
||||
rx_status->flag |= RX_FLAG_MACTIME_MPDU;
|
||||
|
||||
if (hdr->flags & cpu_to_le16(P54_HDR_FLAG_DATA_ALIGN))
|
||||
header_len += hdr->align[0];
|
||||
@@ -696,7 +696,7 @@ static u8 p54_convert_algo(u32 cipher)
|
||||
}
|
||||
}
|
||||
|
||||
int p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb)
|
||||
void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb)
|
||||
{
|
||||
struct p54_common *priv = dev->priv;
|
||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
||||
@@ -717,12 +717,8 @@ int p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb)
|
||||
&hdr_flags, &aid, &burst_allowed);
|
||||
|
||||
if (p54_tx_qos_accounting_alloc(priv, skb, queue)) {
|
||||
if (!IS_QOS_QUEUE(queue)) {
|
||||
dev_kfree_skb_any(skb);
|
||||
return NETDEV_TX_OK;
|
||||
} else {
|
||||
return NETDEV_TX_BUSY;
|
||||
}
|
||||
dev_kfree_skb_any(skb);
|
||||
return;
|
||||
}
|
||||
|
||||
padding = (unsigned long)(skb->data - (sizeof(*hdr) + sizeof(*txhdr))) & 3;
|
||||
@@ -865,5 +861,4 @@ int p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb)
|
||||
p54info->extra_len = extra_len;
|
||||
|
||||
p54_tx(priv, skb);
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
Reference in New Issue
Block a user