Commit Graph

177 Commits

Author SHA1 Message Date
robgar2001
de9f07c15e Fixed typo in sdr.c 2024-02-22 17:35:03 +01:00
robgar2001
db8c69b6aa Fixed errors during compilation of OpenWRT kernel modules 2024-02-22 14:45:43 +01:00
Xianjun Jiao
1e61d26112 Avoid rfkill turn off wifi after manual tx attenuation setting 2023-11-20 09:14:24 +01:00
Xianjun Jiao
f0a95ef611 Remove unused lines 2023-09-12 12:20:57 +02:00
Xianjun Jiao
849c3b5e44 Fix typo of printing in tx_intf.c 2023-09-12 12:19:15 +02:00
Xianjun Jiao
3696c5e269 Too many dmesg while running side_ch:
Remove them
2023-09-12 11:57:38 +02:00
Xianjun Jiao
c9989970b0 Disable eifs_trigger_by_last_tx_fail by default:
Standard does not ask so
2023-02-27 19:58:13 +01:00
Xianjun Jiao
aaceb807fd Add sysfs to support xpu reg 6 bit27 26:
bit27 to disable eifs triggered by last rx fail
bit26 to disable eifs triggered by last tx fail
2023-02-27 19:56:32 +01:00
Xianjun Jiao
441850b113 NO code change. Formating 2023-02-09 16:14:10 +01:00
Xianjun Jiao
3d5de43810 Let lbt sdrctl command show richer info for set_lbt_th.sh 2023-02-09 16:09:36 +01:00
Xianjun Jiao
a097294415 Change the initial sensitivity th from -95 to -85:
-85 is a good tradeoff between sensitivity and false alarm
-95 will result in lots of non necessary decoding action (false alarm), and sometimes it leads to abnormal receiver state (stuck, etc)
-95 should be set manually while doing conductive test with wifi tester
2023-02-03 16:27:51 +01:00
Xianjun Jiao
2a5da37c58 Add driver support for euqalizer monitor:
When the equalizer out is too small (48 out of 52/56) for SIGNAL decoding, watchdoc will reset the receiver
2023-02-03 16:26:58 +01:00
Xianjun Jiao
456a795707 Add side_ch driver build into make_all.sh 2023-01-26 17:05:59 +01:00
Xianjun Jiao
eb6347176c Adapt the side channel support for kuiper 2023-01-17 14:48:23 +01:00
Xianjun Jiao
0dff973643 Necessary change for scripts of driver building 2023-01-17 14:01:48 +01:00
Xianjun Jiao
01da46b5c5 Necessary sdr.c change for ADI kuiper release 2023-01-17 14:01:04 +01:00
Xianjun Jiao
2382984243 We do not maintain our own (modified) ad9361 driver anymore! The original ad9361 driver in the Linux kernel tree can be used with some extra EXPORT_SYMBOL. 2023-01-17 13:54:08 +01:00
Xianjun Jiao
e273351b99 Add/Set the default fft_win_shift of new openofdm_rx to 1, which gives better throughput while receiving udp traffic 2023-01-17 13:51:25 +01:00
Xianjun Jiao
75d924e0e8 Remove unnecessary reg code in tx_intf.c 2023-01-17 13:49:50 +01:00
Xianjun Jiao
1265742e17 Refactor initial all open slice setup in xpu.c 2023-01-17 13:48:08 +01:00
Xianjun Jiao
ec5a505373 Remove unnecessary code in xpu.c 2023-01-17 13:32:27 +01:00
Xianjun Jiao
1fa7cac08e Format sdr.h 2023-01-17 13:31:10 +01:00
Xianjun Jiao
342bd25a0b Refactor a bit RING_ROOM_THRESHOLD/MAX_NUM_HW_QUEUE/MAX_NUM_SW_QUEUE 2023-01-17 13:31:10 +01:00
Xianjun Jiao
6c6cf95190 Refactor according to ...
Some xpu registers are removed
2023-01-17 13:31:10 +01:00
Xianjun Jiao
d4c3d8108e Though the SIFS definition in 2.4GHz is 10us, the actual gap is still 16us:
1. Confirmed by CMW270 in OFDM mode (10us is for 11b where viterbi decoder is not needed)
2. See Signal Extension in 18.3.2.4 ERP-OFDM PPDU format of 802.11-2020
2023-01-17 13:30:58 +01:00
Xianjun Jiao
26825b8b77 Add OPENWIFI_MIN_SIGNAL_LEN_TH 14 to set min pkt length threshold for FPGA signal watchdog 2023-01-17 13:14:59 +01:00
Xianjun Jiao
7f48aacad4 Change default OPENOFDM_RX_RSSI_DBM_TH_DEFAULT to a value that will not affect sensitivity 2023-01-17 13:12:55 +01:00
Xianjun Jiao
20d92b40f5 Change the cca threshold to -62dBm. Seems help a lot in 2.4GHz 2023-01-17 13:11:59 +01:00
Xianjun Jiao
e9919b3785 Add conditional compiling for driver:
C pre-defined macros can be set when running make_all.sh.
See change/help in the make_all.sh script or running the script.
2022-05-13 16:57:39 +02:00
Xianjun Jiao
1895c3ae46 Only support allowed channel to avoid:
the issue of Let openwifi work at arbitrary frequency: ./sdrctl dev sdr0 set reg rf 1/5 NMPQ
the wpa_supplicant scanning does scan those not allowed channel (originally reported by our driver capabilities), but hostpad already actually uses a not allowed channel (by sdrctl) while beacon still indicates an allowed channel (hostapd rejects to run on not allowed channel). So, after wpa_supplicant discovers the beacon on a not allowed channel while the beacon contains an allowed channel, it gets confused
2022-05-13 16:51:58 +02:00
Xianjun Jiao
ab74dd7433 Fix the rssi_correction for WiFi 6E channel (close to 6GHz)
Verified by CMW270
2022-05-13 16:50:27 +02:00
Xianjun Jiao
b0d1d08222 Remove the reg 3 init in rx_intf.c:
to avoid openwifi_start calling hw_init to override the FPGA loopback flag in reg 3 (value 256)
2022-05-13 16:48:30 +02:00
Xianjun Jiao
d6c1c3f7f5 Easier way to set arbitrary trx frequency via register rf 1 and 5:
Create helper function ad9361_tx_calibration() and openwifi_rf_rx_update_after_tuning() for frequency tuning. No matter it is from Linux request or rf register 1 (Tx freq override MHz) and 5 (Rx freq override MHz)
2022-03-30 11:36:36 +02:00
Xianjun Jiao
6bb9ef71e9 Example of how to add debug channel via sysfs and access it via script --> driver 2022-03-29 15:18:55 +02:00
Xianjun Jiao
e4d5d1a3ce Add code for new statistics and setting channel via sysfs 2022-03-29 15:16:29 +02:00
Xianjun Jiao
947b93458d Add missing code in sdr.h for the improved tx queue mechanism in previous commit 2022-03-29 15:08:44 +02:00
Xianjun Jiao
8b7c849019 The improved tx queue handling mechanism between openwifi_tx() and openwifi_tx_interrupt():
1. Consider more corner cases: interrupt missing will cause a bd in the driver ring will never be cleaned. this need to be considered in the openwifi_tx()
2. Another corner case in openwifi_tx_interrupt: a packet is just sent and an interrupt calls the routine, but it finds that the bd in the driver ring has been cleared somehow
3. The driver ring and FPGA queue are always 1 on 1 mapping. User needs to map the higher level Linux priority to the driver ring idx instead of FPGA queue idx
4. Record the information about which FPGA queue (driver ring) has stopped which Linux priority before, and do exhausted search after a packet is sent (in the interrupt routine) to wake that Linux priority queue (in mac80211) up
5. Reserve more room before the FPGA queue full to adopt the last packet before we decide to stop the mac80211 queue. In this way, the last packet before the queue stop will still be put into FPGA and is expected to be sent (not lost/drop actively)
2022-03-29 14:44:39 +02:00
Xianjun Jiao
2c78ef135f Fix the AMPDU reporting bug in tx interrupt:
When pkt_cnt is 1, it is also possible the aggregation case (single packet aggregation). So the reporting type (non aggregation or aggregation) should be decided automatically based on a dedicated use_ht_aggr flag instead of pkt_cnt, otherwise the Linux minstrel_ht link adaptation can not get correct TX status report in the aggregation case and will keep using the lowest MCS0
2022-03-29 14:20:38 +02:00
Xianjun Jiao
106a5e441f Align rx ring init to the new pkt existing flag inserted by FPGA 2022-03-29 14:14:30 +02:00
Xianjun Jiao
d4661bbd1c Update the RX_BD_BUF_SIZE and NUM_RX_BD in sdr.h 2022-03-29 12:42:17 +02:00
Xianjun Jiao
088d2d18c4 Add dmesg printk flag in sdr.h and use it in openwifi_rx-interrupt() accordingly 2022-03-29 12:39:33 +02:00
Xianjun Jiao
ca865e3837 Move the location of hdr/addr1/addr2 in openwifi_rx_interrupt() preparing for statistics usage 2022-03-29 12:36:53 +02:00
Xianjun Jiao
d267a5f4fb Add more info when the rx pkt content is abnormal in openwifi_rx_interrupt() 2022-03-29 12:34:51 +02:00
Xianjun Jiao
9c7deabd59 Make the freq/band report in openwifi_rx_interrupt from our driver internal variable instead of Linux setting. The latter might be asynchronous and cause issue: if the received management frame has wrong freq/band info, the Linux mac80211 might reject some state or have issue according to Linux kernel doc somewhere 2022-03-29 12:21:25 +02:00
Xianjun Jiao
0dc3d33d6e Rename the rssi_val to more meaningful rssi_half_db in openwifi_rx_interrupt, and use the helper function rssi_half_db_to_rssi_dbm to do calculation 2022-03-29 12:17:54 +02:00
Xianjun Jiao
1bbdabf023 Remove unnecessary variable initialization and other minor adaptation 2022-03-29 12:16:04 +02:00
Xianjun Jiao
b62a370457 Change the sc to seqno in openwifi_rx_interrupt() and align the operation logic to openwifi_tx() 2022-03-29 12:14:29 +02:00
Xianjun Jiao
bca13d88e4 Shorten the openwifi_rx_interrupt message header to openwifi_rx 2022-03-29 12:13:05 +02:00
thavinga
641a980a9b Disable AD9361 auto calibration and enable openwifi FPGA SPI control in openwifi_start() 2022-03-29 11:34:57 +02:00
Xianjun Jiao
3ac0023386 Try to allocate more room while skb head/tail room is not enough to adopt header/padding in openwifi_tx() 2022-03-29 11:24:42 +02:00