Message ID | 20160127013309.10c854e9@kosmio |
---|---|
State | Superseded |
Headers | show |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Michal schrieb am 27.01.2016 um 01:33: > From: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> > > Enable platform-supplied WLAN LED name for ath9k device. > > Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> Acked-by: Hartmut Knaack <knaack.h@gmx.de> > --- Looking good overall. I also used this patch series to build images for the WPN824N to test button support, connected via the AR9285 GPIOs - no complains. One very minor detail about the patch subject: it would be good to prefix even with mac80211: ath9k: enable platform... It is also good practice to add a description and your Signed-off-by to the package patches. Many people don't seem to have done this, as well, but it makes life easier for the one who will eventually send these patches upstream. > .../patches/546-ath9k_platform_led_name.patch | 35 ++++++++++++++++++++++ > .../ar71xx/files/arch/mips/ath79/dev-ap9x-pci.c | 12 ++++++++ > .../ar71xx/files/arch/mips/ath79/dev-ap9x-pci.h | 3 ++ > .../generic/files/include/linux/ath9k_platform.h | 1 + > 4 files changed, 51 insertions(+) > create mode 100644 package/kernel/mac80211/patches/546-ath9k_platform_led_name.patch > > diff --git a/package/kernel/mac80211/patches/546-ath9k_platform_led_name.patch b/package/kernel/mac80211/patches/546-ath9k_platform_led_name.patch > new file mode 100644 > index 0000000..04e312d > --- /dev/null > +++ b/package/kernel/mac80211/patches/546-ath9k_platform_led_name.patch > @@ -0,0 +1,35 @@ > +--- a/drivers/net/wireless/ath/ath9k/gpio.c > ++++ b/drivers/net/wireless/ath/ath9k/gpio.c > +@@ -132,15 +132,19 @@ void ath_init_leds(struct ath_softc *sc) > + if (AR_SREV_9100(sc->sc_ah)) > + return; > + > +- snprintf(led_name, sizeof(led_name), "ath9k-%s", > +- wiphy_name(sc->hw->wiphy)); > ++ if (pdata && pdata->led_name) > ++ strncpy(led_name, pdata->led_name, sizeof(led_name)); > ++ else > ++ snprintf(led_name, sizeof(led_name), "ath9k-%s", > ++ wiphy_name(sc->hw->wiphy)); > + > + if (ath9k_led_blink) > + trigger = sc->led_default_trigger; > + else > + trigger = ieee80211_get_radio_led_name(sc->hw); > + > +- ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger, !sc->sc_ah->config.led_active_high); > ++ ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger, > ++ !sc->sc_ah->config.led_active_high); > + > + if (!pdata) > + return; > +--- a/include/linux/ath9k_platform.h > ++++ b/include/linux/ath9k_platform.h > +@@ -45,6 +45,7 @@ struct ath9k_platform_data { > + > + int num_leds; > + const struct gpio_led *leds; > ++ const char *led_name; > + }; > + > + #endif /* _LINUX_ATH9K_PLATFORM_H */ > diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.c > index d382453..bf80d4d 100644 > --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.c > +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.c > @@ -39,6 +39,18 @@ __init void ap9x_pci_setup_wmac_led_pin(unsigned wmac, int pin) > } > } > > +__init void ap9x_pci_setup_wmac_led_name(unsigned wmac, const char *led_name) > +{ > + switch (wmac) { > + case 0: > + ap9x_wmac0_data.led_name = led_name; > + break; > + case 1: > + ap9x_wmac1_data.led_name = led_name; > + break; > + } > +} > + > __init struct ath9k_platform_data *ap9x_pci_get_wmac_data(unsigned wmac) > { > switch (wmac) { > diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.h b/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.h > index ad288cb..dcfe541 100644 > --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.h > +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.h > @@ -19,6 +19,7 @@ void ap9x_pci_setup_wmac_led_pin(unsigned wmac, int pin); > void ap9x_pci_setup_wmac_gpio(unsigned wmac, u32 mask, u32 val); > void ap9x_pci_setup_wmac_leds(unsigned wmac, struct gpio_led *leds, > int num_leds); > +void ap9x_pci_setup_wmac_led_name(unsigned wmac, const char *led_name); > struct ath9k_platform_data *ap9x_pci_get_wmac_data(unsigned wmac); > > void ap91_pci_init(u8 *cal_data, u8 *mac_addr); > @@ -33,6 +34,8 @@ static inline void ap9x_pci_setup_wmac_gpio(unsigned wmac, > static inline void ap9x_pci_setup_wmac_leds(unsigned wmac, > struct gpio_led *leds, > int num_leds) {} > +static inline void ap9x_pci_setup_wmac_led_name(unsigned wmac, > + const char *led_name) {} > static inline struct ath9k_platform_data *ap9x_pci_get_wmac_data(unsigned wmac) > { > return NULL; > diff --git a/target/linux/generic/files/include/linux/ath9k_platform.h b/target/linux/generic/files/include/linux/ath9k_platform.h > index 30ce216..823e5ac 100644 > --- a/target/linux/generic/files/include/linux/ath9k_platform.h > +++ b/target/linux/generic/files/include/linux/ath9k_platform.h > @@ -45,6 +45,7 @@ struct ath9k_platform_data { > > int num_leds; > const struct gpio_led *leds; > + const char *led_name; > }; > > #endif /* _LINUX_ATH9K_PLATFORM_H */ > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWrPtsAAoJEANoShj6yJFI6m0P/1iOs7yWKkO2KvAqL2zioE0N FoMn0ICpz/6dJK+0OcFNwV/f/rKk9QvECPJcTBQQZymu7wituUy7TgUSFCuFqv5u z0HjpYol5lbu0BExpFPPi2/umRmwrFA68UK83Tm43DpoJsyOVZ97ihB/Xo8LfyZp 6uXZW4dXBtLCa0W2328wokIo1CY3xS+BNgbV2vAqHlCCEK72VSb8X3odtibum4CH LehSUVQUPm02Lpdq9MlbzA5d0q6yD7ugshCC/FuZdrVoYsussGLFkZ/D5i1eg+Tq P2IQ2ebTkV0bLaj2PnuTmRst6w5OYDjDrCCMNdVGJoreF0E3JgClzhTqabDyvHXM aHn+gp8ZKUIfTr62GG28hjLF+DcAAU/jVyk8TCuN4VRcPW2+LxafiRr621U1Ioi7 NWbzTVJVi091NYOJlvH2c2HfDsmbxqFN0aB7Fi3pySw64rhvNEqnE6LUGDi4fgdG jLpI9ma0qlEHneBWytZdCeuIWXZeFqwLGaMgwTRtAuU38Oyv6+tRZ7oISp/GkKB2 MAUT+y7cfnAKV6BEW09QhHhn6+jHdao4VSJ0xbdPNPJ/c7C9OP08CV7Qyguz5THY 0Si8Yod03909SRfaElxi/l7wKlAaN13fRExfIJL88bB0MxuBTfO3vAZpCAwWjXHx 6ulRPRpwwdXQbmak/uBA =2Orw -----END PGP SIGNATURE-----
On Sat, 30 Jan 2016 19:05:37 +0100 Hartmut Knaack <knaack.h@gmx.de> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Michal schrieb am 27.01.2016 um 01:33: > > From: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> > > > > Enable platform-supplied WLAN LED name for ath9k device. > > > > Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> > Acked-by: Hartmut Knaack <knaack.h@gmx.de> > > --- > > Looking good overall. I also used this patch series to build > images for the WPN824N to test button support, connected via > the AR9285 GPIOs - no complains. > One very minor detail about the patch subject: it would be > good to prefix even with mac80211: ath9k: enable platform... > It is also good practice to add a description and your > Signed-off-by to the package patches. Many people don't seem > to have done this, as well, but it makes life easier for the > one who will eventually send these patches upstream. > Hello Hartmut, Formal question: does "description and signing package patches" means including filled cover letter (from git-format-patch) as sort of preamble to all 8 patches or should I modify heading comments in patched files themselves ? Regards Michal
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Michal schrieb am 31.01.2016 um 22:53: > On Sat, 30 Jan 2016 19:05:37 +0100 > Hartmut Knaack <knaack.h@gmx.de> wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA256 >> >> Michal schrieb am 27.01.2016 um 01:33: >>> From: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> >>> >>> Enable platform-supplied WLAN LED name for ath9k device. >>> >>> Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> >> Acked-by: Hartmut Knaack <knaack.h@gmx.de> >>> --- >> >> Looking good overall. I also used this patch series to build >> images for the WPN824N to test button support, connected via >> the AR9285 GPIOs - no complains. >> One very minor detail about the patch subject: it would be >> good to prefix even with mac80211: ath9k: enable platform... >> It is also good practice to add a description and your >> Signed-off-by to the package patches. Many people don't seem >> to have done this, as well, but it makes life easier for the >> one who will eventually send these patches upstream. >> > > Hello Hartmut, > > Formal question: does "description and signing package patches" means > including filled cover letter (from git-format-patch) as sort of > preamble to all 8 patches or should I modify heading comments in > patched files themselves ? > Hi Michal, I would say, just add a Subject line, a short description and most important your Signed-off-by line to the patches created with quilt. See for example some of the patches in target/linux/ar71xx/patches-4.1. The 8 patches, created with git, are fine. Thanks, Hartmut > Regards > Michal > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWrpNiAAoJEANoShj6yJFIckEP/1zJN1E3xL8og+fOAP6oQaC+ /XuXYutyC+SKQy55onEFZKX1TY0CNZWS+3+kRwkcMIZpxW602MM02X4iRYJ+mq3x fn0L+zOgVudJeJYuIQtDH5QGyk5jRZGTyoeyNriwH+1tdPhxGkI7SbImQPBHYGI7 htYev4qqTnnJ4LEnUjfywKdanKOLEAijbivmpQqp7dsUu3HaviftqU6EcDhQt8fr pDOnDBZgmIwd7avVpXeYf5r6f7tTFpF+YyBceig68EYGYdzBVLPfsbMIomHZnApZ B7SbqdvjP2wt+NRNyc1KgdFNG1j/9pmhuythxNYb7wv2nRqvDsrs2kS1S/j0U8/0 nJWGGzDUimPCUzzgea+Q+4+kieTE57USVMQHcf+VKsp91AF/EuWeBNv8TJ0Iz+o/ +MsUaF5qarfVwu5E+PXUy8dliAzFu2b3uIYaLIDiserIbVs5pW8nPIBXV/Gyidx5 2tLhRvpt4YonhVVKDNFYQeR4USRujX+eqeH5JjnNEIzXS3GUuC7Qy2/zxVxUwn9x 2w8moysbouyeeFIHnF7eLBtnIF4iftnWMFcFV69ehnxNTS6htXiEapuNrwxUxinv gTySCbUgs+QNfOZedIHQszE2PWKnBKvtAsKifHsi8Jg7wDB+lgswHgh9ivrijFSh f/cj3y24ysou3GlHtRfz =NA0k -----END PGP SIGNATURE-----
On Mon, 1 Feb 2016 00:06:14 +0100 Hartmut Knaack <knaack.h@gmx.de> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Michal schrieb am 31.01.2016 um 22:53: > > On Sat, 30 Jan 2016 19:05:37 +0100 > > Hartmut Knaack <knaack.h@gmx.de> wrote: > > > >> -----BEGIN PGP SIGNED MESSAGE----- > >> Hash: SHA256 > >> > >> Michal schrieb am 27.01.2016 um 01:33: > >>> From: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> > >>> > >>> Enable platform-supplied WLAN LED name for ath9k device. > >>> > >>> Signed-off-by: Michal Cieslakiewicz > >>> <michal.cieslakiewicz@wp.pl> > >> Acked-by: Hartmut Knaack <knaack.h@gmx.de> > >>> --- > >> > >> Looking good overall. I also used this patch series to build > >> images for the WPN824N to test button support, connected via > >> the AR9285 GPIOs - no complains. > >> One very minor detail about the patch subject: it would be > >> good to prefix even with mac80211: ath9k: enable platform... > >> It is also good practice to add a description and your > >> Signed-off-by to the package patches. Many people don't seem > >> to have done this, as well, but it makes life easier for the > >> one who will eventually send these patches upstream. > >> > > > > Hello Hartmut, > > > > Formal question: does "description and signing package patches" > > means including filled cover letter (from git-format-patch) as sort > > of preamble to all 8 patches or should I modify heading comments in > > patched files themselves ? > > > > Hi Michal, > I would say, just add a Subject line, a short description and most > important your Signed-off-by line to the patches created with quilt. > See for example some of the patches in > target/linux/ar71xx/patches-4.1. The 8 patches, created with git, are > fine. Thanks, > > Hartmut > Hi Hartmut, Changes implemented, I bumped all 8 patches to v4 to have consistent version numbering - some of them have only topic/description changes yet they are published again to form a fresh full set. Compiled, tested, nothing got broken in the process. Thanks Michal
diff --git a/package/kernel/mac80211/patches/546-ath9k_platform_led_name.patch b/package/kernel/mac80211/patches/546-ath9k_platform_led_name.patch new file mode 100644 index 0000000..04e312d --- /dev/null +++ b/package/kernel/mac80211/patches/546-ath9k_platform_led_name.patch @@ -0,0 +1,35 @@ +--- a/drivers/net/wireless/ath/ath9k/gpio.c ++++ b/drivers/net/wireless/ath/ath9k/gpio.c +@@ -132,15 +132,19 @@ void ath_init_leds(struct ath_softc *sc) + if (AR_SREV_9100(sc->sc_ah)) + return; + +- snprintf(led_name, sizeof(led_name), "ath9k-%s", +- wiphy_name(sc->hw->wiphy)); ++ if (pdata && pdata->led_name) ++ strncpy(led_name, pdata->led_name, sizeof(led_name)); ++ else ++ snprintf(led_name, sizeof(led_name), "ath9k-%s", ++ wiphy_name(sc->hw->wiphy)); + + if (ath9k_led_blink) + trigger = sc->led_default_trigger; + else + trigger = ieee80211_get_radio_led_name(sc->hw); + +- ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger, !sc->sc_ah->config.led_active_high); ++ ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger, ++ !sc->sc_ah->config.led_active_high); + + if (!pdata) + return; +--- a/include/linux/ath9k_platform.h ++++ b/include/linux/ath9k_platform.h +@@ -45,6 +45,7 @@ struct ath9k_platform_data { + + int num_leds; + const struct gpio_led *leds; ++ const char *led_name; + }; + + #endif /* _LINUX_ATH9K_PLATFORM_H */ diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.c index d382453..bf80d4d 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.c @@ -39,6 +39,18 @@ __init void ap9x_pci_setup_wmac_led_pin(unsigned wmac, int pin) } } +__init void ap9x_pci_setup_wmac_led_name(unsigned wmac, const char *led_name) +{ + switch (wmac) { + case 0: + ap9x_wmac0_data.led_name = led_name; + break; + case 1: + ap9x_wmac1_data.led_name = led_name; + break; + } +} + __init struct ath9k_platform_data *ap9x_pci_get_wmac_data(unsigned wmac) { switch (wmac) { diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.h b/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.h index ad288cb..dcfe541 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.h @@ -19,6 +19,7 @@ void ap9x_pci_setup_wmac_led_pin(unsigned wmac, int pin); void ap9x_pci_setup_wmac_gpio(unsigned wmac, u32 mask, u32 val); void ap9x_pci_setup_wmac_leds(unsigned wmac, struct gpio_led *leds, int num_leds); +void ap9x_pci_setup_wmac_led_name(unsigned wmac, const char *led_name); struct ath9k_platform_data *ap9x_pci_get_wmac_data(unsigned wmac); void ap91_pci_init(u8 *cal_data, u8 *mac_addr); @@ -33,6 +34,8 @@ static inline void ap9x_pci_setup_wmac_gpio(unsigned wmac, static inline void ap9x_pci_setup_wmac_leds(unsigned wmac, struct gpio_led *leds, int num_leds) {} +static inline void ap9x_pci_setup_wmac_led_name(unsigned wmac, + const char *led_name) {} static inline struct ath9k_platform_data *ap9x_pci_get_wmac_data(unsigned wmac) { return NULL; diff --git a/target/linux/generic/files/include/linux/ath9k_platform.h b/target/linux/generic/files/include/linux/ath9k_platform.h index 30ce216..823e5ac 100644 --- a/target/linux/generic/files/include/linux/ath9k_platform.h +++ b/target/linux/generic/files/include/linux/ath9k_platform.h @@ -45,6 +45,7 @@ struct ath9k_platform_data { int num_leds; const struct gpio_led *leds; + const char *led_name; }; #endif /* _LINUX_ATH9K_PLATFORM_H */