Updated from Linux LTS 3.10.21 to 3.10.22
This commit is contained in:
@@ -711,7 +711,6 @@ static int flexcan_chip_start(struct net_device *dev)
|
||||
{
|
||||
struct flexcan_priv *priv = netdev_priv(dev);
|
||||
struct flexcan_regs __iomem *regs = priv->base;
|
||||
unsigned int i;
|
||||
int err;
|
||||
u32 reg_mcr, reg_ctrl;
|
||||
|
||||
@@ -783,17 +782,6 @@ static int flexcan_chip_start(struct net_device *dev)
|
||||
netdev_dbg(dev, "%s: writing ctrl=0x%08x", __func__, reg_ctrl);
|
||||
flexcan_write(reg_ctrl, ®s->ctrl);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(regs->cantxfg); i++) {
|
||||
flexcan_write(0, ®s->cantxfg[i].can_ctrl);
|
||||
flexcan_write(0, ®s->cantxfg[i].can_id);
|
||||
flexcan_write(0, ®s->cantxfg[i].data[0]);
|
||||
flexcan_write(0, ®s->cantxfg[i].data[1]);
|
||||
|
||||
/* put MB into rx queue */
|
||||
flexcan_write(FLEXCAN_MB_CNT_CODE(0x4),
|
||||
®s->cantxfg[i].can_ctrl);
|
||||
}
|
||||
|
||||
/* Abort any pending TX, mark Mailbox as INACTIVE */
|
||||
flexcan_write(FLEXCAN_MB_CNT_CODE(0x4),
|
||||
®s->cantxfg[FLEXCAN_TX_BUF_ID].can_ctrl);
|
||||
|
||||
@@ -462,6 +462,8 @@ il3945_is_network_packet(struct il_priv *il, struct ieee80211_hdr *header)
|
||||
}
|
||||
}
|
||||
|
||||
#define SMALL_PACKET_SIZE 256
|
||||
|
||||
static void
|
||||
il3945_pass_packet_to_mac80211(struct il_priv *il, struct il_rx_buf *rxb,
|
||||
struct ieee80211_rx_status *stats)
|
||||
@@ -470,14 +472,13 @@ il3945_pass_packet_to_mac80211(struct il_priv *il, struct il_rx_buf *rxb,
|
||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)IL_RX_DATA(pkt);
|
||||
struct il3945_rx_frame_hdr *rx_hdr = IL_RX_HDR(pkt);
|
||||
struct il3945_rx_frame_end *rx_end = IL_RX_END(pkt);
|
||||
u16 len = le16_to_cpu(rx_hdr->len);
|
||||
u32 len = le16_to_cpu(rx_hdr->len);
|
||||
struct sk_buff *skb;
|
||||
__le16 fc = hdr->frame_control;
|
||||
u32 fraglen = PAGE_SIZE << il->hw_params.rx_page_order;
|
||||
|
||||
/* We received data from the HW, so stop the watchdog */
|
||||
if (unlikely
|
||||
(len + IL39_RX_FRAME_SIZE >
|
||||
PAGE_SIZE << il->hw_params.rx_page_order)) {
|
||||
if (unlikely(len + IL39_RX_FRAME_SIZE > fraglen)) {
|
||||
D_DROP("Corruption detected!\n");
|
||||
return;
|
||||
}
|
||||
@@ -488,26 +489,32 @@ il3945_pass_packet_to_mac80211(struct il_priv *il, struct il_rx_buf *rxb,
|
||||
return;
|
||||
}
|
||||
|
||||
skb = dev_alloc_skb(128);
|
||||
skb = dev_alloc_skb(SMALL_PACKET_SIZE);
|
||||
if (!skb) {
|
||||
IL_ERR("dev_alloc_skb failed\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!il3945_mod_params.sw_crypto)
|
||||
il_set_decrypted_flag(il, (struct ieee80211_hdr *)rxb_addr(rxb),
|
||||
il_set_decrypted_flag(il, (struct ieee80211_hdr *)pkt,
|
||||
le32_to_cpu(rx_end->status), stats);
|
||||
|
||||
skb_add_rx_frag(skb, 0, rxb->page,
|
||||
(void *)rx_hdr->payload - (void *)pkt, len,
|
||||
len);
|
||||
|
||||
/* If frame is small enough to fit into skb->head, copy it
|
||||
* and do not consume a full page
|
||||
*/
|
||||
if (len <= SMALL_PACKET_SIZE) {
|
||||
memcpy(skb_put(skb, len), rx_hdr->payload, len);
|
||||
} else {
|
||||
skb_add_rx_frag(skb, 0, rxb->page,
|
||||
(void *)rx_hdr->payload - (void *)pkt, len,
|
||||
fraglen);
|
||||
il->alloc_rxb_page--;
|
||||
rxb->page = NULL;
|
||||
}
|
||||
il_update_stats(il, false, fc, len);
|
||||
memcpy(IEEE80211_SKB_RXCB(skb), stats, sizeof(*stats));
|
||||
|
||||
ieee80211_rx(il->hw, skb);
|
||||
il->alloc_rxb_page--;
|
||||
rxb->page = NULL;
|
||||
}
|
||||
|
||||
#define IL_DELAY_NEXT_SCAN_AFTER_ASSOC (HZ*6)
|
||||
|
||||
@@ -574,9 +574,11 @@ il4965_translate_rx_status(struct il_priv *il, u32 decrypt_in)
|
||||
return decrypt_out;
|
||||
}
|
||||
|
||||
#define SMALL_PACKET_SIZE 256
|
||||
|
||||
static void
|
||||
il4965_pass_packet_to_mac80211(struct il_priv *il, struct ieee80211_hdr *hdr,
|
||||
u16 len, u32 ampdu_status, struct il_rx_buf *rxb,
|
||||
u32 len, u32 ampdu_status, struct il_rx_buf *rxb,
|
||||
struct ieee80211_rx_status *stats)
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
@@ -593,21 +595,25 @@ il4965_pass_packet_to_mac80211(struct il_priv *il, struct ieee80211_hdr *hdr,
|
||||
il_set_decrypted_flag(il, hdr, ampdu_status, stats))
|
||||
return;
|
||||
|
||||
skb = dev_alloc_skb(128);
|
||||
skb = dev_alloc_skb(SMALL_PACKET_SIZE);
|
||||
if (!skb) {
|
||||
IL_ERR("dev_alloc_skb failed\n");
|
||||
return;
|
||||
}
|
||||
|
||||
skb_add_rx_frag(skb, 0, rxb->page, (void *)hdr - rxb_addr(rxb), len,
|
||||
len);
|
||||
if (len <= SMALL_PACKET_SIZE) {
|
||||
memcpy(skb_put(skb, len), hdr, len);
|
||||
} else {
|
||||
skb_add_rx_frag(skb, 0, rxb->page, (void *)hdr - rxb_addr(rxb),
|
||||
len, PAGE_SIZE << il->hw_params.rx_page_order);
|
||||
il->alloc_rxb_page--;
|
||||
rxb->page = NULL;
|
||||
}
|
||||
|
||||
il_update_stats(il, false, fc, len);
|
||||
memcpy(IEEE80211_SKB_RXCB(skb), stats, sizeof(*stats));
|
||||
|
||||
ieee80211_rx(il->hw, skb);
|
||||
il->alloc_rxb_page--;
|
||||
rxb->page = NULL;
|
||||
}
|
||||
|
||||
/* Called for N_RX (legacy ABG frames), or
|
||||
|
||||
@@ -605,8 +605,10 @@ static inline int iwl_trans_send_cmd(struct iwl_trans *trans,
|
||||
{
|
||||
int ret;
|
||||
|
||||
WARN_ONCE(trans->state != IWL_TRANS_FW_ALIVE,
|
||||
"%s bad state = %d", __func__, trans->state);
|
||||
if (trans->state != IWL_TRANS_FW_ALIVE) {
|
||||
IWL_ERR(trans, "%s bad state = %d", __func__, trans->state);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
if (!(cmd->flags & CMD_ASYNC))
|
||||
lock_map_acquire_read(&trans->sync_cmd_lockdep_map);
|
||||
|
||||
@@ -933,7 +933,10 @@ static int mwifiex_decode_rx_packet(struct mwifiex_adapter *adapter,
|
||||
struct sk_buff *skb, u32 upld_typ)
|
||||
{
|
||||
u8 *cmd_buf;
|
||||
__le16 *curr_ptr = (__le16 *)skb->data;
|
||||
u16 pkt_len = le16_to_cpu(*curr_ptr);
|
||||
|
||||
skb_trim(skb, pkt_len);
|
||||
skb_pull(skb, INTF_HEADER_LEN);
|
||||
|
||||
switch (upld_typ) {
|
||||
|
||||
@@ -34,6 +34,7 @@ static void mwifiex_uap_queue_bridged_pkt(struct mwifiex_private *priv,
|
||||
struct mwifiex_txinfo *tx_info;
|
||||
int hdr_chop;
|
||||
struct timeval tv;
|
||||
struct ethhdr *p_ethhdr;
|
||||
u8 rfc1042_eth_hdr[ETH_ALEN] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
|
||||
|
||||
uap_rx_pd = (struct uap_rxpd *)(skb->data);
|
||||
@@ -48,14 +49,36 @@ static void mwifiex_uap_queue_bridged_pkt(struct mwifiex_private *priv,
|
||||
}
|
||||
|
||||
if (!memcmp(&rx_pkt_hdr->rfc1042_hdr,
|
||||
rfc1042_eth_hdr, sizeof(rfc1042_eth_hdr)))
|
||||
rfc1042_eth_hdr, sizeof(rfc1042_eth_hdr))) {
|
||||
/* Replace the 803 header and rfc1042 header (llc/snap) with
|
||||
* an Ethernet II header, keep the src/dst and snap_type
|
||||
* (ethertype).
|
||||
*
|
||||
* The firmware only passes up SNAP frames converting all RX
|
||||
* data from 802.11 to 802.2/LLC/SNAP frames.
|
||||
*
|
||||
* To create the Ethernet II, just move the src, dst address
|
||||
* right before the snap_type.
|
||||
*/
|
||||
p_ethhdr = (struct ethhdr *)
|
||||
((u8 *)(&rx_pkt_hdr->eth803_hdr)
|
||||
+ sizeof(rx_pkt_hdr->eth803_hdr)
|
||||
+ sizeof(rx_pkt_hdr->rfc1042_hdr)
|
||||
- sizeof(rx_pkt_hdr->eth803_hdr.h_dest)
|
||||
- sizeof(rx_pkt_hdr->eth803_hdr.h_source)
|
||||
- sizeof(rx_pkt_hdr->rfc1042_hdr.snap_type));
|
||||
memcpy(p_ethhdr->h_source, rx_pkt_hdr->eth803_hdr.h_source,
|
||||
sizeof(p_ethhdr->h_source));
|
||||
memcpy(p_ethhdr->h_dest, rx_pkt_hdr->eth803_hdr.h_dest,
|
||||
sizeof(p_ethhdr->h_dest));
|
||||
/* Chop off the rxpd + the excess memory from
|
||||
* 802.2/llc/snap header that was removed.
|
||||
*/
|
||||
hdr_chop = (u8 *)eth_hdr - (u8 *)uap_rx_pd;
|
||||
else
|
||||
hdr_chop = (u8 *)p_ethhdr - (u8 *)uap_rx_pd;
|
||||
} else {
|
||||
/* Chop off the rxpd */
|
||||
hdr_chop = (u8 *)&rx_pkt_hdr->eth803_hdr - (u8 *)uap_rx_pd;
|
||||
}
|
||||
|
||||
/* Chop off the leading header bytes so the it points
|
||||
* to the start of either the reconstructed EthII frame
|
||||
|
||||
@@ -811,6 +811,10 @@ static const struct net_device_ops islpci_netdev_ops = {
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
};
|
||||
|
||||
static struct device_type wlan_type = {
|
||||
.name = "wlan",
|
||||
};
|
||||
|
||||
struct net_device *
|
||||
islpci_setup(struct pci_dev *pdev)
|
||||
{
|
||||
@@ -821,9 +825,8 @@ islpci_setup(struct pci_dev *pdev)
|
||||
return ndev;
|
||||
|
||||
pci_set_drvdata(pdev, ndev);
|
||||
#if defined(SET_NETDEV_DEV)
|
||||
SET_NETDEV_DEV(ndev, &pdev->dev);
|
||||
#endif
|
||||
SET_NETDEV_DEVTYPE(ndev, &wlan_type);
|
||||
|
||||
/* setup the structure members */
|
||||
ndev->base_addr = pci_resource_start(pdev, 0);
|
||||
|
||||
@@ -1261,7 +1261,7 @@ static void rt2400pci_fill_rxdone(struct queue_entry *entry,
|
||||
*/
|
||||
rxdesc->timestamp = ((u64)rx_high << 32) | rx_low;
|
||||
rxdesc->signal = rt2x00_get_field32(word2, RXD_W2_SIGNAL) & ~0x08;
|
||||
rxdesc->rssi = rt2x00_get_field32(word2, RXD_W3_RSSI) -
|
||||
rxdesc->rssi = rt2x00_get_field32(word3, RXD_W3_RSSI) -
|
||||
entry->queue->rt2x00dev->rssi_offset;
|
||||
rxdesc->size = rt2x00_get_field32(word0, RXD_W0_DATABYTE_COUNT);
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#include <linux/ip.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/udp.h>
|
||||
|
||||
/*
|
||||
*NOTICE!!!: This file will be very big, we should
|
||||
@@ -1066,64 +1067,52 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
|
||||
if (!ieee80211_is_data(fc))
|
||||
return false;
|
||||
|
||||
ip = (const struct iphdr *)(skb->data + mac_hdr_len +
|
||||
SNAP_SIZE + PROTOC_TYPE_SIZE);
|
||||
ether_type = be16_to_cpup((__be16 *)
|
||||
(skb->data + mac_hdr_len + SNAP_SIZE));
|
||||
|
||||
ip = (struct iphdr *)((u8 *) skb->data + mac_hdr_len +
|
||||
SNAP_SIZE + PROTOC_TYPE_SIZE);
|
||||
ether_type = *(u16 *) ((u8 *) skb->data + mac_hdr_len + SNAP_SIZE);
|
||||
/* ether_type = ntohs(ether_type); */
|
||||
switch (ether_type) {
|
||||
case ETH_P_IP: {
|
||||
struct udphdr *udp;
|
||||
u16 src;
|
||||
u16 dst;
|
||||
|
||||
if (ETH_P_IP == ether_type) {
|
||||
if (IPPROTO_UDP == ip->protocol) {
|
||||
struct udphdr *udp = (struct udphdr *)((u8 *) ip +
|
||||
(ip->ihl << 2));
|
||||
if (((((u8 *) udp)[1] == 68) &&
|
||||
(((u8 *) udp)[3] == 67)) ||
|
||||
((((u8 *) udp)[1] == 67) &&
|
||||
(((u8 *) udp)[3] == 68))) {
|
||||
/*
|
||||
* 68 : UDP BOOTP client
|
||||
* 67 : UDP BOOTP server
|
||||
*/
|
||||
RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV),
|
||||
DBG_DMESG, "dhcp %s !!\n",
|
||||
is_tx ? "Tx" : "Rx");
|
||||
if (ip->protocol != IPPROTO_UDP)
|
||||
return false;
|
||||
udp = (struct udphdr *)((u8 *)ip + (ip->ihl << 2));
|
||||
src = be16_to_cpu(udp->source);
|
||||
dst = be16_to_cpu(udp->dest);
|
||||
|
||||
if (is_tx) {
|
||||
rtlpriv->enter_ps = false;
|
||||
schedule_work(&rtlpriv->
|
||||
works.lps_change_work);
|
||||
ppsc->last_delaylps_stamp_jiffies =
|
||||
jiffies;
|
||||
}
|
||||
/* If this case involves port 68 (UDP BOOTP client) connecting
|
||||
* with port 67 (UDP BOOTP server), then return true so that
|
||||
* the lowest speed is used.
|
||||
*/
|
||||
if (!((src == 68 && dst == 67) || (src == 67 && dst == 68)))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else if (ETH_P_ARP == ether_type) {
|
||||
if (is_tx) {
|
||||
rtlpriv->enter_ps = false;
|
||||
schedule_work(&rtlpriv->works.lps_change_work);
|
||||
ppsc->last_delaylps_stamp_jiffies = jiffies;
|
||||
}
|
||||
|
||||
return true;
|
||||
} else if (ETH_P_PAE == ether_type) {
|
||||
RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
|
||||
"dhcp %s !!\n", is_tx ? "Tx" : "Rx");
|
||||
break;
|
||||
}
|
||||
case ETH_P_ARP:
|
||||
break;
|
||||
case ETH_P_PAE:
|
||||
RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
|
||||
"802.1X %s EAPOL pkt!!\n", is_tx ? "Tx" : "Rx");
|
||||
|
||||
if (is_tx) {
|
||||
rtlpriv->enter_ps = false;
|
||||
schedule_work(&rtlpriv->works.lps_change_work);
|
||||
ppsc->last_delaylps_stamp_jiffies = jiffies;
|
||||
}
|
||||
|
||||
return true;
|
||||
} else if (ETH_P_IPV6 == ether_type) {
|
||||
/* IPv6 */
|
||||
return true;
|
||||
break;
|
||||
case ETH_P_IPV6:
|
||||
/* TODO: Is this right? */
|
||||
return false;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
if (is_tx) {
|
||||
rtlpriv->enter_ps = false;
|
||||
schedule_work(&rtlpriv->works.lps_change_work);
|
||||
ppsc->last_delaylps_stamp_jiffies = jiffies;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
|
||||
@@ -143,6 +143,7 @@ static void _rtl88ee_set_fw_clock_on(struct ieee80211_hw *hw,
|
||||
} else {
|
||||
rtlhal->fw_clk_change_in_progress = false;
|
||||
spin_unlock_bh(&rtlpriv->locks.fw_ps_lock);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -778,7 +778,7 @@ static long _rtl92c_signal_scale_mapping(struct ieee80211_hw *hw,
|
||||
|
||||
static void _rtl92c_query_rxphystatus(struct ieee80211_hw *hw,
|
||||
struct rtl_stats *pstats,
|
||||
struct rx_desc_92c *pdesc,
|
||||
struct rx_desc_92c *p_desc,
|
||||
struct rx_fwinfo_92c *p_drvinfo,
|
||||
bool packet_match_bssid,
|
||||
bool packet_toself,
|
||||
@@ -793,11 +793,11 @@ static void _rtl92c_query_rxphystatus(struct ieee80211_hw *hw,
|
||||
u32 rssi, total_rssi = 0;
|
||||
bool in_powersavemode = false;
|
||||
bool is_cck_rate;
|
||||
u8 *pdesc = (u8 *)p_desc;
|
||||
|
||||
is_cck_rate = RX_HAL_IS_CCK_RATE(pdesc);
|
||||
is_cck_rate = RX_HAL_IS_CCK_RATE(p_desc);
|
||||
pstats->packet_matchbssid = packet_match_bssid;
|
||||
pstats->packet_toself = packet_toself;
|
||||
pstats->is_cck = is_cck_rate;
|
||||
pstats->packet_beacon = packet_beacon;
|
||||
pstats->is_cck = is_cck_rate;
|
||||
pstats->RX_SIGQ[0] = -1;
|
||||
|
||||
@@ -303,10 +303,10 @@ out:
|
||||
bool rtl92cu_rx_query_desc(struct ieee80211_hw *hw,
|
||||
struct rtl_stats *stats,
|
||||
struct ieee80211_rx_status *rx_status,
|
||||
u8 *p_desc, struct sk_buff *skb)
|
||||
u8 *pdesc, struct sk_buff *skb)
|
||||
{
|
||||
struct rx_fwinfo_92c *p_drvinfo;
|
||||
struct rx_desc_92c *pdesc = (struct rx_desc_92c *)p_desc;
|
||||
struct rx_desc_92c *p_desc = (struct rx_desc_92c *)pdesc;
|
||||
u32 phystatus = GET_RX_DESC_PHY_STATUS(pdesc);
|
||||
|
||||
stats->length = (u16) GET_RX_DESC_PKT_LEN(pdesc);
|
||||
@@ -345,11 +345,11 @@ bool rtl92cu_rx_query_desc(struct ieee80211_hw *hw,
|
||||
if (phystatus) {
|
||||
p_drvinfo = (struct rx_fwinfo_92c *)(skb->data +
|
||||
stats->rx_bufshift);
|
||||
rtl92c_translate_rx_signal_stuff(hw, skb, stats, pdesc,
|
||||
rtl92c_translate_rx_signal_stuff(hw, skb, stats, p_desc,
|
||||
p_drvinfo);
|
||||
}
|
||||
/*rx_status->qual = stats->signal; */
|
||||
rx_status->signal = stats->rssi + 10;
|
||||
rx_status->signal = stats->recvsignalpower + 10;
|
||||
/*rx_status->noise = -stats->noise; */
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -525,7 +525,7 @@ bool rtl92de_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats,
|
||||
p_drvinfo);
|
||||
}
|
||||
/*rx_status->qual = stats->signal; */
|
||||
rx_status->signal = stats->rssi + 10;
|
||||
rx_status->signal = stats->recvsignalpower + 10;
|
||||
/*rx_status->noise = -stats->noise; */
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ static void _rtl92s_get_txpower_writeval_byregulatory(struct ieee80211_hw *hw,
|
||||
rtlefuse->pwrgroup_ht40
|
||||
[RF90_PATH_A][chnl - 1]) {
|
||||
pwrdiff_limit[i] =
|
||||
rtlefuse->pwrgroup_ht20
|
||||
rtlefuse->pwrgroup_ht40
|
||||
[RF90_PATH_A][chnl - 1];
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -329,7 +329,7 @@ bool rtl92se_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats,
|
||||
}
|
||||
|
||||
/*rx_status->qual = stats->signal; */
|
||||
rx_status->signal = stats->rssi + 10;
|
||||
rx_status->signal = stats->recvsignalpower + 10;
|
||||
/*rx_status->noise = -stats->noise; */
|
||||
|
||||
return true;
|
||||
|
||||
@@ -77,11 +77,7 @@
|
||||
#define RTL_SLOT_TIME_9 9
|
||||
#define RTL_SLOT_TIME_20 20
|
||||
|
||||
/*related with tcp/ip. */
|
||||
/*if_ehther.h*/
|
||||
#define ETH_P_PAE 0x888E /*Port Access Entity (IEEE 802.1X) */
|
||||
#define ETH_P_IP 0x0800 /*Internet Protocol packet */
|
||||
#define ETH_P_ARP 0x0806 /*Address Resolution packet */
|
||||
/*related to tcp/ip. */
|
||||
#define SNAP_SIZE 6
|
||||
#define PROTOC_TYPE_SIZE 2
|
||||
|
||||
|
||||
@@ -365,17 +365,19 @@ void xenvif_disconnect(struct xenvif *vif)
|
||||
if (netif_carrier_ok(vif->dev))
|
||||
xenvif_carrier_off(vif);
|
||||
|
||||
atomic_dec(&vif->refcnt);
|
||||
wait_event(vif->waiting_to_free, atomic_read(&vif->refcnt) == 0);
|
||||
|
||||
if (vif->irq)
|
||||
if (vif->irq) {
|
||||
unbind_from_irqhandler(vif->irq, vif);
|
||||
vif->irq = 0;
|
||||
}
|
||||
|
||||
xen_netbk_unmap_frontend_rings(vif);
|
||||
}
|
||||
|
||||
void xenvif_free(struct xenvif *vif)
|
||||
{
|
||||
atomic_dec(&vif->refcnt);
|
||||
wait_event(vif->waiting_to_free, atomic_read(&vif->refcnt) == 0);
|
||||
|
||||
unregister_netdev(vif->dev);
|
||||
|
||||
free_netdev(vif->dev);
|
||||
|
||||
Reference in New Issue
Block a user