Page: 1, 2  Next

Suggestion for the next Liquorix update.
warfacegod
Status: Interested
Joined: 16 Jul 2013
Posts: 15
Location: In Trinsic.
Reply Quote
Would it be possible to replace the current iwlwifi 7000.c driver with the proper one? The old version in 3.9 and 3.10 kernels calls for API 6 while the one in 3.11-rc1 and wireless-testing git calls for API 7 which is correct. Please forgive my wording, if it's incorrect, as I'm quite new to dealing with and compiling kernels and source code and whatnot.

Example old:

#define IWL7260_UCODE_API_MAX 6

Example new:

#define IWL7260_UCODE_API_MAX 7

As far as I can tell, the only difference in the two files is that the 6's are now 7's. Unfortunately, I've been unable to get 3.10 or 3.11 kernels to compile and install and still run the proprietary nVidia drivers. Evidently there's some bug or something that stops the driver from being able to find the nVidia module. (Linus and nVidia can both get bent on who's fault it is.) I've also tried putting the new 7000.c driver into the 3.9 kernel. However, no matter what I do, it fails to finish with error code 2 which I believe was supposed to have been fixed in 3.2.

Anyway, enough venting on my part. Since it seems I can't attach files here, the proper version can be found at:

forum.notebookreview.com/networking-wireless/716325-intel-7260-a-6.html

openlinuxforums.org/index.php/topic,3274.msg109076.html#msg109076

And as I mentioned previously the 3.11-rc1 www.kernel.org/pub/linux/kernel/v3.x/testing/linux-3.11-rc1.tar.xz

and wireless-testing git git.kernel.org/cgit/linux/kernel/git/linville/wireless-testing.git

Even if the answer is no, thanks just the same.

< Edited by warfacegod :: Jul 18, 13, 7:53 >

Back to top
warfacegod
Status: Interested
Joined: 16 Jul 2013
Posts: 15
Location: In Trinsic.
Reply Quote
:: Code ::
/******************************************************************************
 *
 * This file is provided under a dual BSD/GPLv2 license.  When using or
 * redistributing this file, you may do so under either license.
 *
 * GPL LICENSE SUMMARY
 *
 * Copyright(c) 2012 - 2013 Intel Corporation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of version 2 of the GNU General Public License as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
 * USA
 *
 * The full GNU General Public License is included in this distribution
 * in the file called COPYING.
 *
 * Contact Information:
 *  Intel Linux Wireless <ilw@linux.intel.com>
 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
 *
 * BSD LICENSE
 *
 * Copyright(c) 2012 - 2013 Intel Corporation. All rights reserved.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *  * Neither the name Intel Corporation nor the names of its
 *    contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 *****************************************************************************/

#include <linux/module.h>
#include <linux/stringify.h>
#include "iwl-config.h"
#include "iwl-agn-hw.h"

/* Highest firmware API version supported */
#define IWL7260_UCODE_API_MAX   7
#define IWL3160_UCODE_API_MAX   7

/* Oldest version we won't warn about */
#define IWL7260_UCODE_API_OK   7
#define IWL3160_UCODE_API_OK   7

/* Lowest firmware API version supported */
#define IWL7260_UCODE_API_MIN   7
#define IWL3160_UCODE_API_MIN   7

/* NVM versions */
#define IWL7260_NVM_VERSION      0x0a1d
#define IWL7260_TX_POWER_VERSION   0xffff /* meaningless */
#define IWL3160_NVM_VERSION      0x709
#define IWL3160_TX_POWER_VERSION   0xffff /* meaningless */

#define IWL7260_FW_PRE "iwlwifi-7260-"
#define IWL7260_MODULE_FIRMWARE(api) IWL7260_FW_PRE __stringify(api) ".ucode"

#define IWL3160_FW_PRE "iwlwifi-3160-"
#define IWL3160_MODULE_FIRMWARE(api) IWL3160_FW_PRE __stringify(api) ".ucode"

static const struct iwl_base_params iwl7000_base_params = {
   .eeprom_size = OTP_LOW_IMAGE_SIZE,
   .num_of_queues = IWLAGN_NUM_QUEUES,
   .pll_cfg_val = 0,
   .shadow_ram_support = true,
   .led_compensation = 57,
   .wd_timeout = IWL_LONG_WD_TIMEOUT,
   .max_event_log_size = 512,
   .shadow_reg_enable = true,
};

static const struct iwl_ht_params iwl7000_ht_params = {
   .use_rts_for_aggregation = true, /* use rts/cts protection */
   .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ),
};

#define IWL_DEVICE_7000                  \
   .ucode_api_max = IWL7260_UCODE_API_MAX,         \
   .ucode_api_ok = IWL7260_UCODE_API_OK,         \
   .ucode_api_min = IWL7260_UCODE_API_MIN,         \
   .device_family = IWL_DEVICE_FAMILY_7000,      \
   .max_inst_size = IWL60_RTC_INST_SIZE,         \
   .max_data_size = IWL60_RTC_DATA_SIZE,         \
   .base_params = &iwl7000_base_params,         \
   .led_mode = IWL_LED_RF_STATE


const struct iwl_cfg iwl7260_2ac_cfg = {
   .name = "Intel(R) Dual Band Wireless AC 7260",
   .fw_name_pre = IWL7260_FW_PRE,
   IWL_DEVICE_7000,
   .ht_params = &iwl7000_ht_params,
   .nvm_ver = IWL7260_NVM_VERSION,
   .nvm_calib_ver = IWL7260_TX_POWER_VERSION,
};

const struct iwl_cfg iwl7260_2n_cfg = {
   .name = "Intel(R) Dual Band Wireless N 7260",
   .fw_name_pre = IWL7260_FW_PRE,
   IWL_DEVICE_7000,
   .ht_params = &iwl7000_ht_params,
   .nvm_ver = IWL7260_NVM_VERSION,
   .nvm_calib_ver = IWL7260_TX_POWER_VERSION,
};

const struct iwl_cfg iwl7260_n_cfg = {
   .name = "Intel(R) Wireless N 7260",
   .fw_name_pre = IWL7260_FW_PRE,
   IWL_DEVICE_7000,
   .ht_params = &iwl7000_ht_params,
   .nvm_ver = IWL7260_NVM_VERSION,
   .nvm_calib_ver = IWL7260_TX_POWER_VERSION,
};

const struct iwl_cfg iwl3160_2ac_cfg = {
   .name = "Intel(R) Dual Band Wireless AC 3160",
   .fw_name_pre = IWL3160_FW_PRE,
   IWL_DEVICE_7000,
   .ht_params = &iwl7000_ht_params,
   .nvm_ver = IWL3160_NVM_VERSION,
   .nvm_calib_ver = IWL3160_TX_POWER_VERSION,
};

const struct iwl_cfg iwl3160_2n_cfg = {
   .name = "Intel(R) Dual Band Wireless N 3160",
   .fw_name_pre = IWL3160_FW_PRE,
   IWL_DEVICE_7000,
   .ht_params = &iwl7000_ht_params,
   .nvm_ver = IWL3160_NVM_VERSION,
   .nvm_calib_ver = IWL3160_TX_POWER_VERSION,
};

const struct iwl_cfg iwl3160_n_cfg = {
   .name = "Intel(R) Wireless N 3160",
   .fw_name_pre = IWL3160_FW_PRE,
   IWL_DEVICE_7000,
   .ht_params = &iwl7000_ht_params,
   .nvm_ver = IWL3160_NVM_VERSION,
   .nvm_calib_ver = IWL3160_TX_POWER_VERSION,
};

MODULE_FIRMWARE(IWL7260_MODULE_FIRMWARE(IWL7260_UCODE_API_OK));
MODULE_FIRMWARE(IWL3160_MODULE_FIRMWARE(IWL3160_UCODE_API_OK));


Which should be named 7000.c

Thanks again.
Back to top
arclance
Status: Interested
Joined: 26 May 2012
Posts: 41
Reply Quote
Have you checked if backports can backport it to 3.9?
"backports" is an expansion of compat-wireless to cover more types of kernel modules (they were compat-drivers for a few months as well).
The way you use it has changed and the documentation is fairly non-existent (or I can't find it) so you will probably need to ask on the mailing list to find out.
Back to top
warfacegod
Status: Interested
Joined: 16 Jul 2013
Posts: 15
Location: In Trinsic.
Reply Quote
backports is still using the old API 6 version. Thanks though.
Back to top
warfacegod
Status: Interested
Joined: 16 Jul 2013
Posts: 15
Location: In Trinsic.
Reply Quote
Evidently, some folks are having to put

:: Code ::
CONFIG_IWLWIFI_DEBUG=y

CONFIG_IWLWIFI_DEBUGFS=y

CONFIG_IWLWIFI_DEBUG_EXPERIMENTAL_UCODE=y


in the kernels .config file. However, I've not needed to myself.
Back to top
arclance
Status: Interested
Joined: 26 May 2012
Posts: 41
Reply Quote
I would not be surprised if some people need to do that to get access to settings only exposed through the debugfs interface.

I have to build with this to be able to configure my wireless card to work correctly
:: Code ::
#### ath9k settings ####
Device Drivers --> Network device support --> Wireless LAN --> Atheros Wireless Cards

  ##### Turn on ath9k debug to be able to turn off "ani"
  [*] Atheros ath9k debugging
 
  ##################################
  CONFIG_ATH9K_DEBUGFS=y
  ## also sets
  CONFIG_MAC80211_DEBUGFS=y
  CONFIG_ATH_DEBUG=y

  ##### Turn off ath9k rate control (default in 3.9.7 because this is broken)
  [ ] Atheros ath9k rate control
  ##################################
  CONFIG_ATH9K_RATE_CONTROL=n | in 3.9.6 and earlier

Then I have to run
:: Code ::
mount -t debugfs debugfs /sys/kernel/debug/
echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/disable_ani

to disable the cards "Adaptive Noise Immunity" feature.
It just causes network activity through the card to stop at regular intervals if it is on as is reported here.
Considering people have been reporting this for a few years with different cards I wonder why this setting is still not able to be set when loading the module like the "nohwcrypt" setting since they don't seem to be focused on investigating it?
Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 1117
Reply Quote
arclance, what do you get by using this new driver?
Back to top
arclance
Status: Interested
Joined: 26 May 2012
Posts: 41
Reply Quote
I was just mentioning the non-standard build options I use to build the "ath9k" driver since they looked similar to the ones warfacegod mentioned people were using with the "iwlwifi" driver since they might be doing that for a similar reason.

warfacegod was asking about getting a newer verison (v7) of the"iwlwifi" driver in the Liquorix kernel since that is what his card needs.
backports would be the place I would ask about that since they are experienced in that area.
I would go to their mailing list since the wiki is in dire need of a update (I can't find anything current except the "downloads are here" section).
kernel 3.10 has that version but is not easily usable with the proprietary nvidia driver and from the trouble people have had making non-system specific patches for it I would be wary about its stability anyway.

With ath9k in my case I need to set a (firmware?) setting that is only exposed through the debugfs interface of the ath9k driver.
To get that interface you have to turn on these extra build options when building the ath9k module.
:: Code ::
CONFIG_ATH9K_DEBUGFS=y
CONFIG_MAC80211_DEBUGFS=y
CONFIG_ATH_DEBUG=y

The problem is that on my card the "Adaptive Noise Immunity" feature cause network activity to cease every ~30 seconds or so.
The actual interval at which this happens is affected by the value of the constant "ATH_LONG_CALINTERVAL" in the ath9k code but I have not heard of anyone determining more than that.

With that feature turned on a network speed graph on my system looks like a noisy square wave.
This behavior causes disconnects and timeouts with touchy sites and protocols as well as reducing the maximum speed my connection can run at.

With it turned off it is a straight line, how straight depends on the connection quality at the time.
You turn it off by running this in a root terminal after mounting the debugfs filesystem at "/sys/kernel/debug/ " and loading the ath9k module.
:: Code ::
echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/disable_ani

The "phy0" part of that command might be different on systems with some hardware configurations (i.e. more than one wireless card).
This is a know problem since at least 2011 which is why having the setting still hiding in the debugfs interface annoys me.

Setting
:: Code ::
CONFIG_ATH9K_RATE_CONTROL=n

for any kernel before 3.9.7 is recommended because the ath9k rate control algorithm is somewhat broken and this causes it to not be compiled so normal users won't have access to it.
You can change the rate control algorithm when you mount the module even if it is built in but most people would not know to do that since they don't read kernel changelogs.
:: Quote ::
commit e5ccf170714c26fbc135a8926d576d31595bb1f6
Author: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Date: Thu Jun 6 10:06:29 2013 +0530

ath9k: Use minstrel rate control by default

commit 5efac94999ff218e0101f67a059e44abb4b0b523 upstream.

The ath9k rate control algorithm has various architectural
issues that make it a poor fit in scenarios like congested
environments etc.

An example: bugzilla.redhat.com/show_bug.cgi?id=927191

Change the default to minstrel which is more robust in such cases.
The ath9k RC code is left in the driver for now, maybe it can
be removed altogether later on.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Cc: Jouni Malinen <jouni@qca.qualcomm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Back to top
warfacegod
Status: Interested
Joined: 16 Jul 2013
Posts: 15
Location: In Trinsic.
Reply Quote
:: damentz wrote ::
arclance, what do you get by using this new driver?


I know that question wasn't aimed at me but I'll answer it anyway.

I and a lot of other people would get a working Intel 7260 wireless card.
Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 1117
Reply Quote
Ah, I see now. I looked at the wireless-testing git repository, but all the patches including and excluding iwlwifi patches specifically adding support for the 7000 series and the 7260 specifically, and peppered with other iwlwifi patches. I'm worried that the 7260 patches require these other patches, and they're not yet ready.

Wireless backporting has done before with zen-kernel when we had 4 people working on it. Brandon or Dominic would backport the wireless patches and we would revert the commits one week later. It was always one step forward, two steps back. You add or fix support for one wireless card, but you break many others.

My suggestion is to join the backports IRC channel and get some feedback from the developers there: irc.freenode.net #kernel-backports.

Ask them when the next development compat-drivers package will be backported (which is what you need) and if it will include the new iwlwifi patches. From there, it's a matter of compiling only the iwlwifi driver by itself and installing it.
Back to top
Display posts from previous:   
Page: 1, 2  Next
All times are GMT - 8 Hours