diff options
Diffstat (limited to 'drivers/net/wireless/iwlegacy/4965-mac.c')
-rw-r--r-- | drivers/net/wireless/iwlegacy/4965-mac.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c index 7941eb3a0166..6affa7e8f017 100644 --- a/drivers/net/wireless/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/iwlegacy/4965-mac.c | |||
@@ -612,7 +612,7 @@ il4965_pass_packet_to_mac80211(struct il_priv *il, struct ieee80211_hdr *hdr, | |||
612 | 612 | ||
613 | /* Called for N_RX (legacy ABG frames), or | 613 | /* Called for N_RX (legacy ABG frames), or |
614 | * N_RX_MPDU (HT high-throughput N frames). */ | 614 | * N_RX_MPDU (HT high-throughput N frames). */ |
615 | void | 615 | static void |
616 | il4965_hdl_rx(struct il_priv *il, struct il_rx_buf *rxb) | 616 | il4965_hdl_rx(struct il_priv *il, struct il_rx_buf *rxb) |
617 | { | 617 | { |
618 | struct ieee80211_hdr *header; | 618 | struct ieee80211_hdr *header; |
@@ -744,7 +744,7 @@ il4965_hdl_rx(struct il_priv *il, struct il_rx_buf *rxb) | |||
744 | 744 | ||
745 | /* Cache phy data (Rx signal strength, etc) for HT frame (N_RX_PHY). | 745 | /* Cache phy data (Rx signal strength, etc) for HT frame (N_RX_PHY). |
746 | * This will be used later in il_hdl_rx() for N_RX_MPDU. */ | 746 | * This will be used later in il_hdl_rx() for N_RX_MPDU. */ |
747 | void | 747 | static void |
748 | il4965_hdl_rx_phy(struct il_priv *il, struct il_rx_buf *rxb) | 748 | il4965_hdl_rx_phy(struct il_priv *il, struct il_rx_buf *rxb) |
749 | { | 749 | { |
750 | struct il_rx_pkt *pkt = rxb_addr(rxb); | 750 | struct il_rx_pkt *pkt = rxb_addr(rxb); |
@@ -1250,7 +1250,7 @@ il4965_dump_fh(struct il_priv *il, char **buf, bool display) | |||
1250 | return 0; | 1250 | return 0; |
1251 | } | 1251 | } |
1252 | 1252 | ||
1253 | void | 1253 | static void |
1254 | il4965_hdl_missed_beacon(struct il_priv *il, struct il_rx_buf *rxb) | 1254 | il4965_hdl_missed_beacon(struct il_priv *il, struct il_rx_buf *rxb) |
1255 | { | 1255 | { |
1256 | struct il_rx_pkt *pkt = rxb_addr(rxb); | 1256 | struct il_rx_pkt *pkt = rxb_addr(rxb); |
@@ -1357,7 +1357,7 @@ il4965_accumulative_stats(struct il_priv *il, __le32 * stats) | |||
1357 | } | 1357 | } |
1358 | #endif | 1358 | #endif |
1359 | 1359 | ||
1360 | void | 1360 | static void |
1361 | il4965_hdl_stats(struct il_priv *il, struct il_rx_buf *rxb) | 1361 | il4965_hdl_stats(struct il_priv *il, struct il_rx_buf *rxb) |
1362 | { | 1362 | { |
1363 | const int recalib_seconds = 60; | 1363 | const int recalib_seconds = 60; |
@@ -1399,7 +1399,7 @@ il4965_hdl_stats(struct il_priv *il, struct il_rx_buf *rxb) | |||
1399 | il4965_temperature_calib(il); | 1399 | il4965_temperature_calib(il); |
1400 | } | 1400 | } |
1401 | 1401 | ||
1402 | void | 1402 | static void |
1403 | il4965_hdl_c_stats(struct il_priv *il, struct il_rx_buf *rxb) | 1403 | il4965_hdl_c_stats(struct il_priv *il, struct il_rx_buf *rxb) |
1404 | { | 1404 | { |
1405 | struct il_rx_pkt *pkt = rxb_addr(rxb); | 1405 | struct il_rx_pkt *pkt = rxb_addr(rxb); |
@@ -1921,8 +1921,8 @@ drop_unlock: | |||
1921 | static inline int | 1921 | static inline int |
1922 | il4965_alloc_dma_ptr(struct il_priv *il, struct il_dma_ptr *ptr, size_t size) | 1922 | il4965_alloc_dma_ptr(struct il_priv *il, struct il_dma_ptr *ptr, size_t size) |
1923 | { | 1923 | { |
1924 | ptr->addr = | 1924 | ptr->addr = dma_alloc_coherent(&il->pci_dev->dev, size, &ptr->dma, |
1925 | dma_alloc_coherent(&il->pci_dev->dev, size, &ptr->dma, GFP_KERNEL); | 1925 | GFP_KERNEL); |
1926 | if (!ptr->addr) | 1926 | if (!ptr->addr) |
1927 | return -ENOMEM; | 1927 | return -ENOMEM; |
1928 | ptr->size = size; | 1928 | ptr->size = size; |
@@ -2050,7 +2050,7 @@ il4965_txq_ctx_reset(struct il_priv *il) | |||
2050 | il_tx_queue_reset(il, txq_id); | 2050 | il_tx_queue_reset(il, txq_id); |
2051 | } | 2051 | } |
2052 | 2052 | ||
2053 | void | 2053 | static void |
2054 | il4965_txq_ctx_unmap(struct il_priv *il) | 2054 | il4965_txq_ctx_unmap(struct il_priv *il) |
2055 | { | 2055 | { |
2056 | int txq_id; | 2056 | int txq_id; |
@@ -2258,7 +2258,7 @@ il4965_tx_agg_start(struct il_priv *il, struct ieee80211_vif *vif, | |||
2258 | 2258 | ||
2259 | spin_lock_irqsave(&il->sta_lock, flags); | 2259 | spin_lock_irqsave(&il->sta_lock, flags); |
2260 | tid_data = &il->stations[sta_id].tid[tid]; | 2260 | tid_data = &il->stations[sta_id].tid[tid]; |
2261 | *ssn = SEQ_TO_SN(tid_data->seq_number); | 2261 | *ssn = IEEE80211_SEQ_TO_SN(tid_data->seq_number); |
2262 | tid_data->agg.txq_id = txq_id; | 2262 | tid_data->agg.txq_id = txq_id; |
2263 | il_set_swq_id(&il->txq[txq_id], il4965_get_ac_from_tid(tid), txq_id); | 2263 | il_set_swq_id(&il->txq[txq_id], il4965_get_ac_from_tid(tid), txq_id); |
2264 | spin_unlock_irqrestore(&il->sta_lock, flags); | 2264 | spin_unlock_irqrestore(&il->sta_lock, flags); |
@@ -2408,7 +2408,7 @@ il4965_txq_check_empty(struct il_priv *il, int sta_id, u8 tid, int txq_id) | |||
2408 | /* aggregated HW queue */ | 2408 | /* aggregated HW queue */ |
2409 | if (txq_id == tid_data->agg.txq_id && | 2409 | if (txq_id == tid_data->agg.txq_id && |
2410 | q->read_ptr == q->write_ptr) { | 2410 | q->read_ptr == q->write_ptr) { |
2411 | u16 ssn = SEQ_TO_SN(tid_data->seq_number); | 2411 | u16 ssn = IEEE80211_SEQ_TO_SN(tid_data->seq_number); |
2412 | int tx_fifo = il4965_get_fifo_from_tid(tid); | 2412 | int tx_fifo = il4965_get_fifo_from_tid(tid); |
2413 | D_HT("HW queue empty: continue DELBA flow\n"); | 2413 | D_HT("HW queue empty: continue DELBA flow\n"); |
2414 | il4965_txq_agg_disable(il, txq_id, ssn, tx_fifo); | 2414 | il4965_txq_agg_disable(il, txq_id, ssn, tx_fifo); |
@@ -2627,7 +2627,8 @@ il4965_get_ra_sta_id(struct il_priv *il, struct ieee80211_hdr *hdr) | |||
2627 | static inline u32 | 2627 | static inline u32 |
2628 | il4965_get_scd_ssn(struct il4965_tx_resp *tx_resp) | 2628 | il4965_get_scd_ssn(struct il4965_tx_resp *tx_resp) |
2629 | { | 2629 | { |
2630 | return le32_to_cpup(&tx_resp->u.status + tx_resp->frame_count) & MAX_SN; | 2630 | return le32_to_cpup(&tx_resp->u.status + |
2631 | tx_resp->frame_count) & IEEE80211_MAX_SN; | ||
2631 | } | 2632 | } |
2632 | 2633 | ||
2633 | static inline u32 | 2634 | static inline u32 |
@@ -2717,15 +2718,15 @@ il4965_tx_status_reply_tx(struct il_priv *il, struct il_ht_agg *agg, | |||
2717 | hdr = (struct ieee80211_hdr *) skb->data; | 2718 | hdr = (struct ieee80211_hdr *) skb->data; |
2718 | 2719 | ||
2719 | sc = le16_to_cpu(hdr->seq_ctrl); | 2720 | sc = le16_to_cpu(hdr->seq_ctrl); |
2720 | if (idx != (SEQ_TO_SN(sc) & 0xff)) { | 2721 | if (idx != (IEEE80211_SEQ_TO_SN(sc) & 0xff)) { |
2721 | IL_ERR("BUG_ON idx doesn't match seq control" | 2722 | IL_ERR("BUG_ON idx doesn't match seq control" |
2722 | " idx=%d, seq_idx=%d, seq=%d\n", idx, | 2723 | " idx=%d, seq_idx=%d, seq=%d\n", idx, |
2723 | SEQ_TO_SN(sc), hdr->seq_ctrl); | 2724 | IEEE80211_SEQ_TO_SN(sc), hdr->seq_ctrl); |
2724 | return -1; | 2725 | return -1; |
2725 | } | 2726 | } |
2726 | 2727 | ||
2727 | D_TX_REPLY("AGG Frame i=%d idx %d seq=%d\n", i, idx, | 2728 | D_TX_REPLY("AGG Frame i=%d idx %d seq=%d\n", i, idx, |
2728 | SEQ_TO_SN(sc)); | 2729 | IEEE80211_SEQ_TO_SN(sc)); |
2729 | 2730 | ||
2730 | sh = idx - start; | 2731 | sh = idx - start; |
2731 | if (sh > 64) { | 2732 | if (sh > 64) { |
@@ -2895,7 +2896,7 @@ il4965_hwrate_to_tx_control(struct il_priv *il, u32 rate_n_flags, | |||
2895 | * Handles block-acknowledge notification from device, which reports success | 2896 | * Handles block-acknowledge notification from device, which reports success |
2896 | * of frames sent via aggregation. | 2897 | * of frames sent via aggregation. |
2897 | */ | 2898 | */ |
2898 | void | 2899 | static void |
2899 | il4965_hdl_compressed_ba(struct il_priv *il, struct il_rx_buf *rxb) | 2900 | il4965_hdl_compressed_ba(struct il_priv *il, struct il_rx_buf *rxb) |
2900 | { | 2901 | { |
2901 | struct il_rx_pkt *pkt = rxb_addr(rxb); | 2902 | struct il_rx_pkt *pkt = rxb_addr(rxb); |
@@ -6316,7 +6317,7 @@ il4965_tx_queue_set_status(struct il_priv *il, struct il_tx_queue *txq, | |||
6316 | scd_retry ? "BA" : "AC", txq_id, tx_fifo_id); | 6317 | scd_retry ? "BA" : "AC", txq_id, tx_fifo_id); |
6317 | } | 6318 | } |
6318 | 6319 | ||
6319 | const struct ieee80211_ops il4965_mac_ops = { | 6320 | static const struct ieee80211_ops il4965_mac_ops = { |
6320 | .tx = il4965_mac_tx, | 6321 | .tx = il4965_mac_tx, |
6321 | .start = il4965_mac_start, | 6322 | .start = il4965_mac_start, |
6322 | .stop = il4965_mac_stop, | 6323 | .stop = il4965_mac_stop, |