LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-20-2022, 08:39 AM   #1
philm001
LQ Newbie
 
Registered: Jul 2022
Posts: 1

Rep: Reputation: 0
Simple questions regarding drivers in Linux Kernel


Hello all,

I am writing a simple program in C++ that interfaces with the QCA7000 chip. There is already a driver available on Linux for using this chip. I have a couple of questions regarding the use of the driver.

1) For loading the driver into the kernel, what are the cases for when I should use init_module and finit_module()? FOr this specific module, would I want to use init_module function call?

2) I found the source code for the driver and there are a number of functions available for the driver (GitHub source). After I initialize the module, how do I access the functions? Or are there standard Linux kernel functions that I am suppose to call that will interface to the driver for me? I have been looking for awhile on this matter and it is unclear how I utilize the driver in an application. For windows, I would do a DLL call. Is there something similar to Linux that I would do?

I should also note that I have a compiled driver installed called qca_7k_common. For the rest of the parts, I may need to manually install the driver by compiling the source which I don't think this part will be an issue for me.
 
Old 07-20-2022, 04:16 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,162

Rep: Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268
1) Use init_module or finit_module if you are not planning on using modprobe or insmod and want to rewrite them yourself.

2) A network device driver creates a network device. From user space you could use the ip command to configure it, bring it up, and route packets through it. Or you could let network manager do all that for you.

Rather than build an external driver, you could build your kernel with QUALCOMM support enabled. The driver is in the tree.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Slackware vs simple Arch vs simple Frugalware punchy71 Linux - Distributions 2 08-28-2012 02:30 PM
Questions regarding NVidia Linux drivers spinner_0 Linux - Games 4 12-12-2005 03:36 PM
Simple Questions Regarding Application Installations e11 Linux - Newbie 6 10-29-2004 09:33 PM
2 simple questions regarding X and fonts fatman Debian 1 03-12-2004 11:32 PM
A few simple questions regarding mandrake 9.1. Moses420ca Linux - Newbie 2 11-11-2003 02:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 09:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration