- 22 Jul, 2022 23 commits
-
-
Johannes Berg authored
If given by the underlying driver, report the link ID for MLO in NL80211_CMD_FRAME. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Avraham Stern authored
When the low level driver reports hardware timestamps for frame TX status or frame RX, pass the timestamps to cfg80211. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Avraham Stern authored
Add hardware timestamps to management frame RX info. This shall be used by drivers that support hardware timestamping for Timing measurement and Fine timing measurement action frames RX. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Avraham Stern authored
The functions for reporting rx management take many arguments. Collect all the arguments into a struct, which also make it easier to add more arguments if needed. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Avraham Stern authored
Add a function for reporting TX status with hardware timestamps. This function shall be used for reporting the TX status of Timing measurement and Fine timing measurement action frames by devices that support reporting hardware timestamps. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Avraham Stern authored
Add attributes for reporting hardware timestamps for management frames RX and TX. These attributes will be used for reporting hardware timestamps for Timing measurement and Fine Timing Measurement action frames, which will allow userspace applications to measure the path delay between devices and sync clocks. For TX, these attributes are used for reporting the frame RX time and the ack TX time. For TX, they are used for reporting the frame TX time and the ack RX time. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Avraham Stern authored
Add helper functions for detection timing measurement and fine timing measurement frames. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
For wmediumd/virtio, handle both the RX channel for links, as well as the link addresses when links are added/removed. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
When inserting a link STA, make sure it doesn't exist first and add lockdep assertions that we cannot modify the hash table without holding the sta_mtx, so this check is really correct. Also return without hashing if the driver failed, and warn if the hashing fails, which shouldn't happen due to the check described above. Fixes: cb71f1d1 ("wifi: mac80211: add sta link addition/removal") Fixes: ba6ddab9 ("wifi: mac80211: maintain link-sta hash table") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
We need to copy the address to both the private and public portion of the link_sta (the private one is needed for the hash table). Fix this. Fixes: bbe90107 ("wifi: mac80211: mlme: refactor link station setup") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Clarify the link ID behaviour in control port TX, we need it to select the link to transmit on for both MLD and non-MLD receivers, but select the link address as the SA only if the receiver is not an MLD. Fixes: 67207bab ("wifi: cfg80211/mac80211: Support control port TX from specific link") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
If the frame is going to be dropped anyway because ieee80211_lookup_ra_sta() returned an error (and even though it's a bit racy, it will likely continue to do so), return the error out instead of just silently dropping the frame. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
We always need the MLD address and link ID to add or modify the link STA, so require it in the API. Fixes: 577e5b8c ("wifi: cfg80211: add API to add/modify/remove a link station") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Add more sanity checks to the API handling, we shouldn't be able to create a station without links, nor should we be able to add a link to a station that wasn't created as an MLD with links in the first place. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
There are two issues here: we unhash the link stations only directly before freeing the station they belong to, and we also don't unhash all the links correctly in all cases. Fix these issues. Fixes: ba6ddab9 ("wifi: mac80211: maintain link-sta hash table") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
When modifying a link station, validate that the link address doesn't change, except the first time the link is created. Fixes: b95eb7f0 ("wifi: cfg80211/mac80211: separate link params from station params") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
At this point, we've already changed link_id to be zero for a non-MLO connection, so use the 'mlo' variable rather than link ID to determine the MLO status of the station. Fixes: bd363ee5 ("wifi: mac80211: mlme: set sta.mlo correctly") Fixes: 81151ce4 ("wifi: mac80211: support MLO authentication/association with one link") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
If there's a non-MLO client, the A2 must be set to the BSSID of the link since no translation will happen in lower layers and it's needed that way for encryption. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
There are two issues here: we need to do the translation even in case mac80211 selected a link, and we should only translate the A3 if it's the BSSID. Fix both. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
We should only translate addr3 here if it's the BSSID. Fixes: 42fb9148 ("wifi: mac80211: do link->MLD address translation on RX") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
If we have a non-MLD STA on an AP MLD, we crash while adding the station. Fix that, in this case we need to use the STA's address also on the link data structure. Fixes: f36fe0a2 ("wifi: mac80211: fix up link station creation/insertion") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
In my previous changes here, I neglected to take the old conn_flags into account that might still be present from the authentication, and thus ieee80211_setup_assoc_link() can misbehave, as well as the override calculation being wrong. Fix that by ORing in the old flags. Fixes: 1845c1d4 ("wifi: mac80211: mlme: refactor assoc link setup") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
In a few places we need to use the AP (MLD) address, not the deflink BSSID, the link address translation will happen later. To make that work properly for fast-xmit, set up the ap_addr in the vif.cfg earlier. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
- 18 Jul, 2022 17 commits
-
-
Jilin Yuan authored
Delete the redundant word 'the'. Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220710043405.38304-1-yuanjilin@cdjrlc.com
-
Jilin Yuan authored
Delete the redundant word 'the'. Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220710043007.33288-1-yuanjilin@cdjrlc.com
-
Jilin Yuan authored
Delete the redundant word 'not'. Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220710042546.28504-1-yuanjilin@cdjrlc.com
-
Jilin Yuan authored
Delete the redundant words 'in' and 'scan'. Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220710042040.22456-1-yuanjilin@cdjrlc.com
-
Jilin Yuan authored
Delete the redundant words 'is' and 'with'. Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220710041442.16177-1-yuanjilin@cdjrlc.com
-
Jilin Yuan authored
Delete the redundant word 'the'. Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220710041005.10950-1-yuanjilin@cdjrlc.com
-
Jilin Yuan authored
Delete the redundant words 'to' and 'if'. Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220709135316.41425-1-yuanjilin@cdjrlc.com
-
Jilin Yuan authored
Delete the redundant word 'the'. Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220709134701.36081-1-yuanjilin@cdjrlc.com
-
Jilin Yuan authored
Delete the redundant word 'the'. Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220709134207.30856-1-yuanjilin@cdjrlc.com
-
Jilin Yuan authored
Delete the redundant words 'this' and 'and'. Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220709133618.25958-1-yuanjilin@cdjrlc.com
-
Jilin Yuan authored
Delete the redundant word 'early'. Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220709133119.21076-1-yuanjilin@cdjrlc.com
-
Jilin Yuan authored
Delete the redundant word 'long'. Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220709132637.16717-1-yuanjilin@cdjrlc.com
-
Tetsuo Handa authored
lockdep complains use of uninitialized spinlock at ieee80211_do_stop() [1], for commit f856373e ("wifi: mac80211: do not wake queues on a vif that is being stopped") guards clear_bit() using fq.lock even before fq_init() from ieee80211_txq_setup_flows() initializes this spinlock. According to discussion [2], Toke was not happy with expanding usage of fq.lock. Since __ieee80211_wake_txqs() is called under RCU read lock, we can instead use synchronize_rcu() for flushing ieee80211_wake_txqs(). Link: https://syzkaller.appspot.com/bug?extid=eceab52db7c4b961e9d6 [1] Link: https://lkml.kernel.org/r/874k0zowh2.fsf@toke.dk [2] Reported-by: syzbot <syzbot+eceab52db7c4b961e9d6@syzkaller.appspotmail.com> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Fixes: f856373e ("wifi: mac80211: do not wake queues on a vif that is being stopped") Tested-by: syzbot <syzbot+eceab52db7c4b961e9d6@syzkaller.appspotmail.com> Acked-by: Toke Høiland-Jørgensen <toke@kernel.org> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/9cc9b81d-75a3-3925-b612-9d0ad3cab82b@I-love.SAKURA.ne.jp
-
Rustam Subkhankulov authored
The assignment of the value to the variable total in the loop condition must be enclosed in additional parentheses, since otherwise, in accordance with the precedence of the operators, the conjunction will be performed first, and only then the assignment. Due to this error, a warning later in the function after the loop may not occur in the situation when it should. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Rustam Subkhankulov <subkhankulov@ispras.ru> Fixes: 0d4171e2 ("p54: implement flush callback") Acked-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220714134831.106004-1-subkhankulov@ispras.ru
-
Justin Stitt authored
When building with Clang we encounter this warning: | drivers/net/wireless/mediatek/mt7601u/debugfs.c:92:6: error: format | specifies type 'unsigned char' but the argument has type 'int' | [-Werror,-Wformat] dev->ee->reg.start + dev->ee->reg.num - 1); The format specifier used is `%hhu` which describes a u8. Both `dev->ee->reg.start` and `.num` are u8 as well. However, the expression as a whole is promoted to an int as you cannot get smaller-than-int from addition. Therefore, to fix the warning, use the promoted-to-type's format specifier -- in this case `%d`. example: ``` uint8_t a = 4, b = 7; int size = sizeof(a + b - 1); printf("%d\n", size); // output: 4 ``` See more: (https://wiki.sei.cmu.edu/confluence/display/c/INT02-C.+Understand+integer+conversion+rules) "Integer types smaller than int are promoted when an operation is performed on them. If all values of the original type can be represented as an int, the value of the smaller type is converted to an int; otherwise, it is converted to an unsigned int." Signed-off-by: Justin Stitt <justinstitt@google.com> Acked-by: Jakub Kicinski <kubakici@wp.pl> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220711212932.1501592-1-justinstitt@google.com
-
Justin Stitt authored
When building with Clang we encounter the following warning: | drivers/net/wireless/mediatek/mt7601u/eeprom.c:193:5: error: format | specifies type 'char' but the argument has type 'int' [-Werror,-Wformat] | chan_bounds[idx].start + chan_bounds[idx].num - 1); Variadic functions (printf-like) undergo default argument promotion. Documentation/core-api/printk-formats.rst specifically recommends using the promoted-to-type's format flag. Moreover, C11 6.3.1.1 states: (https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1548.pdf) `If an int can represent all values of the original type ..., the value is converted to an int; otherwise, it is converted to an unsigned int. These are called the integer promotions.` With this information in hand, we really should stop using `%hh[dxu]` or `%h[dxu]` as they usually prompt Clang -Wformat warnings as well as go against documented standard recommendations. Link: https://github.com/ClangBuiltLinux/linux/issues/378Signed-off-by: Justin Stitt <justinstitt@google.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220709001527.618593-1-justinstitt@google.com
-
Christophe JAILLET authored
Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/2755b8b7d85a2db0663d39ea6df823f94f3401b3.1656939750.git.christophe.jaillet@wanadoo.fr
-