sysprog21 / vwifi

A virtual wireless device driver for Linux
MIT License
203 stars 39 forks source link

Add TSF support #18

Closed rickywu0421 closed 2 years ago

rickywu0421 commented 2 years ago

Rewriting some code with wrapper macro/function, like replacing cfg80211_inform_bss_data() with cfg80211_inform_bss(), and so on. I also add tsf support which provides timing information while performing cfg80211_ops->scan() routine. Fix possible buffer overflow by increment the size of every array to 33, which can tolerate 32 characters (defined by IEEE 802.11 standard) plus one NULL terminator.

jserv commented 2 years ago

In this pull request, let's concentrate on TSF support rather than involvement of refactor or overflow fixes.

rickywu0421 commented 2 years ago

In this pull request, let's concentrate on TSF support rather than involvement of refactor or overflow fixes.

Ok. Should I move the refactor part to another pull request?

jserv commented 2 years ago

Ok. Should I move the refactor part to another pull request?

Exactly. Always minimize the neccessary changes which would accelerate code review process.

jserv commented 2 years ago

Can you provide test item(s) in directory scripts for timing synchronization function? e.g. check the results of command iw dev scan. In addition, file README.md should be updated to reflect TSF.

rickywu0421 commented 2 years ago

I add a timing test in scripts/verify.sh. I compare the value of tsf and uptime, if the difference is higher than 500ms, then the test fails. I don't know if the threshold value "500ms" is reasonable.

jserv commented 2 years ago

Thank @rickywu0421 for contributing!