Commit f7f65d1e authored by David S. Miller's avatar David S. Miller
parents eafdcb43 4018517a
...@@ -1384,7 +1384,7 @@ void iwl_rx_handle(struct iwl_priv *priv) ...@@ -1384,7 +1384,7 @@ void iwl_rx_handle(struct iwl_priv *priv)
rxq->queue[i] = NULL; rxq->queue[i] = NULL;
pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->dma_addr, pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->aligned_dma_addr,
priv->hw_params.rx_buf_size, priv->hw_params.rx_buf_size,
PCI_DMA_FROMDEVICE); PCI_DMA_FROMDEVICE);
pkt = (struct iwl_rx_packet *)rxb->skb->data; pkt = (struct iwl_rx_packet *)rxb->skb->data;
...@@ -1436,8 +1436,8 @@ void iwl_rx_handle(struct iwl_priv *priv) ...@@ -1436,8 +1436,8 @@ void iwl_rx_handle(struct iwl_priv *priv)
rxb->skb = NULL; rxb->skb = NULL;
} }
pci_unmap_single(priv->pci_dev, rxb->dma_addr, pci_unmap_single(priv->pci_dev, rxb->real_dma_addr,
priv->hw_params.rx_buf_size, priv->hw_params.rx_buf_size + 256,
PCI_DMA_FROMDEVICE); PCI_DMA_FROMDEVICE);
spin_lock_irqsave(&rxq->lock, flags); spin_lock_irqsave(&rxq->lock, flags);
list_add_tail(&rxb->list, &priv->rxq.rx_used); list_add_tail(&rxb->list, &priv->rxq.rx_used);
...@@ -2341,7 +2341,6 @@ static void iwl_bg_alive_start(struct work_struct *data) ...@@ -2341,7 +2341,6 @@ static void iwl_bg_alive_start(struct work_struct *data)
mutex_lock(&priv->mutex); mutex_lock(&priv->mutex);
iwl_alive_start(priv); iwl_alive_start(priv);
mutex_unlock(&priv->mutex); mutex_unlock(&priv->mutex);
ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC);
} }
static void iwl4965_bg_rf_kill(struct work_struct *work) static void iwl4965_bg_rf_kill(struct work_struct *work)
......
...@@ -89,7 +89,8 @@ extern struct iwl_cfg iwl5100_abg_cfg; ...@@ -89,7 +89,8 @@ extern struct iwl_cfg iwl5100_abg_cfg;
#define DEFAULT_LONG_RETRY_LIMIT 4U #define DEFAULT_LONG_RETRY_LIMIT 4U
struct iwl_rx_mem_buffer { struct iwl_rx_mem_buffer {
dma_addr_t dma_addr; dma_addr_t real_dma_addr;
dma_addr_t aligned_dma_addr;
struct sk_buff *skb; struct sk_buff *skb;
struct list_head list; struct list_head list;
}; };
......
...@@ -204,7 +204,7 @@ int iwl_rx_queue_restock(struct iwl_priv *priv) ...@@ -204,7 +204,7 @@ int iwl_rx_queue_restock(struct iwl_priv *priv)
list_del(element); list_del(element);
/* Point to Rx buffer via next RBD in circular buffer */ /* Point to Rx buffer via next RBD in circular buffer */
rxq->bd[rxq->write] = iwl_dma_addr2rbd_ptr(priv, rxb->dma_addr); rxq->bd[rxq->write] = iwl_dma_addr2rbd_ptr(priv, rxb->aligned_dma_addr);
rxq->queue[rxq->write] = rxb; rxq->queue[rxq->write] = rxb;
rxq->write = (rxq->write + 1) & RX_QUEUE_MASK; rxq->write = (rxq->write + 1) & RX_QUEUE_MASK;
rxq->free_count--; rxq->free_count--;
...@@ -251,7 +251,7 @@ void iwl_rx_allocate(struct iwl_priv *priv) ...@@ -251,7 +251,7 @@ void iwl_rx_allocate(struct iwl_priv *priv)
rxb = list_entry(element, struct iwl_rx_mem_buffer, list); rxb = list_entry(element, struct iwl_rx_mem_buffer, list);
/* Alloc a new receive buffer */ /* Alloc a new receive buffer */
rxb->skb = alloc_skb(priv->hw_params.rx_buf_size, rxb->skb = alloc_skb(priv->hw_params.rx_buf_size + 256,
__GFP_NOWARN | GFP_ATOMIC); __GFP_NOWARN | GFP_ATOMIC);
if (!rxb->skb) { if (!rxb->skb) {
if (net_ratelimit()) if (net_ratelimit())
...@@ -266,9 +266,17 @@ void iwl_rx_allocate(struct iwl_priv *priv) ...@@ -266,9 +266,17 @@ void iwl_rx_allocate(struct iwl_priv *priv)
list_del(element); list_del(element);
/* Get physical address of RB/SKB */ /* Get physical address of RB/SKB */
rxb->dma_addr = rxb->real_dma_addr = pci_map_single(
pci_map_single(priv->pci_dev, rxb->skb->data, priv->pci_dev,
priv->hw_params.rx_buf_size, PCI_DMA_FROMDEVICE); rxb->skb->data,
priv->hw_params.rx_buf_size + 256,
PCI_DMA_FROMDEVICE);
/* dma address must be no more than 36 bits */
BUG_ON(rxb->real_dma_addr & ~DMA_BIT_MASK(36));
/* and also 256 byte aligned! */
rxb->aligned_dma_addr = ALIGN(rxb->real_dma_addr, 256);
skb_reserve(rxb->skb, rxb->aligned_dma_addr - rxb->real_dma_addr);
list_add_tail(&rxb->list, &rxq->rx_free); list_add_tail(&rxb->list, &rxq->rx_free);
rxq->free_count++; rxq->free_count++;
} }
...@@ -300,8 +308,8 @@ void iwl_rx_queue_free(struct iwl_priv *priv, struct iwl_rx_queue *rxq) ...@@ -300,8 +308,8 @@ void iwl_rx_queue_free(struct iwl_priv *priv, struct iwl_rx_queue *rxq)
for (i = 0; i < RX_QUEUE_SIZE + RX_FREE_BUFFERS; i++) { for (i = 0; i < RX_QUEUE_SIZE + RX_FREE_BUFFERS; i++) {
if (rxq->pool[i].skb != NULL) { if (rxq->pool[i].skb != NULL) {
pci_unmap_single(priv->pci_dev, pci_unmap_single(priv->pci_dev,
rxq->pool[i].dma_addr, rxq->pool[i].real_dma_addr,
priv->hw_params.rx_buf_size, priv->hw_params.rx_buf_size + 256,
PCI_DMA_FROMDEVICE); PCI_DMA_FROMDEVICE);
dev_kfree_skb(rxq->pool[i].skb); dev_kfree_skb(rxq->pool[i].skb);
} }
...@@ -354,8 +362,8 @@ void iwl_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq) ...@@ -354,8 +362,8 @@ void iwl_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq)
* to an SKB, so we need to unmap and free potential storage */ * to an SKB, so we need to unmap and free potential storage */
if (rxq->pool[i].skb != NULL) { if (rxq->pool[i].skb != NULL) {
pci_unmap_single(priv->pci_dev, pci_unmap_single(priv->pci_dev,
rxq->pool[i].dma_addr, rxq->pool[i].real_dma_addr,
priv->hw_params.rx_buf_size, priv->hw_params.rx_buf_size + 256,
PCI_DMA_FROMDEVICE); PCI_DMA_FROMDEVICE);
priv->alloc_rxb_skb--; priv->alloc_rxb_skb--;
dev_kfree_skb(rxq->pool[i].skb); dev_kfree_skb(rxq->pool[i].skb);
......
...@@ -6012,7 +6012,6 @@ static void iwl3945_bg_alive_start(struct work_struct *data) ...@@ -6012,7 +6012,6 @@ static void iwl3945_bg_alive_start(struct work_struct *data)
mutex_lock(&priv->mutex); mutex_lock(&priv->mutex);
iwl3945_alive_start(priv); iwl3945_alive_start(priv);
mutex_unlock(&priv->mutex); mutex_unlock(&priv->mutex);
ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC);
} }
static void iwl3945_bg_rf_kill(struct work_struct *work) static void iwl3945_bg_rf_kill(struct work_struct *work)
......
...@@ -331,7 +331,7 @@ static int __if_usb_submit_rx_urb(struct if_usb_card *cardp, ...@@ -331,7 +331,7 @@ static int __if_usb_submit_rx_urb(struct if_usb_card *cardp,
/* Fill the receive configuration URB and initialise the Rx call back */ /* Fill the receive configuration URB and initialise the Rx call back */
usb_fill_bulk_urb(cardp->rx_urb, cardp->udev, usb_fill_bulk_urb(cardp->rx_urb, cardp->udev,
usb_rcvbulkpipe(cardp->udev, cardp->ep_in), usb_rcvbulkpipe(cardp->udev, cardp->ep_in),
(void *) (skb->tail), skb_tail_pointer(skb),
MRVDRV_ETH_RX_PACKET_BUFFER_SIZE, callbackfn, cardp); MRVDRV_ETH_RX_PACKET_BUFFER_SIZE, callbackfn, cardp);
cardp->rx_urb->transfer_flags |= URB_ZERO_PACKET; cardp->rx_urb->transfer_flags |= URB_ZERO_PACKET;
......
...@@ -73,14 +73,6 @@ ...@@ -73,14 +73,6 @@
* not do so then mac80211 may add this under certain circumstances. * not do so then mac80211 may add this under certain circumstances.
*/ */
/**
* enum ieee80211_notification_type - Low level driver notification
* @IEEE80211_NOTIFY_RE_ASSOC: start the re-association sequence
*/
enum ieee80211_notification_types {
IEEE80211_NOTIFY_RE_ASSOC,
};
/** /**
* struct ieee80211_ht_bss_info - describing BSS's HT characteristics * struct ieee80211_ht_bss_info - describing BSS's HT characteristics
* *
...@@ -1797,18 +1789,6 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid); ...@@ -1797,18 +1789,6 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid);
void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra, void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra,
u16 tid); u16 tid);
/**
* ieee80211_notify_mac - low level driver notification
* @hw: pointer as obtained from ieee80211_alloc_hw().
* @notif_type: enum ieee80211_notification_types
*
* This function must be called by low level driver to inform mac80211 of
* low level driver status change or force mac80211 to re-assoc for low
* level driver internal error that require re-assoc.
*/
void ieee80211_notify_mac(struct ieee80211_hw *hw,
enum ieee80211_notification_types notif_type);
/** /**
* ieee80211_find_sta - find a station * ieee80211_find_sta - find a station
* *
......
...@@ -2560,25 +2560,3 @@ void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local) ...@@ -2560,25 +2560,3 @@ void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local)
ieee80211_restart_sta_timer(sdata); ieee80211_restart_sta_timer(sdata);
rcu_read_unlock(); rcu_read_unlock();
} }
/* driver notification call */
void ieee80211_notify_mac(struct ieee80211_hw *hw,
enum ieee80211_notification_types notif_type)
{
struct ieee80211_local *local = hw_to_local(hw);
struct ieee80211_sub_if_data *sdata;
switch (notif_type) {
case IEEE80211_NOTIFY_RE_ASSOC:
rtnl_lock();
list_for_each_entry(sdata, &local->interfaces, list) {
if (sdata->vif.type != NL80211_IFTYPE_STATION)
continue;
ieee80211_sta_req_auth(sdata, &sdata->u.sta);
}
rtnl_unlock();
break;
}
}
EXPORT_SYMBOL(ieee80211_notify_mac);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment