#
779163fa |
| 19-Sep-2023 |
Wu Yunchuan <yunchuan@nfschina.com> |
wifi: ath6kl: remove unnecessary (void*) conversions
No need cast (void *) to (struct ath6kl *) or (struct ath6kl_cookie *).
Signed-off-by: Wu Yunchuan <yunchuan@nfschina.com> Signed-off-by: Kalle
wifi: ath6kl: remove unnecessary (void*) conversions
No need cast (void *) to (struct ath6kl *) or (struct ath6kl_cookie *).
Signed-off-by: Wu Yunchuan <yunchuan@nfschina.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20230919045008.523730-1-yunchuan@nfschina.com
show more ...
|
#
54f9ab7b |
| 13-Aug-2020 |
Dan Carpenter <dan.carpenter@oracle.com> |
ath6kl: prevent potential array overflow in ath6kl_add_new_sta()
The value for "aid" comes from skb->data so Smatch marks it as untrusted. If it's invalid then it can result in an out of bounds arr
ath6kl: prevent potential array overflow in ath6kl_add_new_sta()
The value for "aid" comes from skb->data so Smatch marks it as untrusted. If it's invalid then it can result in an out of bounds array access in ath6kl_add_new_sta().
Fixes: 572e27c00c9d ("ath6kl: Fix AP mode connect event parsing and TIM updates") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200813141315.GB457408@mwanda
show more ...
|
#
8238bf0d |
| 27-Jul-2020 |
Gustavo A. R. Silva <gustavoars@kernel.org> |
ath6kl: Use fallthrough pseudo-keyword
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1].
[1] https://www.kernel.org/doc/html/v5.7/p
ath6kl: Use fallthrough pseudo-keyword
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1].
[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200727195111.GA1603@embeddedor
show more ...
|
#
6d9e1ecd |
| 22-Oct-2018 |
Gustavo A. R. Silva <gustavo@embeddedor.com> |
ath6kl: Mark expected switch fall-through
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Addresses-Coverity-ID: 201383 ("Missing break
ath6kl: Mark expected switch fall-through
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Addresses-Coverity-ID: 201383 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Acked-by: Steve deRosier <derosier@cal-sierra.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
show more ...
|
#
4ac1f003 |
| 25-Jul-2018 |
Varsha Rao <rvarsha016@gmail.com> |
ath6kl: Remove unnecessary parentheses
Remove extra parentheses to fix the clang warning of extraneous parentheses.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Kalle Valo <kvalo
ath6kl: Remove unnecessary parentheses
Remove extra parentheses to fix the clang warning of extraneous parentheses.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
show more ...
|
#
619c9700 |
| 09-Jul-2018 |
Colin Ian King <colin.king@canonical.com> |
ath6kl: remove redundant variables netlen, orig_buf, orig_len, dropped and stats
Variables netlen, orig_buf, orig_len, dropped and stats are assigned values but are never used hence they are redunda
ath6kl: remove redundant variables netlen, orig_buf, orig_len, dropped and stats
Variables netlen, orig_buf, orig_len, dropped and stats are assigned values but are never used hence they are redundant and can be removed.
Cleans up clang warnings: warning: variable 'netlen' set but not used [-Wunused-but-set-variable] warning: variable 'orig_buf' set but not used [-Wunused-but-set-variable] warning: variable 'orig_len' set but not used [-Wunused-but-set-variable] warning: variable 'dropped' set but not used [-Wunused-but-set-variable] warning: variable 'stats' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
show more ...
|
#
41bd3d58 |
| 10-May-2018 |
Toke Høiland-Jørgensen <toke@toke.dk> |
wireless-drivers: Dynamically allocate struct station_info
Since the addition of the TXQ stats to cfg80211, the station_info struct has grown to be quite large, which results in warnings when alloca
wireless-drivers: Dynamically allocate struct station_info
Since the addition of the TXQ stats to cfg80211, the station_info struct has grown to be quite large, which results in warnings when allocated on the stack. Fix the affected places to do dynamic allocations instead.
Fixes: 52539ca89f36 ("cfg80211: Expose TXQ stats and parameters to userspace") Reviewed-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
show more ...
|
#
7ac76764 |
| 24-Oct-2017 |
Kees Cook <keescook@chromium.org> |
ath: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pa
ath: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly.
Cc: Kalle Valo <kvalo@qca.qualcomm.com> Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
show more ...
|
#
cf124db5 |
| 08-May-2017 |
David S. Miller <davem@davemloft.net> |
net: Fix inconsistent teardown and release of private netdev state.
Network devices can allocate reasources and private memory using netdev_ops->ndo_init(). However, the release of these resources
net: Fix inconsistent teardown and release of private netdev state.
Network devices can allocate reasources and private memory using netdev_ops->ndo_init(). However, the release of these resources can occur in one of two different places.
Either netdev_ops->ndo_uninit() or netdev->destructor().
The decision of which operation frees the resources depends upon whether it is necessary for all netdev refs to be released before it is safe to perform the freeing.
netdev_ops->ndo_uninit() presumably can occur right after the NETDEV_UNREGISTER notifier completes and the unicast and multicast address lists are flushed.
netdev->destructor(), on the other hand, does not run until the netdev references all go away.
Further complicating the situation is that netdev->destructor() almost universally does also a free_netdev().
This creates a problem for the logic in register_netdevice(). Because all callers of register_netdevice() manage the freeing of the netdev, and invoke free_netdev(dev) if register_netdevice() fails.
If netdev_ops->ndo_init() succeeds, but something else fails inside of register_netdevice(), it does call ndo_ops->ndo_uninit(). But it is not able to invoke netdev->destructor().
This is because netdev->destructor() will do a free_netdev() and then the caller of register_netdevice() will do the same.
However, this means that the resources that would normally be released by netdev->destructor() will not be.
Over the years drivers have added local hacks to deal with this, by invoking their destructor parts by hand when register_netdevice() fails.
Many drivers do not try to deal with this, and instead we have leaks.
Let's close this hole by formalizing the distinction between what private things need to be freed up by netdev->destructor() and whether the driver needs unregister_netdevice() to perform the free_netdev().
netdev->priv_destructor() performs all actions to free up the private resources that used to be freed by netdev->destructor(), except for free_netdev().
netdev->needs_free_netdev is a boolean that indicates whether free_netdev() should be done at the end of unregister_netdevice().
Now, register_netdevice() can sanely release all resources after ndo_ops->ndo_init() succeeds, by invoking both ndo_ops->ndo_uninit() and netdev->priv_destructor().
And at the end of unregister_netdevice(), we invoke netdev->priv_destructor() and optionally call free_netdev().
Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
1235a3b6 |
| 09-Feb-2017 |
Tobias Klauser <tklauser@distanz.ch> |
ath6kl: Use net_device_stats from struct net_device
Instead of using a private copy of struct net_device_stats in struct ath6kl_vif, use stats from struct net_device. Also remove the now unnecessary
ath6kl: Use net_device_stats from struct net_device
Instead of using a private copy of struct net_device_stats in struct ath6kl_vif, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
show more ...
|
#
93803b33 |
| 03-Mar-2015 |
Joe Perches <joe@perches.com> |
wireless: Use eth_<foo>_addr instead of memset
Use the built-in function instead of memset.
Miscellanea:
Add #include <linux/etherdevice.h> where appropriate Use ETH_ALEN instead of 6
Signed-off-
wireless: Use eth_<foo>_addr instead of memset
Use the built-in function instead of memset.
Miscellanea:
Add #include <linux/etherdevice.h> where appropriate Use ETH_ALEN instead of 6
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
319090bf |
| 17-Nov-2014 |
Johannes Berg <johannes.berg@intel.com> |
cfg80211: remove enum station_info_flags
This is really just duplicating the list of information that's already available in the nl80211 attribute, so remove the list. Two small changes are needed:
cfg80211: remove enum station_info_flags
This is really just duplicating the list of information that's already available in the nl80211 attribute, so remove the list. Two small changes are needed: * remove STATION_INFO_ASSOC_REQ_IES complete, but the length (assoc_req_ies_len) can be used instead * add NL80211_STA_INFO_RX_DROP_MISC which exists internally but not in nl80211 yet
This gets rid of the duplicate maintenance of the two lists.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
show more ...
|
#
10d49878 |
| 17-Aug-2014 |
Hans Wennborg <hans@hanshq.net> |
ath6kl: fix %d confusingly prefixed with 0x in format strings
Signed-off-by: Hans Wennborg <hans@hanshq.net> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
|
#
78803770 |
| 17-Jun-2014 |
Jessica Wu <wjessica@qca.qualcomm.com> |
ath6kl: add support for ar6004 hw3.0
This change enables ath6kl driver to support ar6004 hw3.0. At the same time do some fixes in firmware initialisation which applies to ar6004 hw1.3 as well.
Sign
ath6kl: add support for ar6004 hw3.0
This change enables ath6kl driver to support ar6004 hw3.0. At the same time do some fixes in firmware initialisation which applies to ar6004 hw1.3 as well.
Signed-off-by: Jessica Wu <wjessica@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
show more ...
|
#
c1d32d30 |
| 17-Jun-2014 |
Jessica Wu <wjessica@qca.qualcomm.com> |
ath6kl: add support wmi rate tables with mcs15
Some of the firmware versions support rate tables up to mcs15, add support for that.
Signed-off-by: Jessica Wu <wjessica@qca.qualcomm.com> Signed-off-
ath6kl: add support wmi rate tables with mcs15
Some of the firmware versions support rate tables up to mcs15, add support for that.
Signed-off-by: Jessica Wu <wjessica@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
show more ...
|
#
a5d8f9df |
| 11-Mar-2014 |
Kalle Valo <kvalo@qca.qualcomm.com> |
ath6kl: use braces on both arms of if statement
Fixes checkpatch warning:
CHECK: braces {} should be used on all arms of this statement
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
|
#
3629fa14 |
| 11-Mar-2014 |
Kalle Valo <kvalo@qca.qualcomm.com> |
ath6kl: fix blank lines before and after braces
Fixes checkpatch warnings:
CHECK: Blank lines aren't necessary after an open brace '{' CHECK: Blank lines aren't necessary before a close brace '}'
ath6kl: fix blank lines before and after braces
Fixes checkpatch warnings:
CHECK: Blank lines aren't necessary after an open brace '{' CHECK: Blank lines aren't necessary before a close brace '}'
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
show more ...
|
#
9d0e2f07 |
| 05-Aug-2013 |
Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> |
ath6kl: Fix invalid pointer access on fuzz testing with AP mode
In our Fuz testing, reference client corrupts the dest mac to "00:00:00:00:00:00" in the WPA2 handshake no 2. During driver init the s
ath6kl: Fix invalid pointer access on fuzz testing with AP mode
In our Fuz testing, reference client corrupts the dest mac to "00:00:00:00:00:00" in the WPA2 handshake no 2. During driver init the sta_list entries mac addresses are by default "00:00:00:00:00:00". Driver returns an invalid pointer (conn) and the drver shall crash, if rxtids (aggr_conn) skb queues are accessed, since they would not be initialized.
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
show more ...
|
#
6a3e4e06 |
| 10-Mar-2013 |
Myoungje Kim <mjei78@gmail.com> |
ath6kl: Fix the byte alignment rule to avoid loss of bytes in a TCP segment
Either first 3 bytes of the first received tcp segment or last one over MTU size file can be loss due to the byte alignmen
ath6kl: Fix the byte alignment rule to avoid loss of bytes in a TCP segment
Either first 3 bytes of the first received tcp segment or last one over MTU size file can be loss due to the byte alignment problem. Although ATH6KL_HTC_ALIGN_BYTES was defined for 'extra bytes for htc header alignment' in the patch "Fix buffer alignment for scatter-gather I/O"(1df94a857), there exists the bytes loss issue which means that it will be truncated 3 bytes in the transmitted file contents if a file which has over MTU size is transferred through TCP/IP stack. It doesn't look like TCP/IP stack bug of 3.5 or the latest version of kernel but the byte alignment issue. This patch is to use the roundup() function for the byte alignment rather than the predefined ATH6KL_HTC_ALIGN_BYTES.
kvalo: fixed indentation
Signed-off-by: Myoungje Kim <mjei78@gmail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
show more ...
|
#
ec1461dc |
| 09-Mar-2013 |
Kalle Valo <kvalo@qca.qualcomm.com> |
ath6kl: cleanup ath6kl_reset_device()
Move it to init.c, make it static, remove all useless checks and force it to always do cold reset.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
|
#
698bf867 |
| 21-Sep-2012 |
Pandiyarajan Pitchaimuthu <c_ppitch@qca.qualcomm.com> |
ath6kl: Blocked client notification
When a station tries to connect to an AP and if the MAC of the station is in the AP's block list, the station cannot connect to the AP. This is notified to the us
ath6kl: Blocked client notification
When a station tries to connect to an AP and if the MAC of the station is in the AP's block list, the station cannot connect to the AP. This is notified to the userspace with event NL80211_CMD_CONN_FAILED and attribute NL80211_ATTR_CONN_FAILED_REASON. The reason sent will be NL80211_CONN_FAIL_BLOCKED_CLIENT.
Signed-off-by: Pandiyarajan Pitchaimuthu <c_ppitch@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
show more ...
|
#
07033ce2 |
| 21-Sep-2012 |
Pandiyarajan Pitchaimuthu <c_ppitch@qca.qualcomm.com> |
ath6kl: Max clients reached notification
When a station requests connection to an AP, that has already been connected to the maximum number of stations it can support, an event is sent to user space
ath6kl: Max clients reached notification
When a station requests connection to an AP, that has already been connected to the maximum number of stations it can support, an event is sent to user space via NL80211_CMD_CONN_FAILED command and reason attribute NL80211_ATTR_CONN_FAILED_REASON with NL80211_CONN_FAIL_MAX_CLIENTS as reason.
Signed-off-by: Pandiyarajan Pitchaimuthu <c_ppitch@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
show more ...
|
#
f21243a8 |
| 28-Jul-2012 |
Thomas Pedersen <c_tpeder@qca.qualcomm.com> |
ath6kl: reconfigure RSN capabilities when restarting AP
If the firmware decides to initiate a channel switch on an AP vif running an RSN BSS, reconfigure the saved RSN IE capabilities as well.
Fixe
ath6kl: reconfigure RSN capabilities when restarting AP
If the firmware decides to initiate a channel switch on an AP vif running an RSN BSS, reconfigure the saved RSN IE capabilities as well.
Fixes a bug where the beacon and 4-way handshake would have a capability mismatch after a channel switch, since the firmware apparently clears these on an AP disconnect.
Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
show more ...
|
#
b5495e66 |
| 27-Jul-2012 |
Thomas Pedersen <c_tpeder@qca.qualcomm.com> |
ath6kl: restart concurrent vifs on failed connect
When an ath6kl STA vif is issued a connect command, the firmware will disconnect all other beaconing vifs in preparation for a potential channel swi
ath6kl: restart concurrent vifs on failed connect
When an ath6kl STA vif is issued a connect command, the firmware will disconnect all other beaconing vifs in preparation for a potential channel switch. The case where the connect fails is currently unhandled, so if a connection attempt on a STA vif fails and any vifs were waiting for a new channel, simply restart the concurrent vifs on their previous channel.
Requires that we start tracking the last issued channel in ar->last_ch, which is valid since ath6kl only supports 1 channel at a time.
Also clear the beaconing vif's want_ch_switch bit regardless of whether channel switch succeeds, to stop recommitting the same failed profile.
Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
show more ...
|
#
4aca81bf |
| 11-Jul-2012 |
Pandiyarajan Pitchaimuthu <c_ppitch@qca.qualcomm.com> |
ath6kl: Make use of return value from ath6kl_diag_read()
In ath6kl_read_fwlogs(), return value from ath6kl_diag_read()is not used to bail out in case of any errors in reading fw log. No real issue i
ath6kl: Make use of return value from ath6kl_diag_read()
In ath6kl_read_fwlogs(), return value from ath6kl_diag_read()is not used to bail out in case of any errors in reading fw log. No real issue is observed because of this, reported by source code analyzer.
kvalo: fix a long line warning
Signed-off-by: Pandiyarajan Pitchaimuthu <c_ppitch@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
show more ...
|