morrownr / USB-WiFi

USB WiFi Adapter Information for Linux
2.4k stars 161 forks source link

Reformat and normalize `iw_list` contents #439

Open lafrenierejm opened 1 month ago

lafrenierejm commented 1 month ago

@morrownr I have intentionally opened this as a draft to get your feedback

The change in b87048941bcf83a6a33fc2a05577cdc86c3b0b83 is intended as an example of a direction the iw_list files could be taken in. Mostly it puts the highest-level information at the top of the document followed by command output.

Some open questions I have:

  1. Is there a specific rationale for the current iw_list files' formats? (Links to previous PRs or issues would be more than good enough.)
  2. Is there specific information that must be included in each iw_list file? Information that should be included?
  3. What would you think about a PR template for new iw_list entries?
morrownr commented 1 month ago

@lafrenierejm

  1. There was a rational but I have come to a conclusion that we need a new format. Files do not need to be done by adapter but rather chipset and driver. The filename can contain the chipset and the information inside needs to indentify which version of the driver showed the information. Which driver is also dependend on the kernel so maybe an update once per year with the new LTS kernel. I think I need to do an example and explain it, then you can make it better.

  2. Yes, but let me make an example.

  3. That is a good idea.

Let me think and make an example. We need to have the needed info but we need to cause the least amount of effort to make it happen.

lafrenierejm commented 1 month ago

Let me think and make an example. We need to have the needed info but we need to cause the least amount of effort to make it happen.

It wouldn't be very much effort to write a shell script that would do something like:

  1. Prompt the user for some basic information about the chipset.
  2. Run a sequence of commands and capture their outputs.
  3. Assemble a Markdown doc combining the user's input and the commands' outputs.

At that point it would largely be a matter of the user raising a PR to include the new file.

morrownr commented 1 month ago

I am pondering this.

This folder is mostly for tech info like you get when you run iw list plus maybe a little more so the info is mostly aimed at drivers and not about a specific adapter or even the chipset. Given this, we might not need many files but those files would need to be updated everytime a new LTS kernel is released if there have been changes. The file would need the date of the latest update and the information from iw list but beyond that... I'm still thinking if we really need anything else. What do you think?