]> git.baikalelectronics.ru Git - kernel.git/commit
staging: vt6656: Refactor the assignment of the phy->signal variable
authorOscar Carter <oscar.carter@gmx.com>
Tue, 14 Apr 2020 15:38:48 +0000 (17:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Apr 2020 11:40:22 +0000 (13:40 +0200)
commit1b97d7b9c089aa053f0600146c4c57ed78a9b546
treeeb970afd2049a22ba34ad671edbb4745180c26c5
parenta89a826d760ac2159b7148d127398807ea46fa2d
staging: vt6656: Refactor the assignment of the phy->signal variable

Create a constant array with the values of the "phy->signal" for every
rate. Remove all "phy->signal" assignments inside the switch statement
and replace these with a single reading from the new vnt_phy_signal
array.

The constant array can be of one dimension because the OR mask with
BIT(3) or BIT(4) allow obtain a second value according to the rate,
the preamble_type and the pkt_type.

Signed-off-by: Oscar Carter <oscar.carter@gmx.com>
Link: https://lore.kernel.org/r/20200414153849.5785-5-oscar.carter@gmx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/baseband.c