* [ath9k-devel] [PATCH 00/23] ath9k|ath9k_htc: move dups to common-beacon [not found] ` <21266.37896.937680.416439@gargle.gargle.HOWL> @ 2014-03-02 7:27 ` Oleksij Rempel 2014-03-02 7:50 ` Sujith Manoharan 0 siblings, 1 reply; 8+ messages in thread From: Oleksij Rempel @ 2014-03-02 7:27 UTC (permalink / raw) To: ath9k-devel 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [ath9k-devel] [PATCH 00/23] ath9k|ath9k_htc: move dups to common-beacon 2014-03-02 7:27 ` [ath9k-devel] [PATCH 00/23] ath9k|ath9k_htc: move dups to common-beacon Oleksij Rempel @ 2014-03-02 7:50 ` Sujith Manoharan 2014-03-06 18:42 ` John W. Linville 0 siblings, 1 reply; 8+ messages in thread From: Sujith Manoharan @ 2014-03-02 7:50 UTC (permalink / raw) To: ath9k-devel Oleksij Rempel wrote: > 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. Sure. It is just another option to consider. > 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: We already have duplicate detection for initvals. It is part of the initvals tool in qca-swiss-army-knife. Sujith ^ permalink raw reply [flat|nested] 8+ messages in thread
* [ath9k-devel] [PATCH 00/23] ath9k|ath9k_htc: move dups to common-beacon 2014-03-02 7:50 ` Sujith Manoharan @ 2014-03-06 18:42 ` John W. Linville 2014-03-07 9:55 ` Oleksij Rempel 0 siblings, 1 reply; 8+ messages in thread From: John W. Linville @ 2014-03-06 18:42 UTC (permalink / raw) To: ath9k-devel On Sun, Mar 02, 2014 at 01:20:11PM +0530, Sujith Manoharan wrote: > Oleksij Rempel wrote: > > 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. > > Sure. It is just another option to consider. > > > 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: > > We already have duplicate detection for initvals. It is part of > the initvals tool in qca-swiss-army-knife. So, where does this leave us? Should this series be merged? Or not? -- John W. Linville Someday the world will need a hero, and you linville at tuxdriver.com might be all we have. Be ready. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [ath9k-devel] [PATCH 00/23] ath9k|ath9k_htc: move dups to common-beacon 2014-03-06 18:42 ` John W. Linville @ 2014-03-07 9:55 ` Oleksij Rempel 2014-03-07 10:18 ` Sujith Manoharan 0 siblings, 1 reply; 8+ messages in thread From: Oleksij Rempel @ 2014-03-07 9:55 UTC (permalink / raw) To: ath9k-devel Am 06.03.2014 19:42, schrieb John W. Linville: > On Sun, Mar 02, 2014 at 01:20:11PM +0530, Sujith Manoharan wrote: >> Oleksij Rempel wrote: >>> 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. >> >> Sure. It is just another option to consider. >> >>> 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: >> >> We already have duplicate detection for initvals. It is part of >> the initvals tool in qca-swiss-army-knife. > > So, where does this leave us? Should this series be merged? Or not? Last response was about initvals, my patch set affect only beacon code. Since i don't plan to rewrite ath9k_htc from scratch, i would assume it will be better to continue this periodic clean work. Sujith, are you agree? :) We need your Ack for this patch set. -- 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/20140307/5cd7dc56/attachment.pgp ^ permalink raw reply [flat|nested] 8+ messages in thread
* [ath9k-devel] [PATCH 00/23] ath9k|ath9k_htc: move dups to common-beacon 2014-03-07 9:55 ` Oleksij Rempel @ 2014-03-07 10:18 ` Sujith Manoharan 2014-03-10 15:08 ` Oleksij Rempel 0 siblings, 1 reply; 8+ messages in thread From: Sujith Manoharan @ 2014-03-07 10:18 UTC (permalink / raw) To: ath9k-devel Oleksij Rempel wrote: > Last response was about initvals, my patch set affect only beacon code. > Since i don't plan to rewrite ath9k_htc from scratch, i would assume it > will be better to continue this periodic clean work. I didn't review the patches, but someone else needs to make sure that nothing is broken in ath9k. Sujith ^ permalink raw reply [flat|nested] 8+ messages in thread
* [ath9k-devel] [PATCH 00/23] ath9k|ath9k_htc: move dups to common-beacon 2014-03-07 10:18 ` Sujith Manoharan @ 2014-03-10 15:08 ` Oleksij Rempel 2014-03-14 19:22 ` John W. Linville 0 siblings, 1 reply; 8+ messages in thread From: Oleksij Rempel @ 2014-03-10 15:08 UTC (permalink / raw) To: ath9k-devel Am 07.03.2014 11:18, schrieb Sujith Manoharan: > Oleksij Rempel wrote: >> Last response was about initvals, my patch set affect only beacon code. >> Since i don't plan to rewrite ath9k_htc from scratch, i would assume it >> will be better to continue this periodic clean work. > > I didn't review the patches, but someone else needs to make sure that > nothing is broken in ath9k. I use this code one week ind STA mode. But if you need more directed alternate testing, who is good candidate for this work? -- 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/20140310/eefb87b1/attachment.pgp ^ permalink raw reply [flat|nested] 8+ messages in thread
* [ath9k-devel] [PATCH 00/23] ath9k|ath9k_htc: move dups to common-beacon 2014-03-10 15:08 ` Oleksij Rempel @ 2014-03-14 19:22 ` John W. Linville 2014-03-15 7:51 ` Oleksij Rempel 0 siblings, 1 reply; 8+ messages in thread From: John W. Linville @ 2014-03-14 19:22 UTC (permalink / raw) To: ath9k-devel On Mon, Mar 10, 2014 at 04:08:57PM +0100, Oleksij Rempel wrote: > Am 07.03.2014 11:18, schrieb Sujith Manoharan: > > Oleksij Rempel wrote: > >> Last response was about initvals, my patch set affect only beacon code. > >> Since i don't plan to rewrite ath9k_htc from scratch, i would assume it > >> will be better to continue this periodic clean work. > > > > I didn't review the patches, but someone else needs to make sure that > > nothing is broken in ath9k. > > I use this code one week ind STA mode. But if you need more directed > alternate testing, who is good candidate for this work? I applied the series and attempted a build. But... CC drivers/net/wireless/ath/ath9k/tx99.o In file included from include/linux/bitops.h:33:0, from include/linux/kernel.h:10, from include/linux/skbuff.h:17, from include/linux/if_ether.h:23, from include/linux/etherdevice.h:25, from drivers/net/wireless/ath/ath9k/ath9k.h:20, from drivers/net/wireless/ath/ath9k/tx99.c:17: drivers/net/wireless/ath/ath9k/tx99.c: In function ?ath9k_tx99_init?: drivers/net/wireless/ath/ath9k/tx99.c:111:15: error: ?SC_OP_INVALID? undeclared (first use in this function) if (test_bit(SC_OP_INVALID, &sc->sc_flags)) { ^ /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:338:25: note: in definition of macro ?test_bit? (__builtin_constant_p((nr)) \ ^ drivers/net/wireless/ath/ath9k/tx99.c:111:15: note: each undeclared identifier is reported only once for each function it appears in if (test_bit(SC_OP_INVALID, &sc->sc_flags)) { ^ /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:338:25: note: in definition of macro ?test_bit? (__builtin_constant_p((nr)) \ ^ drivers/net/wireless/ath/ath9k/tx99.c:111:33: error: ?struct ath_softc? has no member named ?sc_flags? if (test_bit(SC_OP_INVALID, &sc->sc_flags)) { ^ /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:339:30: note: in definition of macro ?test_bit? ? constant_test_bit((nr), (addr)) \ ^ drivers/net/wireless/ath/ath9k/tx99.c:111:33: error: ?struct ath_softc? has no member named ?sc_flags? if (test_bit(SC_OP_INVALID, &sc->sc_flags)) { ^ /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:340:30: note: in definition of macro ?test_bit? : variable_test_bit((nr), (addr))) ^ make[3]: *** [drivers/net/wireless/ath/ath9k/tx99.o] Error 1 make[2]: *** [drivers/net/wireless/ath/ath9k] Error 2 make[1]: *** [drivers/net/wireless/ath] Error 2 make: *** [drivers/net/wireless/] Error 2 I'll be backing this out for now... John -- John W. Linville Someday the world will need a hero, and you linville at tuxdriver.com might be all we have. Be ready. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [ath9k-devel] [PATCH 00/23] ath9k|ath9k_htc: move dups to common-beacon 2014-03-14 19:22 ` John W. Linville @ 2014-03-15 7:51 ` Oleksij Rempel 0 siblings, 0 replies; 8+ messages in thread From: Oleksij Rempel @ 2014-03-15 7:51 UTC (permalink / raw) To: ath9k-devel Am 14.03.2014 20:22, schrieb John W. Linville: > On Mon, Mar 10, 2014 at 04:08:57PM +0100, Oleksij Rempel wrote: >> Am 07.03.2014 11:18, schrieb Sujith Manoharan: >>> Oleksij Rempel wrote: >>>> Last response was about initvals, my patch set affect only beacon code. >>>> Since i don't plan to rewrite ath9k_htc from scratch, i would assume it >>>> will be better to continue this periodic clean work. >>> >>> I didn't review the patches, but someone else needs to make sure that >>> nothing is broken in ath9k. >> >> I use this code one week ind STA mode. But if you need more directed >> alternate testing, who is good candidate for this work? > > I applied the series and attempted a build. But... > > CC drivers/net/wireless/ath/ath9k/tx99.o > In file included from include/linux/bitops.h:33:0, > from include/linux/kernel.h:10, > from include/linux/skbuff.h:17, > from include/linux/if_ether.h:23, > from include/linux/etherdevice.h:25, > from drivers/net/wireless/ath/ath9k/ath9k.h:20, > from drivers/net/wireless/ath/ath9k/tx99.c:17: > drivers/net/wireless/ath/ath9k/tx99.c: In function ?ath9k_tx99_init?: > drivers/net/wireless/ath/ath9k/tx99.c:111:15: error: ?SC_OP_INVALID? undeclared (first use in this function) > if (test_bit(SC_OP_INVALID, &sc->sc_flags)) { > ^ > /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:338:25: note: in definition of macro ?test_bit? > (__builtin_constant_p((nr)) \ > ^ > drivers/net/wireless/ath/ath9k/tx99.c:111:15: note: each undeclared identifier is reported only once for each function it appears in > if (test_bit(SC_OP_INVALID, &sc->sc_flags)) { > ^ > /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:338:25: note: in definition of macro ?test_bit? > (__builtin_constant_p((nr)) \ > ^ > drivers/net/wireless/ath/ath9k/tx99.c:111:33: error: ?struct ath_softc? has no member named ?sc_flags? > if (test_bit(SC_OP_INVALID, &sc->sc_flags)) { > ^ > /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:339:30: note: in definition of macro ?test_bit? > ? constant_test_bit((nr), (addr)) \ > ^ > drivers/net/wireless/ath/ath9k/tx99.c:111:33: error: ?struct ath_softc? has no member named ?sc_flags? > if (test_bit(SC_OP_INVALID, &sc->sc_flags)) { > ^ > /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:340:30: note: in definition of macro ?test_bit? > : variable_test_bit((nr), (addr))) > ^ > make[3]: *** [drivers/net/wireless/ath/ath9k/tx99.o] Error 1 > make[2]: *** [drivers/net/wireless/ath/ath9k] Error 2 > make[1]: *** [drivers/net/wireless/ath] Error 2 > make: *** [drivers/net/wireless/] Error 2 > > I'll be backing this out for now... thank you. I missed CONFIG_EXPERT :/ in attachment is second version of affected patch. -- Regards, Oleksij -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-ath9k-move-sc_flags-to-ath_common.patch Type: text/x-patch Size: 20132 bytes Desc: not available Url : http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20140315/18cd76cb/attachment-0001.bin ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-03-15 7:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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 ` [ath9k-devel] [PATCH 00/23] ath9k|ath9k_htc: move dups to common-beacon Oleksij Rempel
2014-03-02 7:50 ` 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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox