summaryrefslogtreecommitdiff
path: root/drivers/net/ipa/ipa.h
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2022-11-02 17:11:35 -0500
committerDavid S. Miller <davem@davemloft.net>2022-11-04 10:16:53 +0000
commit9a9f512974d5e3e721e106f30429c16dfeb23326 (patch)
tree7154d7388a7d450dd16fff570b60a376203a4e09 /drivers/net/ipa/ipa.h
parentf298ba785e2d4f18bc2d01ee1ce719efe14242f0 (diff)
downloadlwn-9a9f512974d5e3e721e106f30429c16dfeb23326.tar.gz
lwn-9a9f512974d5e3e721e106f30429c16dfeb23326.zip
net: ipa: use a bitmap for defined endpoints
IPA v5.0 supports more than 32 endpoints, so we will be unable to represent endpoints defined in the configuration data with a 32-bit value. To prepare for that, convert the field in the IPA structure representing defined endpoints to be a Linux bitmap. Convert loops based on that field into for_each_set_bit() calls over the new bitmap. Note that the loop in ipa_endpoint_config() still assumes there are 32 or fewer endpoints (when comparing against the available endpoint bit mask); that assumption goes away in the next patch. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipa/ipa.h')
-rw-r--r--drivers/net/ipa/ipa.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ipa/ipa.h b/drivers/net/ipa/ipa.h
index a44595575d06..261c7263f9e3 100644
--- a/drivers/net/ipa/ipa.h
+++ b/drivers/net/ipa/ipa.h
@@ -62,7 +62,7 @@ struct ipa_interrupt;
* @zero_virt: Virtual address of preallocated zero-filled memory
* @zero_size: Size (bytes) of preallocated zero-filled memory
* @endpoint_count: Number of endpoints represented by bit masks below
- * @defined: Bit mask indicating endpoints defined in config data
+ * @defined: Bitmap of endpoints defined in config data
* @available: Bit mask indicating endpoints hardware supports
* @filter_map: Bit mask indicating endpoints that support filtering
* @set_up: Bit mask indicating endpoints set up
@@ -117,9 +117,9 @@ struct ipa {
void *zero_virt;
size_t zero_size;
- /* Bit masks indicating endpoint state */
+ /* Bitmaps indicating endpoint state */
u32 endpoint_count;
- u32 defined; /* Defined in configuration data */
+ unsigned long *defined; /* Defined in configuration data */
u32 available; /* Supported by hardware */
u32 filter_map;
u32 set_up;