Re: [PATCH 2/4] ath10k: Add provision for Rx descriptor abstraction
On 27 July 2016 at 14:59, Thiagarajan, Vasanthakumarwrote: > On Wednesday 27 July 2016 06:13 PM, Michal Kazior wrote: >> On 27 July 2016 at 14:36, Vasanthakumar Thiagarajan [...] >>> --- a/drivers/net/wireless/ath/ath10k/core.c >>> +++ b/drivers/net/wireless/ath/ath10k/core.c >>> @@ -68,6 +68,7 @@ static const struct ath10k_hw_params >>> ath10k_hw_params_list[] = { >>> .board_size = QCA988X_BOARD_DATA_SZ, >>> .board_ext_size = QCA988X_BOARD_EXT_DATA_SZ, >>> }, >>> + .hw_rx_desc_ops = _rx_desc_ops, >> [...] >>> +struct ath10k_hw_rx_desc_ops { >>> + int (*rx_desc_get_l3_pad_bytes)(struct htt_rx_desc *rxd); >>> +}; >> >> Benjamin is trying to implement coverage class by poking hw registers >> over firmware's head [1]. I'm thinking the hw_rx_desc_ops could be >> generalized to hw_ops so it can be used for doing hw-specific hacks as >> well. What do you think? > > Sure. Instead of reworking this patch set, can this be done in a separate > patch?. I don't really mind especially since there's not much comments on his work yet. Michał -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/4] ath10k: Add provision for Rx descriptor abstraction
On Wednesday 27 July 2016 06:13 PM, Michal Kazior wrote: > On 27 July 2016 at 14:36, Vasanthakumar Thiagarajan >wrote: >> There are slight differences in Rx hw descriptor information >> among different chips. So far driver does not use those new >> information for any functionalities, but there is one important >> information which is available from QCA99X0 onwards to indicate >> the number of bytes that hw padded at the begining of the rx >> payload and this information is needed to undecap the rx >> packet. Add an abstraction for Rx desc to make use of the >> new desc information available. The callback that this patch >> defines to retrieve the padding bytes will be used in follow-up >> patch. >> >> Signed-off-by: Vasanthakumar Thiagarajan >> --- >> drivers/net/wireless/ath/ath10k/core.c | 12 >> drivers/net/wireless/ath/ath10k/hw.c | 13 + >> drivers/net/wireless/ath/ath10k/hw.h | 12 >> 3 files changed, 37 insertions(+) >> >> diff --git a/drivers/net/wireless/ath/ath10k/core.c >> b/drivers/net/wireless/ath/ath10k/core.c >> index e889829..9c5e93b 100644 >> --- a/drivers/net/wireless/ath/ath10k/core.c >> +++ b/drivers/net/wireless/ath/ath10k/core.c >> @@ -68,6 +68,7 @@ static const struct ath10k_hw_params >> ath10k_hw_params_list[] = { >> .board_size = QCA988X_BOARD_DATA_SZ, >> .board_ext_size = QCA988X_BOARD_EXT_DATA_SZ, >> }, >> + .hw_rx_desc_ops = _rx_desc_ops, > [...] >> +struct ath10k_hw_rx_desc_ops { >> + int (*rx_desc_get_l3_pad_bytes)(struct htt_rx_desc *rxd); >> +}; > > Benjamin is trying to implement coverage class by poking hw registers > over firmware's head [1]. I'm thinking the hw_rx_desc_ops could be > generalized to hw_ops so it can be used for doing hw-specific hacks as > well. What do you think? Sure. Instead of reworking this patch set, can this be done in a separate patch?. Vasanth
Re: [PATCH 2/4] ath10k: Add provision for Rx descriptor abstraction
On 27 July 2016 at 14:36, Vasanthakumar Thiagarajanwrote: > There are slight differences in Rx hw descriptor information > among different chips. So far driver does not use those new > information for any functionalities, but there is one important > information which is available from QCA99X0 onwards to indicate > the number of bytes that hw padded at the begining of the rx > payload and this information is needed to undecap the rx > packet. Add an abstraction for Rx desc to make use of the > new desc information available. The callback that this patch > defines to retrieve the padding bytes will be used in follow-up > patch. > > Signed-off-by: Vasanthakumar Thiagarajan > --- > drivers/net/wireless/ath/ath10k/core.c | 12 > drivers/net/wireless/ath/ath10k/hw.c | 13 + > drivers/net/wireless/ath/ath10k/hw.h | 12 > 3 files changed, 37 insertions(+) > > diff --git a/drivers/net/wireless/ath/ath10k/core.c > b/drivers/net/wireless/ath/ath10k/core.c > index e889829..9c5e93b 100644 > --- a/drivers/net/wireless/ath/ath10k/core.c > +++ b/drivers/net/wireless/ath/ath10k/core.c > @@ -68,6 +68,7 @@ static const struct ath10k_hw_params > ath10k_hw_params_list[] = { > .board_size = QCA988X_BOARD_DATA_SZ, > .board_ext_size = QCA988X_BOARD_EXT_DATA_SZ, > }, > + .hw_rx_desc_ops = _rx_desc_ops, [...] > +struct ath10k_hw_rx_desc_ops { > + int (*rx_desc_get_l3_pad_bytes)(struct htt_rx_desc *rxd); > +}; Benjamin is trying to implement coverage class by poking hw registers over firmware's head [1]. I'm thinking the hw_rx_desc_ops could be generalized to hw_ops so it can be used for doing hw-specific hacks as well. What do you think? [1]: http://lists.infradead.org/pipermail/ath10k/2016-July/008107.html Michał -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/4] ath10k: Add provision for Rx descriptor abstraction
There are slight differences in Rx hw descriptor information among different chips. So far driver does not use those new information for any functionalities, but there is one important information which is available from QCA99X0 onwards to indicate the number of bytes that hw padded at the begining of the rx payload and this information is needed to undecap the rx packet. Add an abstraction for Rx desc to make use of the new desc information available. The callback that this patch defines to retrieve the padding bytes will be used in follow-up patch. Signed-off-by: Vasanthakumar Thiagarajan--- drivers/net/wireless/ath/ath10k/core.c | 12 drivers/net/wireless/ath/ath10k/hw.c | 13 + drivers/net/wireless/ath/ath10k/hw.h | 12 3 files changed, 37 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index e889829..9c5e93b 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -68,6 +68,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .board_size = QCA988X_BOARD_DATA_SZ, .board_ext_size = QCA988X_BOARD_EXT_DATA_SZ, }, + .hw_rx_desc_ops = _rx_desc_ops, }, { .id = QCA9887_HW_1_0_VERSION, @@ -87,6 +88,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .board_size = QCA9887_BOARD_DATA_SZ, .board_ext_size = QCA9887_BOARD_EXT_DATA_SZ, }, + .hw_rx_desc_ops = _rx_desc_ops, }, { .id = QCA6174_HW_2_1_VERSION, @@ -104,6 +106,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .board_size = QCA6174_BOARD_DATA_SZ, .board_ext_size = QCA6174_BOARD_EXT_DATA_SZ, }, + .hw_rx_desc_ops = _rx_desc_ops, }, { .id = QCA6174_HW_2_1_VERSION, @@ -122,6 +125,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .board_size = QCA6174_BOARD_DATA_SZ, .board_ext_size = QCA6174_BOARD_EXT_DATA_SZ, }, + .hw_rx_desc_ops = _rx_desc_ops, }, { .id = QCA6174_HW_3_0_VERSION, @@ -140,6 +144,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .board_size = QCA6174_BOARD_DATA_SZ, .board_ext_size = QCA6174_BOARD_EXT_DATA_SZ, }, + .hw_rx_desc_ops = _rx_desc_ops, }, { .id = QCA6174_HW_3_2_VERSION, @@ -159,6 +164,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .board_size = QCA6174_BOARD_DATA_SZ, .board_ext_size = QCA6174_BOARD_EXT_DATA_SZ, }, + .hw_rx_desc_ops = _rx_desc_ops, }, { .id = QCA99X0_HW_2_0_DEV_VERSION, @@ -182,6 +188,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .board_size = QCA99X0_BOARD_DATA_SZ, .board_ext_size = QCA99X0_BOARD_EXT_DATA_SZ, }, + .hw_rx_desc_ops = _rx_desc_ops, }, { .id = QCA9984_HW_1_0_DEV_VERSION, @@ -205,6 +212,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .board_size = QCA99X0_BOARD_DATA_SZ, .board_ext_size = QCA99X0_BOARD_EXT_DATA_SZ, }, + .hw_rx_desc_ops = _rx_desc_ops, }, { .id = QCA9888_HW_2_0_DEV_VERSION, @@ -227,6 +235,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .board_size = QCA99X0_BOARD_DATA_SZ, .board_ext_size = QCA99X0_BOARD_EXT_DATA_SZ, }, + .hw_rx_desc_ops = _rx_desc_ops, }, { .id = QCA9377_HW_1_0_DEV_VERSION, @@ -244,6 +253,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .board_size = QCA9377_BOARD_DATA_SZ, .board_ext_size = QCA9377_BOARD_EXT_DATA_SZ, }, + .hw_rx_desc_ops = _rx_desc_ops, }, { .id = QCA9377_HW_1_1_DEV_VERSION, @@ -261,6 +271,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .board_size = QCA9377_BOARD_DATA_SZ, .board_ext_size = QCA9377_BOARD_EXT_DATA_SZ, }, + .hw_rx_desc_ops = _rx_desc_ops, }, { .id = QCA4019_HW_1_0_DEV_VERSION, @@ -285,6 +296,7 @@ static const struct ath10k_hw_params