Loading drivers/net/wireless/ath/wil6210/debugfs.c +1 −1 Original line number Diff line number Diff line Loading @@ -402,7 +402,7 @@ static int wil_debugfs_iomem_x32_get(void *data, u64 *val) if (ret < 0) return ret; *val = readl((void __iomem *)d->offset); *val = readl_relaxed((void __iomem *)d->offset); wil_pm_runtime_put(wil); Loading drivers/net/wireless/ath/wil6210/txrx.c +28 −13 Original line number Diff line number Diff line // SPDX-License-Identifier: ISC /* * Copyright (c) 2012-2017 Qualcomm Atheros, Inc. * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include <linux/etherdevice.h> Loading Loading @@ -41,6 +30,32 @@ MODULE_PARM_DESC(rx_large_buf, " allocate 8KB RX buffers, default - no"); /* Drop Tx packets in case Tx ring is full */ bool drop_if_ring_full; #define WIL6210_MAX_HEADROOM_SIZE (256) ushort headroom_size; /* = 0; */ static int headroom_size_set(const char *val, const struct kernel_param *kp) { int ret; ret = param_set_uint(val, kp); if (ret) return ret; if (headroom_size > WIL6210_MAX_HEADROOM_SIZE) return -EINVAL; return 0; } static const struct kernel_param_ops headroom_ops = { .set = headroom_size_set, .get = param_get_ushort, }; module_param_cb(headroom_size, &headroom_ops, &headroom_size, 0644); MODULE_PARM_DESC(headroom_size, " headroom size for rx skb allocation, default - 0"); static inline uint wil_rx_snaplen(void) { return rx_align_2 ? 6 : 0; Loading Loading @@ -623,7 +638,7 @@ static int wil_rx_refill(struct wil6210_priv *wil, int count) u32 next_tail; int rc = 0; int headroom = ndev->type == ARPHRD_IEEE80211_RADIOTAP ? WIL6210_RTAP_SIZE : 0; WIL6210_RTAP_SIZE : headroom_size; for (; next_tail = wil_ring_next_tail(v), (next_tail != v->swhead) && (count-- > 0); Loading drivers/net/wireless/ath/wil6210/txrx_edma.c +3 −13 Original line number Diff line number Diff line // SPDX-License-Identifier: ISC /* * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include <linux/etherdevice.h> Loading Loading @@ -182,10 +171,11 @@ static int wil_ring_alloc_skb_edma(struct wil6210_priv *wil, return -EAGAIN; } skb = dev_alloc_skb(sz); skb = dev_alloc_skb(sz + headroom_size); if (unlikely(!skb)) return -ENOMEM; skb_reserve(skb, headroom_size); skb_put(skb, sz); /** Loading drivers/net/wireless/ath/wil6210/wil6210.h +1 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ extern bool rx_large_buf; extern bool debug_fw; extern bool disable_ap_sme; extern bool ftm_mode; extern ushort headroom_size; extern bool drop_if_ring_full; extern uint max_assoc_sta; Loading Loading
drivers/net/wireless/ath/wil6210/debugfs.c +1 −1 Original line number Diff line number Diff line Loading @@ -402,7 +402,7 @@ static int wil_debugfs_iomem_x32_get(void *data, u64 *val) if (ret < 0) return ret; *val = readl((void __iomem *)d->offset); *val = readl_relaxed((void __iomem *)d->offset); wil_pm_runtime_put(wil); Loading
drivers/net/wireless/ath/wil6210/txrx.c +28 −13 Original line number Diff line number Diff line // SPDX-License-Identifier: ISC /* * Copyright (c) 2012-2017 Qualcomm Atheros, Inc. * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include <linux/etherdevice.h> Loading Loading @@ -41,6 +30,32 @@ MODULE_PARM_DESC(rx_large_buf, " allocate 8KB RX buffers, default - no"); /* Drop Tx packets in case Tx ring is full */ bool drop_if_ring_full; #define WIL6210_MAX_HEADROOM_SIZE (256) ushort headroom_size; /* = 0; */ static int headroom_size_set(const char *val, const struct kernel_param *kp) { int ret; ret = param_set_uint(val, kp); if (ret) return ret; if (headroom_size > WIL6210_MAX_HEADROOM_SIZE) return -EINVAL; return 0; } static const struct kernel_param_ops headroom_ops = { .set = headroom_size_set, .get = param_get_ushort, }; module_param_cb(headroom_size, &headroom_ops, &headroom_size, 0644); MODULE_PARM_DESC(headroom_size, " headroom size for rx skb allocation, default - 0"); static inline uint wil_rx_snaplen(void) { return rx_align_2 ? 6 : 0; Loading Loading @@ -623,7 +638,7 @@ static int wil_rx_refill(struct wil6210_priv *wil, int count) u32 next_tail; int rc = 0; int headroom = ndev->type == ARPHRD_IEEE80211_RADIOTAP ? WIL6210_RTAP_SIZE : 0; WIL6210_RTAP_SIZE : headroom_size; for (; next_tail = wil_ring_next_tail(v), (next_tail != v->swhead) && (count-- > 0); Loading
drivers/net/wireless/ath/wil6210/txrx_edma.c +3 −13 Original line number Diff line number Diff line // SPDX-License-Identifier: ISC /* * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include <linux/etherdevice.h> Loading Loading @@ -182,10 +171,11 @@ static int wil_ring_alloc_skb_edma(struct wil6210_priv *wil, return -EAGAIN; } skb = dev_alloc_skb(sz); skb = dev_alloc_skb(sz + headroom_size); if (unlikely(!skb)) return -ENOMEM; skb_reserve(skb, headroom_size); skb_put(skb, sz); /** Loading
drivers/net/wireless/ath/wil6210/wil6210.h +1 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ extern bool rx_large_buf; extern bool debug_fw; extern bool disable_ap_sme; extern bool ftm_mode; extern ushort headroom_size; extern bool drop_if_ring_full; extern uint max_assoc_sta; Loading