LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-12-2012, 04:43 PM   #1
gustavolz
LQ Newbie
 
Registered: Jan 2012
Posts: 13

Rep: Reputation: Disabled
Question Wireles Atheros 5523 on Slackware 13.37


Hi everyone!
So, that's is my problem:
I trying to make my Wireless USB Adapter work on Slack 13.37 and get the network WPA2-PSK. I already installed the windows driver by ndiswrapper and set the wpa_supplicant by:
Quote:
$ wpa_passphrase mynetwork mypassphrase
$ wpa_passphrase mynetwork mypassphrase > /etc/wpa_supplicant.conf
Until here it's ok. I initiate my USB Adapter by modprobe ndiswrapper, and it's flashing normally.
But for active the wpa_supplicant that's getting hard. Has to use this command, hasn't?
Quote:
wpa_supplicant -i ath0 -c /etc/wpa_supplicant.conf -d -D madwifi
But the madwifi isn't installed, and i'm not getting installe it, i think has something to do with kernel version, i'm new on distributions Linux so i don't know how. I tryed follow some tutorials of the forum but none work. I also tryed enter on my network by wicd, and it's showing all the networks availables, but when i try to connect at my network, stop on "Obtaining IP Address".

On Ubuntu it's just install the driver from Windows by ndiswrapper, and give a modprobe ndiswrapper that's OK.

So, any tip?

Last edited by gustavolz; 01-12-2012 at 04:45 PM.
 
Old 01-12-2012, 10:30 PM   #2
Uzuki
LQ Newbie
 
Registered: Jun 2010
Location: Indonesia
Distribution: Slackware, RedHat
Posts: 27

Rep: Reputation: 4
get the driver from http://linuxwireless.org/. Pick the latest one (choose bleeding edge download) and then you just need to extract, compile and install and don't forget to reboot after you finished. You must have kernel source installed. I did it on my laptop. It works.
 
Old 01-12-2012, 11:06 PM   #3
gustavolz
LQ Newbie
 
Registered: Jan 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
The AR5523 driver?
On the page is showing this link: http://svn.berlios.de/svnroot/repos/.../ar5523/trunk/
So what i do next?
Sorry about that, how i said, i'm a new user.
 
Old 01-13-2012, 12:52 AM   #4
Uzuki
LQ Newbie
 
Registered: Jun 2010
Location: Indonesia
Distribution: Slackware, RedHat
Posts: 27

Rep: Reputation: 4
Quote:
Originally Posted by gustavolz View Post
The AR5523 driver?
On the page is showing this link: http://svn.berlios.de/svnroot/repos/.../ar5523/trunk/
So what i do next?
Sorry about that, how i said, i'm a new user.
Based on http://svn.berlios.de/svnroot/repos/...bian/changelog, the changelog last update was June 02, 2011. It's possible that they have a working driver by now. If you want the easy way, go to http://linuxwireless.org/download/compat-wireless-2.6/ and download the latest release (see the date). After you download, extract it. Make sure you have kernel source installed. Go inside the directory and run this command as root.
Code:
make
make install
reboot after you finish.
 
Old 01-13-2012, 10:36 AM   #5
gustavolz
LQ Newbie
 
Registered: Jan 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
I made sure that the kernel headers, modules and source were installed, but during the "make" an error shows up, i copied just the part when the error appears:
Quote:
CC [M] /home/gustavo/Desktop/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.o
/home/gustavo/Desktop/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c: In function 'iwl_trans_rx_alloc':
/home/gustavo/Desktop/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:91:2: error: implicit declaration of function 'dma_zalloc_coherent'
/home/gustavo/Desktop/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:91:10: warning: assignment makes pointer from integer without a cast
/home/gustavo/Desktop/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:97:15: warning: assignment makes pointer from integer without a cast
make[4]: *** [/home/gustavo/Desktop/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.o] Error 1
make[3]: *** [/home/gustavo/Desktop/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi] Error 2
make[2]: *** [/home/gustavo/Desktop/compat-wireless-2012-01-12/drivers/net/wireless] Error 2
make[1]: *** [_module_/home/gustavo/Desktop/compat-wireless-2012-01-12] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.37.6'
make: *** [modules] Error 2
 
Old 01-16-2012, 08:23 AM   #6
gustavolz
LQ Newbie
 
Registered: Jan 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
So guys, any other tip?
I'm really thinking that the problem is it madwifi, and i'm not getting install it.
 
Old 01-16-2012, 09:03 AM   #7
Ficelle
LQ Newbie
 
Registered: Jan 2012
Posts: 6

Rep: Reputation: Disabled
I had the same error as yours, and found the solution in:
comments.gmane.org/gmane.linux.kernel.wireless.general/83960
(sorry this is my first post and then I cannot write URLs)

My kernel is indeed older than 3.2.
What I did (since the information on the link are not very talkative) is that I just copied into iwl-trans-pcie.c (just after the "includes") the definition of the function dma_zalloc_coherent:
static inline void *dma_zalloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t flag)
{
void *ret = dma_alloc_coherent(dev, size, dma_handle, flag);
if (ret)
memset(ret, 0, size);
return ret;
}

And I was able to build successfully!
 
Old 01-16-2012, 10:14 PM   #8
gustavolz
LQ Newbie
 
Registered: Jan 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
Now it's giving this error:
Quote:
CC [M] /root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.o
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:85:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '/' token
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:85:22: error: too many decimal points in number
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:88:35: error: too many decimal points in number
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:88:64: error: too many decimal points in number
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:90:28: error: too many decimal points in number
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:91:28: error: too many decimal points in number
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:92:1: error: stray '@' in program
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:92:1: error: stray '@' in program
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:92:1: error: stray '@' in program
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:92:1: error: stray '@' in program
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c: In function '__inittest':
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:93:10: error: '__platform_driver_init' undeclared (first use in this function)
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:93:10: note: each undeclared identifier is reported only once for each function it appears in
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c: In function '__platform_driver_exit':
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:93:10: error: implicit declaration of function 'platform_driver_unregister'
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:93:10: error: '__platform_driver' undeclared (first use in this function)
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c: At top level:
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:96:1: error: expected identifier or '(' before '+' token
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:104:1: error: expected identifier or '(' before '+' token
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:105:3: error: #endif without #if
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:107:3: error: #endif without #if
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c: In function 'iwl_rx_init':
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:226:3: error: implicit declaration of function 'iwl_trans_rx_alloc'
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c: At top level:
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:93:10: error: 'init_module' aliased to undefined symbol '__platform_driver_init'
/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c:93:10: error: 'init_module' aliased to undefined symbol '__platform_driver_init'
make[4]: *** [/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi/iwl-trans-pcie.o] Error 1
make[3]: *** [/root/compat-wireless-2012-01-12/drivers/net/wireless/iwlwifi] Error 2
make[2]: *** [/root/compat-wireless-2012-01-12/drivers/net/wireless] Error 2
make[1]: *** [_module_/root/compat-wireless-2012-01-12] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.37.6'
make: *** [modules] Error 2
I'm not a real programmer so i don't know what's the error, but i did the upload of the file:
http://www.mediafire.com/?v7fw92bcoiov72c

If i made something wrong or stupid (what i think that happened), sorry

Last edited by gustavolz; 01-16-2012 at 10:16 PM.
 
Old 01-17-2012, 02:34 AM   #9
Ficelle
LQ Newbie
 
Registered: Jan 2012
Posts: 6

Rep: Reputation: Disabled
That was a good idea to post your file, and indeed there is an error.
Actually it seems you have integrated both corrections: mine, and the complete one as suggested by the link I gave.
So, just remove all the block from lines 85 to 108:
include/linux/compat-3.2.h | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/include/linux/compat-3.2.h b/include/linux/compat-3.2.h
index fb9ef68..a17c4ad 100644
--- a/include/linux/compat-3.2.h
+++ b/include/linux/compat-3.2.h
@@ -64,6 +64,15 @@ static inline char *hex_byte_pack(char *buf, u8 byte)
module_driver(__platform_driver, platform_driver_register, \
platform_driver_unregister)

+static inline void *dma_zalloc_coherent(struct device *dev, size_t size,
+ dma_addr_t *dma_handle, gfp_t flag)
+{
+ void *ret = dma_alloc_coherent(dev, size, dma_handle, flag);
+ if (ret)
+ memset(ret, 0, size);
+ return ret;
+}
+
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0)) */

#endif /* LINUX_3_2_COMPAT_H */
--

Then it should work.
 
Old 01-17-2012, 08:03 AM   #10
gustavolz
LQ Newbie
 
Registered: Jan 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
Exclamation

Oh man, when the "make" passed the iwl-trans-pcie i was so happy... Then this:
Quote:
CC [M] /root/compat-wireless-2012-01-12/drivers/net/wireless/wl12xx/sdio.o
/root/compat-wireless-2012-01-12/drivers/net/wireless/wl12xx/sdio.c: In function 'wl12xx_sdio_power_on':
/root/compat-wireless-2012-01-12/drivers/net/wireless/wl12xx/sdio.c:126:2: error: implicit declaration of function 'pm_runtime_enabled'
make[4]: *** [/root/compat-wireless-2012-01-12/drivers/net/wireless/wl12xx/sdio.o] Error 1
make[3]: *** [/root/compat-wireless-2012-01-12/drivers/net/wireless/wl12xx] Error 2
make[2]: *** [/root/compat-wireless-2012-01-12/drivers/net/wireless] Error 2
make[1]: *** [_module_/root/compat-wireless-2012-01-12] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.37.6'
make: *** [modules] Error 2
The code of sdio.c:

Quote:
static int wl12xx_sdio_power_on(struct wl12xx_sdio_glue *glue)
{
int ret;
struct sdio_func *func = dev_to_sdio_func(glue->dev);

/* If enabled, tell runtime PM not to power off the card */
if (pm_runtime_enabled(&func->dev)) {
ret = pm_runtime_get_sync(&func->dev);
if (ret < 0)
goto out;
} else {
/* Runtime PM is disabled: power up the card manually */
ret = mmc_power_restore_host(func->card->host);
if (ret < 0)
goto out;
}

sdio_claim_host(func);
sdio_enable_func(func);

out:
return ret;
}

static int wl12xx_sdio_power_off(struct wl12xx_sdio_glue *glue)
{
int ret;
struct sdio_func *func = dev_to_sdio_func(glue->dev);

sdio_disable_func(func);
sdio_release_host(func);

/* Power off the card manually, even if runtime PM is enabled. */
ret = mmc_power_save_host(func->card->host);
if (ret < 0)
return ret;

/* If enabled, let runtime PM know the card is powered off */
if (pm_runtime_enabled(&func->dev))
ret = pm_runtime_put_sync(&func->dev);

return ret;
}
This is "C" isn't? I'll have to learn. And how i put a scrollbar on the quote?
Anyway, this is the entire code:
http://www.mediafire.com/?4yex4swu27d3f1f
 
Old 01-17-2012, 08:28 AM   #11
Ficelle
LQ Newbie
 
Registered: Jan 2012
Posts: 6

Rep: Reputation: Disabled
It seems that you don't have Linux headers installed.
(to answer your question, yes, this is C code)
(but for your 2nd question about the scrollbar, I have no idea. I am a newbie, like you! :-) )
Linux headers are files were all the references to Linux functions are declared.

In order to do this (I just did it yesterday too when installing my compat-wireless package) you have to run:
/lib/modules/`uname -r`/build
as specified by the linuxwireless page (search for "headers" in: http://linuxwireless.org/en/users/Download)

I think it should help (at least to go further).
 
Old 01-17-2012, 09:18 AM   #12
gustavolz
LQ Newbie
 
Registered: Jan 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
bash: /lib/modules/2.6.37.6-smp/build: is a directory
In the folder modules has the folder 2.6.37.6 and 2.6.37.6-smp. My kernel version is 2.6.37.6-smp.
I already installed the kernel-headers and i did again just for confirm:
+==============================================================================
| Skipping package kernel-headers-2.6.37.6_smp-x86-2 (already installed)
+=============================
 
Old 01-17-2012, 09:44 AM   #13
Ficelle
LQ Newbie
 
Registered: Jan 2012
Posts: 6

Rep: Reputation: Disabled
OK.
Then I don't know.
My kernel is 3.0.0-14-generic and I didn't get this issue.
When looking for pm_runtime_enabled function in Google, I saw that it is defined in include/linux/pm_runtime.h.
Just need to find where it is (or should be) and why you don't have it.

Somebody else's help would be good now... because I am not an expert at all.
 
Old 01-17-2012, 02:43 PM   #14
gustavolz
LQ Newbie
 
Registered: Jan 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
Ok, i'm really thankful for your help.
I found a guy in a Russian forum that has the exacly problem, i don't if find this forum too. No one solved the problem, the last post was yesterday.

Last edited by gustavolz; 01-21-2012 at 05:17 AM.
 
Old 01-21-2012, 05:16 AM   #15
gustavolz
LQ Newbie
 
Registered: Jan 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
So, i research a little and find a provisional solution...
I added to the code on /include/linux/compat-2.6.37.h or something like that.

Quote:
static inline bool pm_runtime_enabled(struct device *dev)
{
return !dev->power.disable_depth;
}

/* Exponentially weighted moving average (EWMA) */
But another error shows up... I'm almost given up. But, here goes:

Quote:
CC [M] /root/compat-wireless-2012-01-12/drivers/net/wireless/rtlwifi/base.o
/root/compat-wireless-2012-01-12/drivers/net/wireless/rtlwifi/base.c:30:0: warning: "pr_fmt" redefined
include/linux/printk.h:161:0: note: this is the location of the previous definition

CC [M] /root/compat-wireless-2012-01-12/drivers/net/wireless/rtlwifi/cam.o
/root/compat-wireless-2012-01-12/drivers/net/wireless/rtlwifi/cam.c:30:0: warning: "pr_fmt" redefined
include/linux/printk.h:161:0: note: this is the location of the previous definition

CC [M] /root/compat-wireless-2012-01-12/drivers/net/wireless/rtlwifi/core.o
/root/compat-wireless-2012-01-12/drivers/net/wireless/rtlwifi/core.c:1154:1: internal compiler error: in pop_scope, at c-decl.c:1248
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[4]: *** [/root/compat-wireless-2012-01-12/drivers/net/wireless/rtlwifi/core.o] Error 1
make[3]: *** [/root/compat-wireless-2012-01-12/drivers/net/wireless/rtlwifi] Error 2
make[2]: *** [/root/compat-wireless-2012-01-12/drivers/net/wireless] Error 2
make[1]: *** [_module_/root/compat-wireless-2012-01-12] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.37.6'
make: *** [modules] Error 2
So guys, any type?²
 
  


Reply

Tags
atheros, slackware, wireless



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
Problem with wireless atheros in Slackware 12.2 cstrieder Linux - Laptop and Netbook 9 01-23-2009 09:49 AM
Slackware atheros problem SOLVED siete Linux - Networking 1 12-29-2008 08:53 AM
Slackware 12.2 Wifi problem with Atheros bloodangel Linux - Newbie 5 12-26-2008 07:10 PM
DNS Client Issues on Slackware 11.0, Atheros Wi-fi. ChaosRequiem Linux - Wireless Networking 1 03-07-2007 06:08 PM
Level1 Wireless LAN 108MBps USB,Model:WNC-0302USB,Chipset:Atheros 5523,Works in SUSE? nikodhmos Linux - Hardware 3 05-19-2006 09:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:45 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