diff options
author | Christian Lamparter <chunkeey@web.de> | 2008-12-14 09:05:42 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-12-19 15:23:19 -0500 |
commit | 0a5ec96ad68516582023a877aceff9db7636d141 (patch) | |
tree | 8a8346aabff7306d2b13a36d756f14000e629595 /drivers/net/wireless/p54/p54common.c | |
parent | 69ba3e5d74a467a64248cd90ccafb524b1fddcb5 (diff) |
p54: remove free_on_tx parameter
This patch simplifies the tx code a bit and will be necessary for
the upcoming stlc45xx<->p54 port.
In detail: we no longer have to tell all back-end drivers directly,
if we want to free a frame right after it was send to the firmware,
or if we do it in the library callback later.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/p54/p54common.c')
-rw-r--r-- | drivers/net/wireless/p54/p54common.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c index 05eb677aa3e1..82354b974a04 100644 --- a/drivers/net/wireless/p54/p54common.c +++ b/drivers/net/wireless/p54/p54common.c | |||
@@ -683,7 +683,7 @@ void p54_free_skb(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
683 | freed = priv->rx_end - last_addr; | 683 | freed = priv->rx_end - last_addr; |
684 | __skb_unlink(skb, &priv->tx_queue); | 684 | __skb_unlink(skb, &priv->tx_queue); |
685 | spin_unlock_irqrestore(&priv->tx_queue.lock, flags); | 685 | spin_unlock_irqrestore(&priv->tx_queue.lock, flags); |
686 | kfree_skb(skb); | 686 | dev_kfree_skb_any(skb); |
687 | 687 | ||
688 | if (freed >= priv->headroom + sizeof(struct p54_hdr) + 48 + | 688 | if (freed >= priv->headroom + sizeof(struct p54_hdr) + 48 + |
689 | IEEE80211_MAX_RTS_THRESHOLD + priv->tailroom) | 689 | IEEE80211_MAX_RTS_THRESHOLD + priv->tailroom) |
@@ -1088,7 +1088,7 @@ int p54_read_eeprom(struct ieee80211_hw *dev) | |||
1088 | eeprom_hdr->v2.magic2 = 0xf; | 1088 | eeprom_hdr->v2.magic2 = 0xf; |
1089 | memcpy(eeprom_hdr->v2.magic, (const char *)"LOCK", 4); | 1089 | memcpy(eeprom_hdr->v2.magic, (const char *)"LOCK", 4); |
1090 | } | 1090 | } |
1091 | priv->tx(dev, skb, 0); | 1091 | priv->tx(dev, skb); |
1092 | 1092 | ||
1093 | if (!wait_for_completion_interruptible_timeout(&priv->eeprom_comp, HZ)) { | 1093 | if (!wait_for_completion_interruptible_timeout(&priv->eeprom_comp, HZ)) { |
1094 | printk(KERN_ERR "%s: device does not respond!\n", | 1094 | printk(KERN_ERR "%s: device does not respond!\n", |
@@ -1129,7 +1129,7 @@ static int p54_set_tim(struct ieee80211_hw *dev, struct ieee80211_sta *sta, | |||
1129 | tim = (struct p54_tim *) skb_put(skb, sizeof(*tim)); | 1129 | tim = (struct p54_tim *) skb_put(skb, sizeof(*tim)); |
1130 | tim->count = 1; | 1130 | tim->count = 1; |
1131 | tim->entry[0] = cpu_to_le16(set ? (sta->aid | 0x8000) : sta->aid); | 1131 | tim->entry[0] = cpu_to_le16(set ? (sta->aid | 0x8000) : sta->aid); |
1132 | priv->tx(dev, skb, 1); | 1132 | priv->tx(dev, skb); |
1133 | return 0; | 1133 | return 0; |
1134 | } | 1134 | } |
1135 | 1135 | ||
@@ -1147,7 +1147,7 @@ static int p54_sta_unlock(struct ieee80211_hw *dev, u8 *addr) | |||
1147 | 1147 | ||
1148 | sta = (struct p54_sta_unlock *)skb_put(skb, sizeof(*sta)); | 1148 | sta = (struct p54_sta_unlock *)skb_put(skb, sizeof(*sta)); |
1149 | memcpy(sta->addr, addr, ETH_ALEN); | 1149 | memcpy(sta->addr, addr, ETH_ALEN); |
1150 | priv->tx(dev, skb, 1); | 1150 | priv->tx(dev, skb); |
1151 | return 0; | 1151 | return 0; |
1152 | } | 1152 | } |
1153 | 1153 | ||
@@ -1190,7 +1190,7 @@ static int p54_tx_cancel(struct ieee80211_hw *dev, struct sk_buff *entry) | |||
1190 | hdr = (void *)entry->data; | 1190 | hdr = (void *)entry->data; |
1191 | cancel = (struct p54_txcancel *)skb_put(skb, sizeof(*cancel)); | 1191 | cancel = (struct p54_txcancel *)skb_put(skb, sizeof(*cancel)); |
1192 | cancel->req_id = hdr->req_id; | 1192 | cancel->req_id = hdr->req_id; |
1193 | priv->tx(dev, skb, 1); | 1193 | priv->tx(dev, skb); |
1194 | return 0; | 1194 | return 0; |
1195 | } | 1195 | } |
1196 | 1196 | ||
@@ -1419,7 +1419,7 @@ static int p54_tx(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
1419 | /* modifies skb->cb and with it info, so must be last! */ | 1419 | /* modifies skb->cb and with it info, so must be last! */ |
1420 | if (unlikely(p54_assign_address(dev, skb, hdr, skb->len + tim_len))) | 1420 | if (unlikely(p54_assign_address(dev, skb, hdr, skb->len + tim_len))) |
1421 | goto err; | 1421 | goto err; |
1422 | priv->tx(dev, skb, 0); | 1422 | priv->tx(dev, skb); |
1423 | 1423 | ||
1424 | queue_delayed_work(dev->workqueue, &priv->work, | 1424 | queue_delayed_work(dev->workqueue, &priv->work, |
1425 | msecs_to_jiffies(P54_TX_FRAME_LIFETIME)); | 1425 | msecs_to_jiffies(P54_TX_FRAME_LIFETIME)); |
@@ -1498,7 +1498,7 @@ static int p54_setup_mac(struct ieee80211_hw *dev) | |||
1498 | setup->v2.lpf_bandwidth = cpu_to_le16(65535); | 1498 | setup->v2.lpf_bandwidth = cpu_to_le16(65535); |
1499 | setup->v2.osc_start_delay = cpu_to_le16(65535); | 1499 | setup->v2.osc_start_delay = cpu_to_le16(65535); |
1500 | } | 1500 | } |
1501 | priv->tx(dev, skb, 1); | 1501 | priv->tx(dev, skb); |
1502 | return 0; | 1502 | return 0; |
1503 | } | 1503 | } |
1504 | 1504 | ||
@@ -1579,7 +1579,7 @@ static int p54_scan(struct ieee80211_hw *dev, u16 mode, u16 dwell) | |||
1579 | chan->v2.basic_rate_mask = cpu_to_le32(priv->basic_rate_mask); | 1579 | chan->v2.basic_rate_mask = cpu_to_le32(priv->basic_rate_mask); |
1580 | memset(chan->v2.rts_rates, 0, 8); | 1580 | memset(chan->v2.rts_rates, 0, 8); |
1581 | } | 1581 | } |
1582 | priv->tx(dev, skb, 1); | 1582 | priv->tx(dev, skb); |
1583 | return 0; | 1583 | return 0; |
1584 | 1584 | ||
1585 | err: | 1585 | err: |
@@ -1605,7 +1605,7 @@ static int p54_set_leds(struct ieee80211_hw *dev, int mode, int link, int act) | |||
1605 | led->led_permanent = cpu_to_le16(link); | 1605 | led->led_permanent = cpu_to_le16(link); |
1606 | led->led_temporary = cpu_to_le16(act); | 1606 | led->led_temporary = cpu_to_le16(act); |
1607 | led->duration = cpu_to_le16(1000); | 1607 | led->duration = cpu_to_le16(1000); |
1608 | priv->tx(dev, skb, 1); | 1608 | priv->tx(dev, skb); |
1609 | return 0; | 1609 | return 0; |
1610 | } | 1610 | } |
1611 | 1611 | ||
@@ -1645,7 +1645,7 @@ static int p54_set_edcf(struct ieee80211_hw *dev) | |||
1645 | edcf->flags = 0; | 1645 | edcf->flags = 0; |
1646 | memset(edcf->mapping, 0, sizeof(edcf->mapping)); | 1646 | memset(edcf->mapping, 0, sizeof(edcf->mapping)); |
1647 | memcpy(edcf->queue, priv->qos_params, sizeof(edcf->queue)); | 1647 | memcpy(edcf->queue, priv->qos_params, sizeof(edcf->queue)); |
1648 | priv->tx(dev, skb, 1); | 1648 | priv->tx(dev, skb); |
1649 | return 0; | 1649 | return 0; |
1650 | } | 1650 | } |
1651 | 1651 | ||
@@ -1936,7 +1936,7 @@ static int p54_init_xbow_synth(struct ieee80211_hw *dev) | |||
1936 | xbow->magic2 = cpu_to_le16(0x2); | 1936 | xbow->magic2 = cpu_to_le16(0x2); |
1937 | xbow->freq = cpu_to_le16(5390); | 1937 | xbow->freq = cpu_to_le16(5390); |
1938 | memset(xbow->padding, 0, sizeof(xbow->padding)); | 1938 | memset(xbow->padding, 0, sizeof(xbow->padding)); |
1939 | priv->tx(dev, skb, 1); | 1939 | priv->tx(dev, skb); |
1940 | return 0; | 1940 | return 0; |
1941 | } | 1941 | } |
1942 | 1942 | ||
@@ -1962,7 +1962,7 @@ static void p54_work(struct work_struct *work) | |||
1962 | if (!skb) | 1962 | if (!skb) |
1963 | return ; | 1963 | return ; |
1964 | 1964 | ||
1965 | priv->tx(dev, skb, 0); | 1965 | priv->tx(dev, skb); |
1966 | } | 1966 | } |
1967 | 1967 | ||
1968 | static int p54_get_stats(struct ieee80211_hw *dev, | 1968 | static int p54_get_stats(struct ieee80211_hw *dev, |
@@ -2094,7 +2094,7 @@ static int p54_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd, | |||
2094 | [NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY]), 8); | 2094 | [NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY]), 8); |
2095 | } | 2095 | } |
2096 | 2096 | ||
2097 | priv->tx(dev, skb, 1); | 2097 | priv->tx(dev, skb); |
2098 | mutex_unlock(&priv->conf_mutex); | 2098 | mutex_unlock(&priv->conf_mutex); |
2099 | return 0; | 2099 | return 0; |
2100 | } | 2100 | } |