IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Replace the driver-specific _SUCCESS and _FAIL error codes in
rtw_read_port. Return 0 for success or a negative error code as
we do elsewhere in the kernel.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230206201800.139195-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The rtw_read_port function needs a struct recv_buf for preparing the usb
transfer.
Replace its u8 *rmem parameter with a struct recv_buf pointer to avoid
casts in the caller and in rtw_read_port.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230206201800.139195-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Convert the function _rtw_init_recv_priv() away from returning _FAIL
and _SUCCESS, which uses inverted error logic. Return 0 for success
and negative values for failure instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230205080559.8319-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Convert the function rtl8188eu_init_recv_priv() away from returning
_FAIL and _SUCCESS, which uses inverted error logic. Return 0 for
success and negative values for failure instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230205080559.8319-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once. This requires saving off the root directory dentry to make
creation of individual device subdirectories easier.
Cc: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Sidong Yang <realwakka@gmail.com>
Cc: Liu Shixin <liushixin2@huawei.com>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230202141138.2291946-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Information in the TODO file for bit_rate configuration is
insufficient.
This patch adds information on how to approach when considering
to modify bit_rate to support upto 300kbps.
Signed-off-by: Guru Mehar Rachaputi <gurumeharrachaputi@gmail.com>
Acked-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/Y9laj+z0TuasBRx5@combine-ThinkPad-S1-Yoga
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Clean up the NULL check for padapter->pnetdev->rx_handler_data.
The current code calls rcu_dereference while it holds the rcu read lock
and checks the pointer after releasing the lock. An rcu pointer may only be
used between calls to rcu_read_lock and rcu_read_unlock.
Replace the check with rcu_access_pointer. My understanding is that this
function returns the value of the pointer and needs no locking. We can
then check the pointer but we must not dereference it.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20230131090057.241779-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace a switch-case in rtw_write_port with an if statement and make the
code a bit shorter.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20230130195303.138941-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
legacy_dz in struct sta_xmit_priv is initialised but not used. It can be
removed.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20230130195303.138941-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
rtw_free_xmitframe_list iterates over the list of xmit_frames and frees
each entry. We can use list_for_each_entry_safe instead of coding this
manually. We need the _safe version as the current pxmitframe will be
removed from the list by rtw_free_xmitframe.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20230130195303.138941-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
We can now change sta_pending in struct tx_servq from __queue to
list_head. The driver defines __queue as list_head + spinlock, the
spinlock is not used for sta_pending.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20230130195303.138941-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Modify the rtw_free_xmitframe_queue function to take a list_head pointer
instead of a __queue pointer.
This is an intermediate step towards changing struct tx_servq's
sta_pending from __queue to list_head.
Now that the function takes a list instead of a queue, we should also
rename it to rtw_free_xmitframe_list.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20230130195303.138941-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Modify the dequeue_xmitframes_to_sleeping_queue function to take a
list_head pointer instead of a __queue pointer.
This is an intermediate step towards changing struct tx_servq's
sta_pending from __queue to list_head.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20230130195303.138941-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
There's no need for a spinlock in rtw_free_xmitframe_queue.
This function is called only from rtw_free_stainfo. rtw_free_stainfo holds
pxmitpriv->lock during all rtw_free_xmitframe_queue calls.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20230130195303.138941-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
rxSNRdB is initialized and set but never read. Remove dead code. Local
variable rx_snrX is then of no use. Remove rx_snrX as well. Local
variable tmp_rxsnr is then of no use. Remove tmp_rxsnr as well.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/b3150d506556375c4b155c51eabf79e128f50780.1675003608.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rename constant TxBBGainTableLength to TX_BB_GAIN_TABLE_LEN,
CCKTxBBGainTableLength to CCK_TX_BB_GAIN_TABLE_LEN and
RT_CID_819x_Netcore to RT_CID_819X_NETCORE to avoid CamelCase which is
not accepted by checkpatch. Added spaces before and after "-" to fix
checkpatch message.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/0f390222d1bd272c3e63d1b2936109ac50e9f05f.1675003608.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
There's only two defines left in usb_ops_linux.h. Move those defines to
usb_ops_linux.c, where they are used.
Remove the now empty file usb_ops_linux.h.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230124210108.62170-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Remove some unused defines from usb_ops_linux.h.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230124210108.62170-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
usb_ops_linux.h has a number of defines that strip the regs parameter from
function that should be used as urb callbacks.
Remove the defines for functions that don't exist in the r8188eu driver.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230124210108.62170-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Remove the regs parameter from usb_read_port_complete, it is not used.
Without the regs parameter, there's no need for the define that makes
usb_read_port_complete usable as urb callback function.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230124210108.62170-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
num_process_phyinfo, received_bwtype and rxoverflow are initialized and
increased but never read. Remove dead code. As a result prxsc is unused
which in result makes rxsc_sgien_exflg unused. Remove prxsc and
rxsc_sgien_exflg as well.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/ff9daec237b795a01629080d0d5f7ec73b2d89da.1674675808.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
numpacket_toself, numpacket_matchbssid and received_preamble_GI are
initialized and increased but never read. Remove dead code. As a result
the local variable preamble_guardinterval is unused. Remove it also.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/0ed5f4134176393110fdb0b7424df7a8a6fc6262.1674675808.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
During sending the base address of the slots to the VideoCore
firmware via mailbox property, issues could happened on the ARM
and on the VideoCore side. So better separate the error handling
in order to provide more details. This should help to narrow
down the possible cause.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20230123191629.21019-1-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
rtw_free_hwxmits is called only by _rtw_free_xmit_priv. We can merge the
two functions and make the code a bit shorter.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230123205342.229589-24-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
apsd_setting in struct tx_servq is not used, it can be removed.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230123205342.229589-23-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
struct agg_pkt_info is not used in the r8188eu driver. Remove it.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230123205342.229589-22-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The rtw_xmitframe_enqueue function is only one line. We can remove it and
call rtw_xmit_classifier directly.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230123205342.229589-21-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
In function rtw_xmitframe_enqueue, we can simply relay the error code from
rtw_xmit_classifier.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230123205342.229589-20-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
struct hw_xmit's sta_list points to one of vo, vi, be or bk_pending in
struct xmit_priv. All of these are defined as struct __queue, which is a
list plus a spinlock.
For these components, the spinlock is unused, we need only the list.
This patch converts sta_list and vo, vi, be and bk_pending to struct
list_head.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230123205342.229589-19-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
dequeue_one_xmitframe is a small function that is called only from
rtw_dequeue_xframe. Merge the two functions.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230123205342.229589-18-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>