-
Notifications
You must be signed in to change notification settings - Fork 48
Support transmit power #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
In the future, we may be able to introduce device coordinate parameters to calculate the RSSI value in free space in conjunction with transmit power. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improve the git commit message. Consider the following:
This commit introduces 'tx_power' to the virtual interface to specify
the device's transmit power level. It also adds vwifi_set_tx_power()
and vwifi_get_tx_power() to align with 'set_tx_power' and 'get_tx_power'
in cfg80211_ops, respectively. The vwifi_set_tx_power() enables the
setting of the device's transmit power, whereas vwifi_get_tx_power()
facilitates the retrieval of this information.Users can adjust the transmit power by employing the command:
iwconfig vwN txpower
where N stands for the entry of network interface.
Also, you should avoid using "iwconfig," which is deprecated. Use "iw" command for consistency.
I'm currently facing an problem when using [ 1623.934439] wdev: 0000000000000000, vif: 0000000000000000
[ 1623.934447] wdev is NULL Thus, I tried using I found that the current set_tx_power function in Linux does not use the I found that the function definition didn't use int (*set_tx_power)(struct wiphy* wiphy, enum nl80211_tx_power_setting type, int mbm); cfg80211: allow per interface TX power setting
int (*set_tx_power)(struct wiphy* wiphy, struct wireless_dev* wdev, enum nl80211_tx_power_setting type, int mbm); mwifiex: add a cfg80211 .get_tx_power operation callback
|
If this pull request is ready for reviewing, use |
This commit introduces 'tx_power' to the virtual interface to specify the device's transmit power level. It also adds vwifi_set_tx_power() and vwifi_get_tx_power() to align with 'set_tx_power' and 'get_tx_power' in cfg80211_ops, respectively. The vwifi_set_tx_power() enables the setting of the device's transmit power, whereas vwifi_get_tx_power() facilitates the retrieval of this information. Users can adjust the transmit power by employing the command: iw dev [interface] set txpower auto/limit/fixed [transmit power (mBm)] auto: Use default transmit power limit: Restrict power limits to a specific value fixed: Set power freely Since using the above command results in the 'wdev' parameter NULL, a new function 'wiphy_get_vwifi_vif' was added to obtain the virtual interface. Additionally, the 'type' parameter is used to distinguish between "auto/limit/fixed". This commit also modifies the comments regarding mBm. In Linux source files, the correct terminology is mBm rather than mdBm. In traditional measurements, 'm' usually represents 10 to the power of negative three. However, 1 dBm equals 100 mBm, so using mdBm could be misleading.
Thank @jychen0611 for contributing! |
Add
tx_power
to the virtual interface to describe the device's transmit power.Implement
vwifi_set_tx_power
andvwifi_get_tx_power
to correspond toset_tx_power
andget_tx_power
in cfg80211_ops, respectively.vwifi_set_tx_power
can set the device's transmit power, whilevwifi_get_tx_power
can retrieve the transmit power information.The transmit power can be set using the iwconfig vwn txpower command.