From: Oleksij Rempel <linux@rempel-privat.de>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCH 00/23] ath9k|ath9k_htc: move dups to common-beacon
Date: Sun, 02 Mar 2014 08:27:02 +0100 [thread overview]
Message-ID: <5312DD46.3030800@rempel-privat.de> (raw)
In-Reply-To: <21266.37896.937680.416439@gargle.gargle.HOWL>
Am 02.03.2014 03:14, schrieb Sujith Manoharan:
> Hi,
>
> Lots of code churn. :)
>
> Maybe reusing ath9k entirely and just writing a USB layer can
> be a better approach ?
I was thinking about it too, but suddenly i don't have enough time and
experience to do it. Beside, there is no need to write usb layer. It is
clean and separate from other part of the driver. But the HTC/WMI
interface is not completely separate.
In this case ath9k driver will need some rework too. For example
beacon.c code works directly with DMA queues, see "struct ath_beacon".
May be it is still better to add needed changes in ath9k by keeping
ath9k_htc functional.
Now about bigger picture. Right now i work only on ath9k<>ath9k_htc
dups. But there are lots of dup code in ath9k itself. For example
*_phy.c, *_initvals.h. Here are some examples:
[-] 281 lines matched in 2 locations
ath/ath9k/ar9002_initvals.h(954)
ath/ath9k/ar9002_initvals.h(2486)
[-] 214 lines matched in 2 locations
ath/ath9k/ar9565_1p0_initvals.h(495)
ath/ath9k/ar9565_1p0_initvals.h(775)
[-] 164 lines matched in 2 locations
ath/ath10k/wmi.h(1205)
ath/ath10k/wmi.h(1390)
[-] 163 lines matched in 5 locations
ath/ath9k/ar9003_eeprom.c(462)
ath/ath9k/ar9003_eeprom.c(1040)
ath/ath9k/ar9003_eeprom.c(1619)
ath/ath9k/ar9003_eeprom.c(2198)
ath/ath9k/ar9003_eeprom.c(2776)
[-] 132 lines matched in 2 locations
ath/ath9k/ar9462_2p0_initvals.h(809)
ath/ath9k/ar9462_2p1_initvals.h(63)
[-] 129 lines matched in 2 locations
ath/ath9k/ar9002_phy.c(291)
ath/ath9k/ar5008_phy.c(327)
[-] 79 lines matched in 2 locations
ath/ath6kl/target.h(220)
ath/ath10k/targaddrs.h(107)
[-] 41 lines matched in 2 locations
ath/ath9k/ar9003_phy.c(889)
ath/ath9k/ar5008_phy.c(818)
[-] 36 lines matched in 2 locations
ath/ath9k/eeprom.c(191)
ath/ath9k/eeprom.c(245)
[-] 28 lines matched in 2 locations
ath/ath9k/init.c(246)
ath/ath9k/init.c(277)
[-] 28 lines matched in 2 locations
ath/ath9k/eeprom_4k.c(498)
ath/ath9k/eeprom_def.c(1030)
[-] 26 lines matched in 2 locations
ath/ath9k/ar9003_phy.c(1338)
ath/ath9k/ar5008_phy.c(1257)
[-] 23 lines matched in 3 locations
ath/ath9k/eeprom_4k.c(248)
ath/ath9k/eeprom_def.c(324)
ath/ath9k/eeprom_9287.c(235)
[-] 23 lines matched in 2 locations
ath/ath9k/htc_drv_debug.c(465)
ath/ath9k/debug.c(103)
and so on...
If some one can take care of it, it will be great :)
The programm i use (scitools Understand), found 14851 lines of
Duplicated code in wireless/ath. Probably there are some false positive
and code which was not found because of some cosmetic changes.
I assume that usb code can be reused can be same on ar5523, carl9170,
ath9k_htc. And some WMI code at least on ath10k and ath9k_htc.
> Sujith
>
> Oleksij Rempel wrote:
>> Next patch set. It removes only easy duplicats of beacon code. Other parts of
>> need deeper rework to make it compatible with ath9k.
>>
>> Oleksij Rempel (23):
>> ath9k: move struct ath_beacon_config to common
>> ath9k_htc: use common ath_beacon_config
>> ath9k_htc: move beaconq to struct htc_beacon
>> ath9k_htc: use ath_beacon_conf.enable_beacon
>> ath9k: move sc_flags to ath_common
>> ath9k_htc: use common->op_flags
>> ath9k_htc: add ATH_OP_PRIM_STA_VIF
>> ath9k: remove unused bc_tstamp
>> ath9k_htc: sync beacon slot code with ath9k
>> ath9k: remove unused beacon_qi
>> ath9k|ath9k_htc: move IEEE80211_MS_TO_TU to common
>> ath9k-common: add nexttbtt and intval to ath_beacon_config
>> ath9k: move ath9k_beacon_config_sta to common-beacon
>> ath9k_htc: use ath9k_cmn_beacon_config_sta
>> ath9k: move ath9k_beacon_config_adhoc to common
>> ath9k_htc: add ath9k_htc_beacon_init (but not use it)
>> ath9k_htc: use ath9k_htc_beacon_init in ath9k_htc_beacon_config_ap
>> ath9k_htc: use ath9k_htc_beacon_init in ath9k_htc_beacon_config_adhoc
>> ath9k_htc: use ath9k_cmn_beacon_config_adhoc
>> ath9k: move ath9k_beacon_config_ap common
>> ath9k: remove unused ath9k_get_next_tbtt
>> ath9k_htc: use ath9k_cmn_beacon_config_ap
>> ath9k_htc: move DEFAULT_SWBA_RESPONSE check to ath9k_htc_beacon_init
>>
>> drivers/net/wireless/ath/ath.h | 10 +
>> drivers/net/wireless/ath/ath9k/Makefile | 3 +-
>> drivers/net/wireless/ath/ath9k/ahb.c | 7 +-
>> drivers/net/wireless/ath/ath9k/ath9k.h | 22 ---
>> drivers/net/wireless/ath/ath9k/beacon.c | 165 ++--------------
>> drivers/net/wireless/ath/ath9k/common-beacon.c | 180 +++++++++++++++++
>> drivers/net/wireless/ath/ath9k/common-beacon.h | 26 +++
>> drivers/net/wireless/ath/ath9k/common.h | 14 ++
>> drivers/net/wireless/ath/ath9k/debug.c | 2 +-
>> drivers/net/wireless/ath/ath9k/htc.h | 25 +--
>> drivers/net/wireless/ath/ath9k/htc_drv_beacon.c | 252 ++++++------------------
>> drivers/net/wireless/ath/ath9k/htc_drv_init.c | 10 +-
>> drivers/net/wireless/ath/ath9k/htc_drv_main.c | 53 +++--
>> drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 3 +-
>> drivers/net/wireless/ath/ath9k/link.c | 16 +-
>> drivers/net/wireless/ath/ath9k/main.c | 45 +++--
>> drivers/net/wireless/ath/ath9k/mci.c | 2 +-
>> drivers/net/wireless/ath/ath9k/pci.c | 8 +-
>> drivers/net/wireless/ath/ath9k/xmit.c | 9 +-
>> 19 files changed, 413 insertions(+), 439 deletions(-)
>> create mode 100644 drivers/net/wireless/ath/ath9k/common-beacon.c
>> create mode 100644 drivers/net/wireless/ath/ath9k/common-beacon.h
>>
>> --
>> 1.9.0
>>
--
Regards,
Oleksij
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 278 bytes
Desc: OpenPGP digital signature
Url : http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20140302/f86c0024/attachment.pgp
next parent reply other threads:[~2014-03-02 7:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1393704966-13985-1-git-send-email-linux@rempel-privat.de>
[not found] ` <21266.37896.937680.416439@gargle.gargle.HOWL>
2014-03-02 7:27 ` Oleksij Rempel [this message]
2014-03-02 7:50 ` [ath9k-devel] [PATCH 00/23] ath9k|ath9k_htc: move dups to common-beacon Sujith Manoharan
2014-03-06 18:42 ` John W. Linville
2014-03-07 9:55 ` Oleksij Rempel
2014-03-07 10:18 ` Sujith Manoharan
2014-03-10 15:08 ` Oleksij Rempel
2014-03-14 19:22 ` John W. Linville
2014-03-15 7:51 ` Oleksij Rempel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5312DD46.3030800@rempel-privat.de \
--to=linux@rempel-privat.de \
--cc=ath9k-devel@lists.ath9k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox