Closed Ansuel closed 2 years ago
Where is that of_get_mac_address defined? ath10k-ct needs to compile in normal kernels as well, not just owrt. Possibly I can #ifdef it to only compile on owrt, but I'd like to see what the called code does first.
plain kernel openwrt just add mtd support to the function
(just as a reference this is where is defined... https://elixir.bootlin.com/linux/latest/source/drivers/of/of_net.c#L103)
@Ansuel, @greearb: What is the progress?
I should update this with the new kernel I think.
My driver needs to be able to compile in the stock kernel that matches the driver version, so I am not going to merge this. It could be added as a patch to openwrt project instead.
And, I tried to apply the patch to 5.15 kernel, but I get this:
/home/greearb/git/linux-5.15.dev.y/drivers/net/wireless/ath/ath10k/core.c: In function ‘ath10k_core_probe_fw’:
/home/greearb/git/linux-5.15.dev.y/drivers/net/wireless/ath/ath10k/core.c:4045:8: error: too few arguments to function ‘of_get_mac_address’
mac = of_get_mac_address(ar->dev->of_node);
^~~~~~
In file included from /home/greearb/git/linux-5.15.dev.y/drivers/net/wireless/ath/ath10k/core.c:11:
/home/greearb/git/linux-5.15.dev.y/include/linux/of_net.h:16:12: note: declared here
extern int of_get_mac_address(struct device_node np, u8 mac);
^~~~~~
If you want to figure out how to make this work, then I'll try applying your fix to 5.15 and make sure it still works on my non-owrt system.
@greearb i need to add this on each kernel of i can add the additional code only on specific one?
It just needs to work in my 5.15 tree: https://github.com/greearb/linux-ct-5.15 From what I can tell, the upstream support only came in in 5.14-era. I'll be posting a ath10k-ct 5.15 driver shortly, you can wait and patch against that if you prefer.
I can post a patch for 5.15... (from kernel 5.13 the api changed...) Will update this patch for file 5.15
Will wait for the 5.15 version and i will push the updated... Pls tag me when you add the new version
I pushed ath10k-ct with a 5.15 driver directory.
Thanks, Ben
On 9/22/21 1:38 PM, Ansuel Smith wrote:
Will wait for the 5.15 version and i will push the updated... Pls tag me when you add the new version
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_greearb_ath10k-2Dct_pull_157-23issuecomment-2D925311753&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=HYKqseB9xg-u2kz3egvegqfgyXnEBhQotXfR3iCfdgM&m=ejCJDDP_Ga83EqdQHqaiXok_neFNGfpFtvBPfJxi0ew&s=BURdhSQeQrK2uVrUbvqkVhu_VEDNIBXaYYw-wBZKRM8&e=, or unsubscribe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AACHNKUWAVWNH6ODEEPBGPLUDI5D5ANCNFSM4RJREA6A&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=HYKqseB9xg-u2kz3egvegqfgyXnEBhQotXfR3iCfdgM&m=ejCJDDP_Ga83EqdQHqaiXok_neFNGfpFtvBPfJxi0ew&s=mOTqyqSpM37evzeN-VChbJsPn57pqMlRUwWgKtS5bMo&e=. Triage notifications on the go with GitHub Mobile for iOS https://urldefense.proofpoint.com/v2/url?u=https-3A__apps.apple.com_app_apple-2Dstore_id1477376905-3Fct-3Dnotification-2Demail-26mt-3D8-26pt-3D524675&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=HYKqseB9xg-u2kz3egvegqfgyXnEBhQotXfR3iCfdgM&m=ejCJDDP_Ga83EqdQHqaiXok_neFNGfpFtvBPfJxi0ew&s=rMcQVrRbhNYcTKI8pNuT9YGs_tw9jHynfplcc4VMH4c&e= or Android https://urldefense.proofpoint.com/v2/url?u=https-3A__play.google.com_store_apps_details-3Fid-3Dcom.github.android-26referrer-3Dutm-5Fcampaign-253Dnotification-2Demail-2526utm-5Fmedium-253Demail-2526utm-5Fsource-253Dgithub&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=HYKqseB9xg-u2kz3egvegqfgyXnEBhQotXfR3iCfdgM&m=ejCJDDP_Ga83EqdQHqaiXok_neFNGfpFtvBPfJxi0ew&s=joO5Bm5ltGkah3G1SKIb7wp98L-5Xp95uibN62BjXrM&e=.
-- Ben Greear @.***> Candela Technologies Inc http://www.candelatech.com
@greearb pushed the refreshed version.
I pushed commit with the 5.15 support, thanks for that. Not going to apply the rest since older kernels don't support the feature, but will include the patch going forward as new kernels gain support.
ath10k-ct use the generic device_get_mac_address. Openwrt instead patch and use of_get_mac_address to get the MAC from a mtd.
Since device_get_mac_address lacks of the mtd detection and of_get_mac_address is never called (to add the generic mac-address property), the mac detection doesn't work.
Use of_get_mac_address instead of device_get_mac_address to address this problem.
Signed-off-by: Ansuel Smith ansuelsmth@gmail.com