Commit f63872b
committed
Support transmit power
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.1 parent a8bdf8a commit f63872b
2 files changed
+83
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
158 | 161 | | |
159 | 162 | | |
160 | 163 | | |
| |||
387 | 390 | | |
388 | 391 | | |
389 | 392 | | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
390 | 407 | | |
391 | 408 | | |
392 | 409 | | |
| |||
1840 | 1857 | | |
1841 | 1858 | | |
1842 | 1859 | | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
1843 | 1918 | | |
1844 | 1919 | | |
1845 | 1920 | | |
| |||
1860 | 1935 | | |
1861 | 1936 | | |
1862 | 1937 | | |
| 1938 | + | |
| 1939 | + | |
1863 | 1940 | | |
1864 | 1941 | | |
1865 | 1942 | | |
| |||
2044 | 2121 | | |
2045 | 2122 | | |
2046 | 2123 | | |
2047 | | - | |
| 2124 | + | |
2048 | 2125 | | |
2049 | 2126 | | |
2050 | 2127 | | |
| |||
0 commit comments