Commit Graph

674 Commits

Author SHA1 Message Date
Xianjun Jiao
e7312859f8 Move the normal print location in openwifi_tx() 2022-03-29 11:23:10 +02:00
Xianjun Jiao
09350b04b6 Optimize the type of prio and queue_idx in openwifi_tx() 2022-03-29 11:21:46 +02:00
Xianjun Jiao
f11dfbd0cf Try to wait a bit instead of quit immediately while status!=DMA_COMPLETE in openwifi_tx() 2022-03-29 11:18:51 +02:00
Xianjun Jiao
f70dfc6b7b Optimize seq_no in openwifi_tx() 2022-03-29 11:16:49 +02:00
Xianjun Jiao
5c65530f0b Calculate the duration/id field in driver:
Linux only sets that field for non-ht, and leaves the field blank for ht. Linux expects lower level set it. This is realized after checking the mac80211 source code. After studying the duration/id field of COTS WiFi chip by wireshark, we calculate it in driver sdr.c gen_ht_duration_id(). The concrete logic/method of the calculation is in the comments of the function gen_ht_duration_id().
2022-03-29 11:04:35 +02:00
Xianjun Jiao
86032d0bc7 sifs and n_dbps optimization in openwfii_tx() 2022-03-29 11:03:31 +02:00
Xianjun Jiao
d8b2967699 date type optimization 2022-03-29 11:01:13 +02:00
Xianjun Jiao
db25dabc2b Optimize the pkt_need_ack flag check and rate_hw_value override 2022-03-29 10:56:47 +02:00
Xianjun Jiao
6e0ffbea06 Add abnormal detection prio >= MAX_NUM_HW_QUEUE in openwifi_tx() 2022-03-29 10:48:12 +02:00
Xianjun Jiao
5e4bffc1ef Optimize some variable type 2022-03-29 10:47:32 +02:00
Xianjun Jiao
56d25ef86c We try to handle all tid, so qos_hdr can be optimized 2022-03-29 10:45:49 +02:00
aslaamshaafi
9f3a7b7fcf Merge branch 'pre-release' of github.com:open-sdr/openwifi into pre-release 2022-03-29 10:21:17 +02:00
aslaamshaafi
616c431c9e replace len_mpdu+LEN_PHY_CRC with num_dma_symbol in sdr.c because axis interface in tx_intf IP use it as num_dma_symbol. 2022-03-29 10:21:04 +02:00
Xianjun Jiao
4bdc210e86 Open the 4 queue gates all the time during xpu initialization 2022-03-29 10:13:16 +02:00
Xianjun Jiao
b597510ce3 Relax the ACK waiting condition for non block ACK case:
If the packet type/sub-type is ACK and the length field is 14, we believe it is ACK. No matter the fcs is valid or not
2022-03-29 10:11:14 +02:00
Xianjun Jiao
066dd1bba2 fine tuning of ack tx wait time for new design 2022-03-29 10:06:27 +02:00
Xianjun Jiao
e3fb22a4b3 gpio gain delay and rssi:
Fine tune the rssi calculation sync with gpio gain (add the same gpio gain smoothing like iq_rssi in FPGA)
2022-03-29 10:05:33 +02:00
Xianjun Jiao
b96c234d09 Remove unnecessary ht aggr related flag reset:
Don't need to reset _prev variables every time when it is not ht aggr qos data. Reason:
1. In 99.9999% cases, the ht always use qos data and goes to prio/queue_idx 2. By not resetting the variable to -1, we can have continuous aggregation packet operation in FPGA queue 2.
2. In other words, the aggregation operation for queue 2 in FPGA won't be interrupted by other non aggregation packets (control/management/beacon/etc.) that go to queue 0 (or other queues than 2).
3. From wired domain and upper level ( DSCP, AC (0~3), WMM management, 802.11D service classes and user priority (UP) ) to chip/FPGA queue index, thre should be some (complicated) mapping relationship.
4. More decent design is setting these aggregation flags (ht_aggr_start) per queue/prio here in driver. But since now only queue 2 and 0 are used (data goes to queue 2, others go to queue 0) in normal (most) cases, let's not go to the decent (complicated) solution immediately.
2022-03-29 10:04:25 +02:00
thavinga
bc98f5bb6c Driver changes for FPGA SPI Tx LO control
- Manually issue Tx Quadrature calibration if frequency change is more than 100MHz
- Disable FPGA SPI module before calibration
- Add xpu reg 13 to disable control manually
2022-03-29 09:56:20 +02:00
Xianjun Jiao
f6ba34deac Add/adjust missing register modification in tx_intf 2022-03-28 20:49:37 +02:00
Xianjun Jiao
585a56016e openofdm_rx initialization with the help of macro definition in hw_def.h:
Now changing the macro in hw_def.h will change the related initialization part in all related drivers (rx_intf/xpu/openofdm_rx)
2022-03-28 20:48:36 +02:00
Xianjun Jiao
12b235cd18 Remove the unnecessary variable and code from openofdm_rx interface 2022-03-28 20:44:42 +02:00
Xianjun Jiao
54c67c7a2f No need to consider 4 last pkt from 4 queue in master branch:
Always assume Linux schedule 4 priority queue to 4 FPGA queue via 1 on 1 mapping
2022-03-28 20:41:00 +02:00
Xianjun Jiao
0cbb687387 Change the default bb_gain from 290 to 250 in tx_intf:
- 2022-03-04 detailed test result:
- - bb_gain 290 work for 11a/g all mcs
- - bb_gain 290 work for 11n mcs 1~7 (aggr and non aggr)
- - bb_gain 290 destroy  11n mcs 0 long (MTU 1500) tx pkt due to high PAPR (Peak to Average Power Ratio)
- - bb_gain 250 work for 11n mcs 0
So, a conservative bb_gain 250 should be used
2022-03-28 20:38:25 +02:00
Xianjun Jiao
469b96d342 Remove/modify the tx_intf register API according to the new FPGA:
1. mixer/duc is not needed because we will not use offset tuning after the ad9361 tx lo control via FPGA is supported.
2. source selection register is not needed as well.
3. arbitrary IQ register is added.
2022-03-28 20:35:17 +02:00
Xianjun Jiao
4d39160b06 Add the missing TX_INTF_BW_20MHZ_AT_0MHZ_ANT_BOTH into tx_intf_mode 2022-03-28 20:29:26 +02:00
Xianjun Jiao
a7396dd938 Some minor unused comments 2022-03-28 20:27:36 +02:00
thavinga
9fde3bff20 Displaying side channel plots with interactive mode to avoid jumping to foreground on update
Plus small fix for file closing
2022-03-28 16:53:07 +02:00
Xianjun Jiao
a7d34401ff Update ad9361_rf_set_channel() for easier rssi_half_db rssi_dbm rssi_correction stuffs:
by using the helper functions: rssi_correction_lookup_table(), rssi_dbm_to_rssi_half_db(), rssi_half_db_to_rssi_dbm()
2022-03-28 16:44:52 +02:00
Xianjun Jiao
dbf0324b60 Restructure a bit ad9361_rf_set_channel() for actual lo tuning and priv lo variable update 2022-03-28 16:39:32 +02:00
Xianjun Jiao
534627041e Remove unused code in ad9361_rf_set_channel() 2022-03-28 16:35:25 +02:00
Xianjun Jiao
d2bd08e02e Add useful function definition at the beginning of sdr.c 2022-03-28 16:14:33 +02:00
Xianjun Jiao
df53600a86 Remove the unused code 2022-03-28 16:13:42 +02:00
Xianjun Jiao
747a245fd7 Add a printing via comment in openwifi_beacon_work() in case debug 2022-03-28 16:08:23 +02:00
Xianjun Jiao
dc35c00409 Add MAC addr setting support into driver via openwifi_add_interface() 2022-03-28 16:07:37 +02:00
Xianjun Jiao
dbf47e17aa Add more print into openwifi_bss_info_changed() when vif_priv->enable_beacon 2022-03-28 16:06:24 +02:00
Xianjun Jiao
16494306ff Add more info printing into openwifi_ampdu_action 2022-03-28 16:00:01 +02:00
Xianjun Jiao
20936d67e1 Remove unused variable from openwifi_dev_probe() 2022-03-28 15:27:50 +02:00
Xianjun Jiao
f73b4f429f Tell mac80211 we need extra_tx_headroom = LEN_MPDU_DELIM 2022-03-28 15:27:07 +02:00
Xianjun Jiao
72d992a6ec More correct hw flag set via ieee80211_hw_set to prevent:
Some client, like iPhone, always has frequent PS (Power Saving) state change like this:
sdr0: STA e2:72:49:82:a6:a0 aid 1 enters power save mode
sdr0: STA e2:72:49:82:a6:a0 aid 1 exits power save mode
sdr0: STA e2:72:49:82:a6:a0 aid 1 sending 0 filtered/0 PS frames since STA woke up
Now with these correct hw flag setting, the link is more stable
2022-03-28 15:26:35 +02:00
Xianjun Jiao
921f612e86 Only support 40MHz sps and non offset tuning now 2022-03-28 15:25:20 +02:00
Xianjun Jiao
9f07176e80 Remove the unused code in openwifi_dev_probe() 2022-03-28 15:24:49 +02:00
Xianjun Jiao
cb81054882 Add helper functions for rssi_half_db rssi_dbm conversion and rssi_correction lookup table:
and use them for priv->rssi_correction/priv->last_auto_fpga_lbt_th initialization in openwifi_dev_probe()
2022-03-28 15:23:53 +02:00
Xianjun Jiao
7b2f8bdfff Align the inital actual_tx_lo/actual_rx_lo to rf_init_11n.sh:
Make it far from our usual 2.4/5GHz to force ad9361 to calibration while up in 2.4/5GHz due to large tuning offset from the original frequency (1GHz)
2022-03-28 15:20:03 +02:00
Xianjun Jiao
ffd377ca42 Adjust the err code and print in openwifi_dev_probe() 2022-03-28 15:17:12 +02:00
Xianjun Jiao
7b3805608b Remove the short GI capability report from driver for:
stability with minor throughput loss
2022-03-28 15:14:55 +02:00
Xianjun Jiao
8e13e72bca Add set_antenna and get_antenna implementations to ieee80211_ops 2022-03-28 15:12:50 +02:00
Xianjun Jiao
76b1a6a12c Adjust the driver arguments while loading/insert:
1. test_mode 0 -- normal, no aggregation (AMPDU); test_mode 1 -- experimental, has AMPDU support
2. init_tx_att -- initial tx attenuation in dB*1000 format. example: put 20000 for 20dB
2022-03-28 15:08:01 +02:00
Xianjun Jiao
91a6d83146 Improve the openwifi_is_radio_enabled() according to the new design 2022-03-28 14:58:46 +02:00
Xianjun Jiao
68314a4614 Add the missing rf_reg_val in priv 2022-03-28 14:57:49 +02:00