Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75029
b: refs/heads/master
c: 9313794
h: refs/heads/master
i:
  75027: 27d8c95
v: v3
  • Loading branch information
Ulrich Kunitz authored and John W. Linville committed Dec 17, 2007
1 parent 70f1068 commit 8396da8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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: 74cda169fe65ca1dedad6d4a905b13c6ccd87351
refs/heads/master: 9313794371ad39e6bf88e1fbef8dfb3bd1ae3fe7
10 changes: 8 additions & 2 deletions trunk/drivers/net/wireless/zd1211rw/zd_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,8 @@ static void zd_mac_rx(struct zd_mac *mac, struct sk_buff *skb)
__skb_trim(skb, skb->len -
(IEEE80211_FCS_LEN + sizeof(struct rx_status)));

ZD_ASSERT(IS_ALIGNED((unsigned long)skb->data, 4));

update_qual_rssi(mac, skb->data, skb->len, stats.signal,
status->signal_strength);

Expand Down Expand Up @@ -1166,15 +1168,19 @@ static void do_rx(unsigned long mac_ptr)
int zd_mac_rx_irq(struct zd_mac *mac, const u8 *buffer, unsigned int length)
{
struct sk_buff *skb;
unsigned int reserved =
ALIGN(max_t(unsigned int,
sizeof(struct zd_rt_hdr), ZD_PLCP_HEADER_SIZE), 4) -
ZD_PLCP_HEADER_SIZE;

skb = dev_alloc_skb(sizeof(struct zd_rt_hdr) + length);
skb = dev_alloc_skb(reserved + length);
if (!skb) {
struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac);
dev_warn(zd_mac_dev(mac), "Could not allocate skb.\n");
ieee->stats.rx_dropped++;
return -ENOMEM;
}
skb_reserve(skb, sizeof(struct zd_rt_hdr));
skb_reserve(skb, reserved);
memcpy(__skb_put(skb, length), buffer, length);
skb_queue_tail(&mac->rx_queue, skb);
tasklet_schedule(&mac->rx_tasklet);
Expand Down

0 comments on commit 8396da8

Please sign in to comment.