aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-06-17 11:43:56 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-24 15:05:30 -0400
commit3b8d81e020f77c9da8b85b0685c8cd2ca7c7b150 (patch)
treea19fcddbf28fecdbd13ad009fe07b8afc5e95c90 /net/mac80211/rx.c
parentc4029083e2acb82229c43b791c07afb089d972ff (diff)
mac80211: remove master netdev
With the internal 'pending' queue system in place, we can simply put packets there instead of pushing them off to the master dev, getting rid of the master interface completely. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index b513fb791153..7f33f775c5df 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1478,6 +1478,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
1478 struct ieee80211s_hdr *mesh_hdr; 1478 struct ieee80211s_hdr *mesh_hdr;
1479 unsigned int hdrlen; 1479 unsigned int hdrlen;
1480 struct sk_buff *skb = rx->skb, *fwd_skb; 1480 struct sk_buff *skb = rx->skb, *fwd_skb;
1481 struct ieee80211_local *local = rx->local;
1481 1482
1482 hdr = (struct ieee80211_hdr *) skb->data; 1483 hdr = (struct ieee80211_hdr *) skb->data;
1483 hdrlen = ieee80211_hdrlen(hdr->frame_control); 1484 hdrlen = ieee80211_hdrlen(hdr->frame_control);
@@ -1520,6 +1521,8 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
1520 dropped_frames_ttl); 1521 dropped_frames_ttl);
1521 else { 1522 else {
1522 struct ieee80211_hdr *fwd_hdr; 1523 struct ieee80211_hdr *fwd_hdr;
1524 struct ieee80211_tx_info *info;
1525
1523 fwd_skb = skb_copy(skb, GFP_ATOMIC); 1526 fwd_skb = skb_copy(skb, GFP_ATOMIC);
1524 1527
1525 if (!fwd_skb && net_ratelimit()) 1528 if (!fwd_skb && net_ratelimit())
@@ -1533,9 +1536,12 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
1533 */ 1536 */
1534 memcpy(fwd_hdr->addr1, fwd_hdr->addr2, ETH_ALEN); 1537 memcpy(fwd_hdr->addr1, fwd_hdr->addr2, ETH_ALEN);
1535 memcpy(fwd_hdr->addr2, rx->dev->dev_addr, ETH_ALEN); 1538 memcpy(fwd_hdr->addr2, rx->dev->dev_addr, ETH_ALEN);
1536 fwd_skb->dev = rx->local->mdev; 1539 info = IEEE80211_SKB_CB(fwd_skb);
1540 memset(info, 0, sizeof(*info));
1541 info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING;
1537 fwd_skb->iif = rx->dev->ifindex; 1542 fwd_skb->iif = rx->dev->ifindex;
1538 dev_queue_xmit(fwd_skb); 1543 ieee80211_select_queue(local, fwd_skb);
1544 ieee80211_add_pending_skb(local, fwd_skb);
1539 } 1545 }
1540 } 1546 }
1541 1547
@@ -1803,8 +1809,7 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx)
1803 return RX_DROP_MONITOR; 1809 return RX_DROP_MONITOR;
1804} 1810}
1805 1811
1806static void ieee80211_rx_michael_mic_report(struct net_device *dev, 1812static void ieee80211_rx_michael_mic_report(struct ieee80211_hdr *hdr,
1807 struct ieee80211_hdr *hdr,
1808 struct ieee80211_rx_data *rx) 1813 struct ieee80211_rx_data *rx)
1809{ 1814{
1810 int keyidx; 1815 int keyidx;
@@ -2114,7 +2119,7 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
2114 } 2119 }
2115 2120
2116 if ((status->flag & RX_FLAG_MMIC_ERROR)) { 2121 if ((status->flag & RX_FLAG_MMIC_ERROR)) {
2117 ieee80211_rx_michael_mic_report(local->mdev, hdr, &rx); 2122 ieee80211_rx_michael_mic_report(hdr, &rx);
2118 return; 2123 return;
2119 } 2124 }
2120 2125
@@ -2483,7 +2488,6 @@ void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb)
2483 2488
2484 BUILD_BUG_ON(sizeof(struct ieee80211_rx_status) > sizeof(skb->cb)); 2489 BUILD_BUG_ON(sizeof(struct ieee80211_rx_status) > sizeof(skb->cb));
2485 2490
2486 skb->dev = local->mdev;
2487 skb->pkt_type = IEEE80211_RX_MSG; 2491 skb->pkt_type = IEEE80211_RX_MSG;
2488 skb_queue_tail(&local->skb_queue, skb); 2492 skb_queue_tail(&local->skb_queue, skb);
2489 tasklet_schedule(&local->tasklet); 2493 tasklet_schedule(&local->tasklet);