Lines Matching +full:sense +full:- +full:freq

1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (c) 1998-2007 Texas Instruments Incorporated
25 rx_packet_ring_addr = wl->data_path->rx_packet_ring_addr; in wl1251_rx_header()
26 if (wl->rx_current_buffer) in wl1251_rx_header()
27 rx_packet_ring_addr += wl->data_path->rx_packet_ring_chunk_size; in wl1251_rx_header()
42 status->band = NL80211_BAND_2GHZ; in wl1251_rx_status()
43 status->mactime = desc->timestamp; in wl1251_rx_status()
53 if ((wl->bss_type == BSS_TYPE_IBSS) && beacon) { in wl1251_rx_status()
56 status->mactime = mactime; in wl1251_rx_status()
59 status->signal = desc->rssi; in wl1251_rx_status()
63 * the values don't make any sense in wl1251_rx_status()
65 wl->noise = desc->rssi - desc->snr / 2; in wl1251_rx_status()
67 status->freq = ieee80211_channel_to_frequency(desc->channel, in wl1251_rx_status()
68 status->band); in wl1251_rx_status()
70 status->flag |= RX_FLAG_MACTIME_START; in wl1251_rx_status()
72 if (!wl->monitor_present && (desc->flags & RX_DESC_ENCRYPTION_MASK)) { in wl1251_rx_status()
73 status->flag |= RX_FLAG_IV_STRIPPED | RX_FLAG_MMIC_STRIPPED; in wl1251_rx_status()
75 if (likely(!(desc->flags & RX_DESC_DECRYPT_FAIL))) in wl1251_rx_status()
76 status->flag |= RX_FLAG_DECRYPTED; in wl1251_rx_status()
78 if (unlikely(desc->flags & RX_DESC_MIC_FAIL)) in wl1251_rx_status()
79 status->flag |= RX_FLAG_MMIC_ERROR; in wl1251_rx_status()
82 if (unlikely(!(desc->flags & RX_DESC_VALID_FCS))) in wl1251_rx_status()
83 status->flag |= RX_FLAG_FAILED_FCS_CRC; in wl1251_rx_status()
85 switch (desc->rate) { in wl1251_rx_status()
88 status->rate_idx = 1; in wl1251_rx_status()
91 status->rate_idx = 2; in wl1251_rx_status()
94 status->rate_idx = 3; in wl1251_rx_status()
97 status->rate_idx = 4; in wl1251_rx_status()
100 status->rate_idx = 5; in wl1251_rx_status()
103 status->rate_idx = 7; in wl1251_rx_status()
106 status->rate_idx = 8; in wl1251_rx_status()
109 status->rate_idx = 9; in wl1251_rx_status()
112 status->rate_idx = 10; in wl1251_rx_status()
115 status->rate_idx = 11; in wl1251_rx_status()
120 if (desc->rate == RATE_1MBPS) { in wl1251_rx_status()
121 if (!(desc->mod_pre & OFDM_RATE_BIT)) in wl1251_rx_status()
122 /* CCK -> RATE_1MBPS */ in wl1251_rx_status()
123 status->rate_idx = 0; in wl1251_rx_status()
125 /* OFDM -> RATE_12MBPS */ in wl1251_rx_status()
126 status->rate_idx = 6; in wl1251_rx_status()
129 if (desc->mod_pre & SHORT_PREAMBLE_BIT) in wl1251_rx_status()
130 status->enc_flags |= RX_ENC_FLAG_SHORTPRE; in wl1251_rx_status()
142 length = WL1251_RX_ALIGN(desc->length - PLCP_HEADER_LENGTH); in wl1251_rx_body()
143 curr_id = (desc->flags & RX_DESC_SEQNUM_MASK) >> RX_DESC_PACKETID_SHIFT; in wl1251_rx_body()
144 last_id_inc = (wl->rx_last_id + 1) % (RX_MAX_PACKET_ID + 1); in wl1251_rx_body()
149 wl->rx_last_id = curr_id; in wl1251_rx_body()
151 wl->rx_last_id = last_id_inc; in wl1251_rx_body()
154 rx_packet_ring_addr = wl->data_path->rx_packet_ring_addr + in wl1251_rx_body()
156 if (wl->rx_current_buffer) in wl1251_rx_body()
157 rx_packet_ring_addr += wl->data_path->rx_packet_ring_chunk_size; in wl1251_rx_body()
169 skb_trim(skb, desc->length - PLCP_HEADER_LENGTH); in wl1251_rx_body()
171 fc = (u16 *)skb->data; in wl1251_rx_body()
178 wl1251_debug(DEBUG_RX, "rx skb 0x%p: %d B %s", skb, skb->len, in wl1251_rx_body()
182 ieee80211_rx_ni(wl->hw, skb); in wl1251_rx_body()
189 if (wl->rx_current_buffer) { in wl1251_rx_ack()
200 wl->rx_current_buffer = !wl->rx_current_buffer; in wl1251_rx_ack()
208 if (wl->state != WL1251_STATE_ON) in wl1251_rx()
211 rx_desc = wl->rx_descriptor; in wl1251_rx()