{
u16 i;
struct hip4_smapper_bank *bank = &(priv)->smapper_banks[bank_name];
+ struct hip4_smapper_control *control = &(priv)->smapper_control;
SLSI_DBG4_NODEV(SLSI_SMAPPER, "Init bank %d entry_size %d is_large %d\n", bank_name, entry_size, is_large);
bank->entry_size = entry_size;
bank->align = scsc_service_get_alignment(sdev->service);
bank->in_use = true;
+ /* update the mapping with BANK# in WLAN with PHY BANK#*/
+ control->lookuptable[bank->bank] = bank_name;
+
return 0;
}
len = desc->entry_size;
headroom = desc->headroom;
+
if (bank_num > HIP4_SMAPPER_TOTAL_BANKS) {
SLSI_DBG4_NODEV(SLSI_SMAPPER, "Incorrect bank_num %d\n", bank_num);
goto error;
}
+ /* Transform PHY BANK# with BANK# in Wlan service*/
+ bank_num = control->lookuptable[bank_num];
+
bank = &hip->hip_priv->smapper_banks[bank_num];
if (entry > bank->entries) {
u32 mbox_scb; /* SMAPPER MBOX scoreboard location */
u32 *mbox_ptr; /* Mbox pointer */
spinlock_t smapper_lock;
+ /* Lookup table to map the virtual bank mapping in wlan with the phy mapping in HW */
+ u8 lookuptable[HIP4_SMAPPER_TOTAL_BANKS];
};
struct hip4_smapper_bank {