greearb / ath10k-ct

Stand-alone ath10k driver based on Candela Technologies Linux kernel.
111 stars 41 forks source link

ath10k-ct: debug: fix a bug where regdump show all zeros #97

Closed a-zaki closed 5 years ago

a-zaki commented 5 years ago

Use __le32_to_cpu() instead of __le16_to_cpu() to read the reg_id while processing the regdump callback. This made the fw_regs file shows all zeros on big endian platforms.

Also, a cast is made with max(sptr->extras_count, (int)(id - DBG_REG_DUMP_COUNT) + 1) to fix a compiler warning.

greearb commented 5 years ago

I merged this through my -ct kernel trees, and pushed that back to ath10k-ct. Thanks for the fix.