* Re: [PATCH 4/6] mac80211: allow frame aggregation for mesh
From: Christian Lamparter @ 2011-10-20 9:46 UTC (permalink / raw)
To: Thomas Pedersen; +Cc: linux-wireless, anagar6, devel, johannes, linville
In-Reply-To: <1319072606-28291-5-git-send-email-thomas@cozybit.com>
On Thursday, October 20, 2011 03:03:24 AM Thomas Pedersen wrote:
> Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
> Signed-off-by: Ashok Nagarajan <anagar6@uic.edu>
> ---
> net/mac80211/agg-rx.c | 3 ++-
> net/mac80211/agg-tx.c | 4 +++-
> net/mac80211/ht.c | 3 ++-
> net/mac80211/rx.c | 1 +
> 4 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
> index 2ac0339..36c2836 100644
> --- a/net/mac80211/agg-tx.c
> +++ b/net/mac80211/agg-tx.c
> @@ -378,6 +379,7 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
> * by drivers or the standard.
> */
> if (sdata->vif.type != NL80211_IFTYPE_STATION &&
> + sdata->vif.type != NL80211_IFTYPE_MESH_POINT &&
> sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
> sdata->vif.type != NL80211_IFTYPE_AP)
> return -EINVAL;
just a nitpick, but it looks like the comment in agg-tx.c
seems to be a little out of date. Hence, would you mind
removing it as well?
/*
* The aggregation code is not prepared to handle
* anything but STA/AP due to the BSSID handling.
* IBSS could work in the code but isn't supported
* by drivers or the standard.
*/
if (sdata->vif.type != NL80211_IFTYPE_STATION &&
sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
sdata->vif.type != NL80211_IFTYPE_AP)
return -EINVAL;
Regards,
Chr
^ permalink raw reply
* Re: iwlagn is getting very shaky
From: Pekka Enberg @ 2011-10-20 9:12 UTC (permalink / raw)
To: Guy, Wey-Yi
Cc: Norbert Preining, David Rientjes, linux-kernel@vger.kernel.org,
ipw3945-devel@lists.sourceforge.net, ilw@linux.intel.com,
linux-wireless@vger.kernel.org
In-Reply-To: <1319006699.31823.65.camel@wwguy-huron>
On Wed, Oct 19, 2011 at 9:44 AM, Guy, Wey-Yi <wey-yi.w.guy@intel.com> wrote:
>> As for the problems, I'm using iPhone 3G internet via WiFi sharing and
>> connection seems to die few times a day or if I take the phone far
>> enough from the laptop. I usually turn off the AP for a while and use
>> NetworkManager on the laptop to disable/enable networking to make it
>> come back up.
>>
>> I haven't tested anything but 3.1-rcX kernels on this machine but I
>> can do git bisect too if it comes to that.
>>
> I am just try to understand if you encounter the same problem as
> Norbert. if you can dump the tx_queue
> in /sys/kernel/debug/ieee80211/phX/iwlagn/debug folder and send me the
> log, thsat will be great.
Here's a dump of a very typical issue I'm seeing. I left the office
with my phone and once I came back, my laptop refused to reconnect to
the AP until I restarted wireless networking from NetworkManager. I've
sometimes seen the same symptoms even with laptop and the phone being
physically close to each other.
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/wd_timeout
cat: /sys/kernel/debug/ieee80211/phy0/iwlagn/debug/wd_timeout: Invalid argument
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/rxon_filter_flags
0x0004
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/rxon_flags
0x8005
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/reply_tx_error
Statistics_TX_Error:
DELAY: 0
FEW_BYTES: 0
BT_PRIO: 0
QUIET_PERIOD: 0
CALC_TTAK: 0
INTERNAL_CROSSED_RETRY: 0
SHORT_LIMIT: 0
LONG_LIMIT: 24
FIFO_UNDERRUN: 0
DRAIN_FLOW: 0
RFKILL_FLUSH: 0
LIFE_EXPIRE: 0
DEST_PS: 0
HOST_ABORTED: 0
BT_RETRY: 0
STA_INVALID: 0
FRAG_DROPPED: 0
TID_DISABLE: 0
FIFO_FLUSHED: 0
INSUFFICIENT_CF_POLL: 0
PASSIVE_NO_RX: 1
NO_BEACON_ON_RADAR: 0
UNKNOWN: 0
Statistics_Agg_TX_Error:
UNDERRUN_MSK: 0
BT_PRIO_MSK: 0
FEW_BYTES_MSK: 0
ABORT_MSK: 0
LAST_SENT_TTL_MSK: 0
LAST_SENT_TRY_CNT_MSK: 0
LAST_SENT_BT_KILL_MSK: 0
SCD_QUERY_MSK: 0
TEST_BAD_CRC32_MSK: 0
RESPONSE_MSK: 0
DUMP_TX_MSK: 0
DELAY_TX_MSK: 0
UNKNOWN: 0
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/ucode_bt_stats
Statistics Flag(0x30002):
Operational Frequency: 2.4 GHz
TGj Narrow Band: disabled
Statistics_BT:
current accumulative
hi_priority_tx_req_cnt: 0 0
hi_priority_tx_denied_cnt: 0 0
lo_priority_tx_req_cnt: 0 0
lo_priority_tx_denied_cnt: 0 0
hi_priority_rx_req_cnt: 0 0
hi_priority_rx_denied_cnt: 0 0
lo_priority_rx_req_cnt: 0 0
lo_priority_rx_denied_cnt: 0 0
(rx)num_bt_kills: 0 0
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/ucode_tracing
ucode trace timer is Off
non_wraps_count: 0
wraps_once_count: 0
wraps_more_count: 0
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/chain_noise
active_chains: 3
chain_noise_a: 330
chain_noise_b: 335
chain_noise_c: 0
chain_signal_a: 575
chain_signal_b: 674
chain_signal_c: 0
beacon_count: 16
disconn_array: 0 0 1
delta_gain_code: 4 0 0
radio_write: 1
state: 3
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/sensitivity
auto_corr_ofdm: 80
auto_corr_ofdm_mrc: 128
auto_corr_ofdm_x1: 105
auto_corr_ofdm_mrc_x1: 192
auto_corr_cck: 125
auto_corr_cck_mrc: 160
last_bad_plcp_cnt_ofdm: 0
last_fa_cnt_ofdm: 0
last_bad_plcp_cnt_cck: 0
last_fa_cnt_cck: 0
nrg_curr_state: 0
nrg_prev_state: 0
nrg_value: 0 0 0 0 0 0 0 0 0 0
nrg_silence_rssi: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
nrg_silence_ref: 0
nrg_energy_idx: 0
nrg_silence_idx: 0
nrg_th_cck: 97
nrg_auto_corr_silence_diff: 0
num_in_cck_no_fa: 0
nrg_th_ofdm: 100
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/protection_mode
use rts/cts for aggregation
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/txfifo_flush
cat: /sys/kernel/debug/ieee80211/phy0/iwlagn/debug/txfifo_flush:
Invalid argument
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/ucode_general_stats
Statistics Flag(0x30002):
Operational Frequency: 2.4 GHz
TGj Narrow Band: disabled
Statistics_General: current cumulative delta max
temperature: 32
temperature_m: 3437
ttl_timestamp: 1351982035
burst_check: 0 888 32 33
burst_count: 0 0 0 0
wait_for_silence_timeout_count: 0 101 1 1
sleep_time: 0 0 0 0
slots_out: 0 0 0 0
slots_idle: 0 0 0 0
tx_on_a: 0 0 0 0
tx_on_b: 0 0 0 0
exec_time: 0 0 0 0
probe_time: 0 233 1 1
rx_enable_counter: 0 0 0 0
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/ucode_tx_stats
Statistics Flag(0x30002):
Operational Frequency: 2.4 GHz
TGj Narrow Band: disabled
Statistics_Tx: current cumulative delta max
preamble: 0 69043 5 156
rx_detected_cnt: 0 1175 1 34
bt_prio_defer_cnt: 0 0 0 0
bt_prio_kill_cnt: 0 0 0 0
few_bytes_cnt: 0 0 0 0
cts_timeout: 0 0 0 0
ack_timeout: 0 2410 2 45
expected_ack_cnt: 0 37195 5 81
actual_ack_cnt: 0 34785 3 73
dump_msdu_cnt: 0 64 2 3
abort_nxt_frame_mismatch: 0 0 0 0
abort_missing_nxt_frame: 0 0 0 0
cts_timeout_collision: 0 0 0 0
ack_ba_timeout_collision: 0 146 1 4
agg ba_timeout: 0 0 0 0
agg ba_resched_frames: 0 0 0 0
agg scd_query_agg_frame: 0 0 0 0
agg scd_query_no_agg: 0 0 0 0
agg scd_query_agg: 0 0 0 0
agg scd_query_mismatch: 0 0 0 0
agg frame_not_ready: 0 0 0 0
agg underrun: 0 0 0 0
agg bt_prio_kill: 0 0 0 0
agg rx_ba_rsp_cnt: 0 0 0 0
tx power: (1/2 dB step)
antenna A: 0x1C
antenna B: 0x1C
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/ucode_rx_stats
Statistics Flag(0x30002):
Operational Frequency: 2.4 GHz
TGj Narrow Band: disabled
Statistics_Rx - OFDM: current cumulative delta max
ina_cnt: 4 1739356 3 2107
fina_cnt: 2 1407532 2 773
plcp_err: 2 1241567 2 773
crc32_err: 0 7362 1 85
overrun_err: 0 0 0 0
early_overrun_err: 0 0 0 0
crc32_good: 0 172221 4 283
false_alarm_cnt: 2 354918 1 2139
fina_sync_err_cnt: 0 1490 1 30
sfd_timeout: 0 0 0 0
fina_timeout: 0 0 0 0
unresponded_rts: 0 0 0 0
rxe_frame_lmt_ovrun: 0 121 1 30
sent_ack_cnt: 0 30667 3 72
sent_cts_cnt: 0 0 0 0
sent_ba_rsp_cnt: 0 0 0 0
dsp_self_kill: 0 0 0 0
mh_format_err: 0 0 0 0
re_acq_main_rssi_sum: 0 0 0 0
Statistics_Rx - CCK: current cumulative delta max
ina_cnt: 1 1714491 1 1408
fina_cnt: 1 1713486 1 1407
plcp_err: 1 603100 1 1270
crc32_err: 0 3851 1 27
overrun_err: 0 0 0 0
early_overrun_err: 0 0 0 0
crc32_good: 0 650281 8 112
false_alarm_cnt: 0 0 0 0
fina_sync_err_cnt: 0 1060 1 3
sfd_timeout: 0 0 0 0
fina_timeout: 0 0 0 0
unresponded_rts: 0 0 0 0
rxe_frame_lmt_ovrun: 0 2 1 1
sent_ack_cnt: 0 52 1 5
sent_cts_cnt: 0 0 0 0
sent_ba_rsp_cnt: 0 0 0 0
dsp_self_kill: 0 0 0 0
mh_format_err: 0 0 0 0
re_acq_main_rssi_sum: 0 0 0 0
Statistics_Rx - GENERAL: current cumulative delta max
bogus_cts: 0 2 1 1
bogus_ack: 0 9 1 2
non_bssid_frames: 0 0 0 0
filtered_frames: 0 549185 1 83
non_channel_beacons: 0 0 0 0
channel_beacons: 0 87279 1 1
num_missed_bcon: 0 110 6 10
adc_rx_saturation_time: 0 0 0 0
ina_detect_search_tm: 0 77790045 65535 65535
beacon_silence_rssi_a: 0 32156769 3082 11822
beacon_silence_rssi_b: 0 63539976 6419 12593
beacon_silence_rssi_c: 0 0 0 0
interference_data_flag: 0 1236 1 1
channel_load: 0 988646230 2218 4167874
dsp_false_alarms: 0 163030 18 255
beacon_rssi_a: 0 127134 1 45
beacon_rssi_b: 0 91295 3 45
beacon_rssi_c: 0 0 0 0
beacon_energy_a: 0 215369 5 88
beacon_energy_b: 0 100030 2 91
beacon_energy_c: 0 113982 5 93
Statistics_Rx - OFDM_HT: current cumulative delta max
plcp_err: 0 0 0 0
overrun_err: 0 0 0 0
early_overrun_err: 0 0 0 0
crc32_good: 0 0 0 0
crc32_err: 0 0 0 0
mh_format_err: 0 0 0 0
agg_crc32_good: 0 115 2 30
agg_mpdu_cnt: 0 198 15 44
agg_cnt: 0 69 1 17
unsupport_mcs: 0 356 1 31
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/force_reset
Force reset method 0
number of reset request: 102
number of reset request success: 79
number of reset request reject: 23
reset duration: 3000
Force reset method 1
number of reset request: 0
number of reset request success: 0
number of reset request reject: 0
reset duration: 5000
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/plcp_delta
50
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/missed_beacon
5
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/fh_reg
FH register values:
FH_RSCSR_CHNL0_STTS_WPTR_REG: 0X0fff1e00
FH_RSCSR_CHNL0_RBDCB_BASE_REG: 0X00fff1f0
FH_RSCSR_CHNL0_WPTR: 0X000000d8
FH_MEM_RCSR_CHNL0_CONFIG_REG: 0X80819104
FH_MEM_RSSR_SHARED_CTRL_REG: 0X000000fc
FH_MEM_RSSR_RX_STATUS_REG: 0X07030000
FH_MEM_RSSR_RX_ENABLE_ERR_IRQ2DRV: 0X00000000
FH_TSSR_TX_STATUS_REG: 0X07ff0001
FH_TSSR_TX_ERROR_REG: 0X00000000
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/csr
cat: /sys/kernel/debug/ieee80211/phy0/iwlagn/debug/csr: Invalid argument
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/clear_traffic_statistics
cat: /sys/kernel/debug/ieee80211/phy0/iwlagn/debug/clear_traffic_statistics:
Invalid argument
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/clear_ucode_statistics
cat: /sys/kernel/debug/ieee80211/phy0/iwlagn/debug/clear_ucode_statistics:
Invalid argument
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/power_save_status
Power Save Status: PHY
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/tx_queue
hwq 00: read=37 write=37 stop=0 swq_id=0x00 (ac 0/hwq 0)
stop-count: 0
hwq 01: read=0 write=0 stop=0 swq_id=0x05 (ac 1/hwq 1)
stop-count: 0
hwq 02: read=194 write=194 stop=0 swq_id=0x0a (ac 2/hwq 2)
stop-count: 0
hwq 03: read=0 write=0 stop=0 swq_id=0x0f (ac 3/hwq 3)
stop-count: 0
hwq 04: read=0 write=0 stop=0 swq_id=0x13 (ac 3/hwq 4)
hwq 05: read=0 write=0 stop=0 swq_id=0x16 (ac 2/hwq 5)
hwq 06: read=0 write=0 stop=0 swq_id=0x19 (ac 1/hwq 6)
hwq 07: read=0 write=0 stop=0 swq_id=0x1c (ac 0/hwq 7)
hwq 08: read=0 write=0 stop=0 swq_id=0x22 (ac 2/hwq 8)
hwq 09: read=75 write=75 stop=0 swq_id=0x00 (ac 0/hwq 0)
hwq 10: read=0 write=0 stop=0 swq_id=0x00 (ac 0/hwq 0)
hwq 11: read=0 write=0 stop=0 swq_id=0x00 (ac 0/hwq 0)
hwq 12: read=0 write=0 stop=0 swq_id=0x00 (ac 0/hwq 0)
hwq 13: read=0 write=0 stop=0 swq_id=0x00 (ac 0/hwq 0)
hwq 14: read=0 write=0 stop=0 swq_id=0x00 (ac 0/hwq 0)
hwq 15: read=0 write=0 stop=0 swq_id=0x00 (ac 0/hwq 0)
hwq 16: read=0 write=0 stop=0 swq_id=0x00 (ac 0/hwq 0)
hwq 17: read=0 write=0 stop=0 swq_id=0x00 (ac 0/hwq 0)
hwq 18: read=0 write=0 stop=0 swq_id=0x00 (ac 0/hwq 0)
hwq 19: read=0 write=0 stop=0 swq_id=0x00 (ac 0/hwq 0)
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/rx_queue
read: 223
write: 221
free_count: 32
closed_rb_num: 223
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/traffic_log
Tx Queue
q[0]: read_ptr: 37, write_ptr: 37
q[1]: read_ptr: 0, write_ptr: 0
q[2]: read_ptr: 194, write_ptr: 194
q[3]: read_ptr: 0, write_ptr: 0
q[4]: read_ptr: 0, write_ptr: 0
q[5]: read_ptr: 0, write_ptr: 0
q[6]: read_ptr: 0, write_ptr: 0
q[7]: read_ptr: 0, write_ptr: 0
q[8]: read_ptr: 0, write_ptr: 0
q[9]: read_ptr: 75, write_ptr: 75
q[10]: read_ptr: 0, write_ptr: 0
q[11]: read_ptr: 0, write_ptr: 0
q[12]: read_ptr: 0, write_ptr: 0
q[13]: read_ptr: 0, write_ptr: 0
q[14]: read_ptr: 0, write_ptr: 0
q[15]: read_ptr: 0, write_ptr: 0
q[16]: read_ptr: 0, write_ptr: 0
q[17]: read_ptr: 0, write_ptr: 0
q[18]: read_ptr: 0, write_ptr: 0
q[19]: read_ptr: 0, write_ptr: 0
Rx Queue
read: 223, write: 221
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/tx_statistics
Management:
MANAGEMENT_ASSOC_REQ : 1
MANAGEMENT_ASSOC_RESP : 0
MANAGEMENT_REASSOC_REQ : 3
MANAGEMENT_REASSOC_RESP : 0
MANAGEMENT_PROBE_REQ : 0
MANAGEMENT_PROBE_RESP : 0
MANAGEMENT_BEACON : 0
MANAGEMENT_ATIM : 0
MANAGEMENT_DISASSOC : 0
MANAGEMENT_AUTH : 19
MANAGEMENT_DEAUTH : 4
MANAGEMENT_ACTION : 0
Control
CONTROL_BACK_REQ : 0
CONTROL_BACK : 0
CONTROL_PSPOLL : 0
CONTROL_RTS : 0
CONTROL_CTS : 0
CONTROL_ACK : 0
CONTROL_CFEND : 0
CONTROL_CFENDACK : 0
Data:
cnt: 32204
bytes: 5475621
/sys/kernel/debug/ieee80211/phy0/iwlagn/debug/rx_statistics
Management:
MANAGEMENT_ASSOC_REQ : 0
MANAGEMENT_ASSOC_RESP : 1
MANAGEMENT_REASSOC_REQ : 0
MANAGEMENT_REASSOC_RESP : 3
MANAGEMENT_PROBE_REQ : 0
MANAGEMENT_PROBE_RESP : 149
MANAGEMENT_BEACON : 106894
MANAGEMENT_ATIM : 0
MANAGEMENT_DISASSOC : 0
MANAGEMENT_AUTH : 4
MANAGEMENT_DEAUTH : 0
MANAGEMENT_ACTION : 0
Control:
CONTROL_BACK_REQ : 0
CONTROL_BACK : 0
CONTROL_PSPOLL : 0
CONTROL_RTS : 0
CONTROL_CTS : 0
CONTROL_ACK : 0
CONTROL_CFEND : 0
CONTROL_CFENDACK : 0
Data:
cnt: 30900
bytes: 18938054
^ permalink raw reply
* [PATCH] ath9k_hw: Fix radio retention for AR9462
From: Rajkumar Manoharan @ 2011-10-20 8:59 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Rajkumar Manoharan
IQ calibration during fast channel change sometimes failed
with RTT. And also restoring invalid radio retention readings
during init cal could cause failure to set the channel properly.
This patch counts the valid rtt history readings and clears
rtt mask.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/ar9003_calib.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_calib.c b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
index 16851cb..a4cd161 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
@@ -908,12 +908,15 @@ static bool ar9003_hw_rtt_restore(struct ath_hw *ah, struct ath9k_channel *chan)
int i;
bool restore;
- if (!(ah->caps.hw_caps & ATH9K_HW_CAP_RTT) || !ah->caldata)
+ if (!ah->caldata)
return false;
hist = &ah->caldata->rtt_hist;
+ if (!hist->num_readings)
+ return false;
+
ar9003_hw_rtt_enable(ah);
- ar9003_hw_rtt_set_mask(ah, 0x10);
+ ar9003_hw_rtt_set_mask(ah, 0x00);
for (i = 0; i < AR9300_MAX_CHAINS; i++) {
if (!(ah->rxchainmask & (1 << i)))
continue;
@@ -1070,6 +1073,7 @@ skip_tx_iqcal:
if (is_reusable && (hist->num_readings < RTT_HIST_MAX)) {
u32 *table;
+ hist->num_readings++;
for (i = 0; i < AR9300_MAX_CHAINS; i++) {
if (!(ah->rxchainmask & (1 << i)))
continue;
--
1.7.7
^ permalink raw reply related
* [PATCH] ath9k_hw: Fix regression of register offset for AR9003 chips
From: Rajkumar Manoharan @ 2011-10-20 8:52 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Rajkumar Manoharan, stable
My recent commits (3782c69d, 324c74a) introduced regression
for register offset selection that based on the macversion.
Not using parentheses in proper manner for ternary operator
leads to select wrong offset for the registers.
This issue was observed with AR9462 chip that immediate disconnect
after the association with the following message
ieee80211 phy3: wlan0: Failed to send nullfunc to AP 00:23:69:12:ea:47
after 500ms, disconnecting.
Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/ar9003_phy.h | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.h b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
index 2f4023e..70e0103 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
@@ -572,14 +572,14 @@
#define AR_PHY_TXGAIN_TABLE (AR_SM_BASE + 0x300)
-#define AR_PHY_TX_IQCAL_CONTROL_0 (AR_SM_BASE + AR_SREV_9485(ah) ? \
- 0x3c4 : 0x444)
-#define AR_PHY_TX_IQCAL_CONTROL_1 (AR_SM_BASE + AR_SREV_9485(ah) ? \
- 0x3c8 : 0x448)
-#define AR_PHY_TX_IQCAL_START (AR_SM_BASE + AR_SREV_9485(ah) ? \
- 0x3c4 : 0x440)
-#define AR_PHY_TX_IQCAL_STATUS_B0 (AR_SM_BASE + AR_SREV_9485(ah) ? \
- 0x3f0 : 0x48c)
+#define AR_PHY_TX_IQCAL_CONTROL_0 (AR_SM_BASE + (AR_SREV_9485(ah) ? \
+ 0x3c4 : 0x444))
+#define AR_PHY_TX_IQCAL_CONTROL_1 (AR_SM_BASE + (AR_SREV_9485(ah) ? \
+ 0x3c8 : 0x448))
+#define AR_PHY_TX_IQCAL_START (AR_SM_BASE + (AR_SREV_9485(ah) ? \
+ 0x3c4 : 0x440))
+#define AR_PHY_TX_IQCAL_STATUS_B0 (AR_SM_BASE + (AR_SREV_9485(ah) ? \
+ 0x3f0 : 0x48c))
#define AR_PHY_TX_IQCAL_CORR_COEFF_B0(_i) (AR_SM_BASE + \
(AR_SREV_9485(ah) ? \
0x3d0 : 0x450) + ((_i) << 2))
@@ -931,10 +931,10 @@
#define AR_PHY_AIC_SRAM_ADDR_B1 (AR_SM1_BASE + 0x5f0)
#define AR_PHY_AIC_SRAM_DATA_B1 (AR_SM1_BASE + 0x5f4)
-#define AR_PHY_RTT_TABLE_SW_INTF_B(i) (0x384 + (i) ? \
- AR_SM1_BASE : AR_SM_BASE)
-#define AR_PHY_RTT_TABLE_SW_INTF_1_B(i) (0x388 + (i) ? \
- AR_SM1_BASE : AR_SM_BASE)
+#define AR_PHY_RTT_TABLE_SW_INTF_B(i) (0x384 + ((i) ? \
+ AR_SM1_BASE : AR_SM_BASE))
+#define AR_PHY_RTT_TABLE_SW_INTF_1_B(i) (0x388 + ((i) ? \
+ AR_SM1_BASE : AR_SM_BASE))
/*
* Channel 2 Register Map
*/
--
1.7.7
^ permalink raw reply related
* Re: iwlagn is getting very shaky
From: Johannes Berg @ 2011-10-20 7:40 UTC (permalink / raw)
To: Norbert Preining
Cc: Guy, Wey-Yi, David Rientjes, linux-kernel@vger.kernel.org,
ipw3945-devel@lists.sourceforge.net, ilw@linux.intel.com,
linux-wireless@vger.kernel.org, Pekka Enberg
In-Reply-To: <20111020045927.GB23044@gamma.logic.tuwien.ac.at>
On Thu, 2011-10-20 at 13:59 +0900, Norbert Preining wrote:
> so I am now at the university, and it seems your last patch
> did wonder. Here a log after waking up from suspend at university...
For some value of wonder ...
> [17394.896199] wlan0: associated
> [17394.974620] iwlagn 0000:06:00.0: Encounter TX_STATUS_FAIL_PASSIVE_NO_RX, am I on 5.2G band? (2)
> [17394.976930] iwlagn 0000:06:00.0: Encounter TX_STATUS_FAIL_PASSIVE_NO_RX, am I on 5.2G band? (2)
> [17409.608674] iwlagn 0000:06:00.0: Tx aggregation enabled on ra = 00:24:c4:ab:bd:ef tid = 0
> [17409.616748] wlan0: direct probe to 00:24:c4:ab:bd:e0 (try 1/3)
> [17409.816093] wlan0: direct probe to 00:24:c4:ab:bd:e0 (try 2/3)
> [17410.016083] wlan0: direct probe to 00:24:c4:ab:bd:e0 (try 3/3)
> [17410.216086] wlan0: direct probe to 00:24:c4:ab:bd:e0 timed out
> [17419.285141] iwlagn 0000:06:00.0: Encounter TX_STATUS_FAIL_PASSIVE_NO_RX, am I on 5.2G band? (0)
> [17419.285315] iwlagn 0000:06:00.0: Encounter TX_STATUS_FAIL_PASSIVE_NO_RX, am I on 5.2G band? (0)
> [17419.286583] wlan0: deauthenticating from 00:24:c4:ab:bd:ef by local choice (reason=2)
> [17419.300296] cfg80211: Calling CRDA for country: JP
> [17419.309278] wlan0: authenticate with 00:24:c4:ab:bd:ef (try 1)
> [17419.310105] wlan0: authenticated
> [17419.317900] wlan0: associate with 00:24:c4:ab:bd:ef (try 1)
It seems a bit like the 5 GHz AP (:e0) just fails, and wpa_supplicant
selects a 2.4 GHz AP (:ef) now? Pure conjecture, I guess the AP could
also be on the same channel -- did you have scan information for these
APs?
johannes
^ permalink raw reply
* [PATCH v2 3/3] mac80211: select queue for fwded mesh frames
From: Thomas Pedersen @ 2011-10-20 7:26 UTC (permalink / raw)
To: linux-wireless; +Cc: Thomas Pedersen, johannes, linville
In-Reply-To: <1319070203-22097-1-git-send-email-thomas@cozybit.com>
Set proper queue mapping and timestamp for forwarded mesh frames.
Thanks to Luis Rodriguez for investigating and fixing this.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
---
v2:
We were already doing this for mcast frames, so don't duplicate
the code.
net/mac80211/rx.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index b867bd5..1408472 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1952,13 +1952,15 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
info = IEEE80211_SKB_CB(fwd_skb);
memset(info, 0, sizeof(*info));
info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING;
+ info->control.jiffies = jiffies;
info->control.vif = &rx->sdata->vif;
+ skb_set_queue_mapping(fwd_skb,
+ ieee80211_select_queue(sdata, fwd_skb));
+ ieee80211_set_qos_hdr(sdata, fwd_skb);
+
if (is_multicast_ether_addr(fwd_hdr->addr1)) {
IEEE80211_IFSTA_MESH_CTR_INC(&sdata->u.mesh,
fwded_mcast);
- skb_set_queue_mapping(fwd_skb,
- ieee80211_select_queue(sdata, fwd_skb));
- ieee80211_set_qos_hdr(sdata, fwd_skb);
} else {
int err;
/*
--
1.7.5.4
^ permalink raw reply related
* Re: BUG: All network processes hang (brcmsmac/wpa_supplicant)
From: Arend van Spriel @ 2011-10-20 6:28 UTC (permalink / raw)
To: Nico Schottelius, Eric Dumazet, LKML,
linux-wireless@vger.kernel.org, netdev
In-Reply-To: <20111019214250.GC2432@schottelius.org>
On 10/19/2011 11:42 PM, Nico Schottelius wrote:
>
> I'll soon (Friday) leave the environment permanently,
> thus testing will not be easily possible anymore.
Let's hope we have a conclusion by then.
> If this issue is 5Ghz related only, can I somehow trigger it without an AP
> running in that band / i.e. make the card try to use the 5 Ghz band although
> there is no ap nearby?
>
> Cheers,
>
> Nico
>
The warning is in the receive path so you need some transmitter to sent
packets to you. So you need the AP. If you can provide 'iwconfig' output
when associated it will tell on which channel it is.
Gr. AvS
^ permalink raw reply
* RE: [PATCH] ath6kl: Implement support for listen interval from userspace
From: Panjwani, Rishi @ 2011-10-20 6:02 UTC (permalink / raw)
To: Valo, Kalle; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <1318984591-10037-2-git-send-email-rpanjwan@qca.qualcomm.com>
Kalle,
Please drop this patch as I need to make some changes to it. I will send v2 soon.
Regards,
Rishi
-----Original Message-----
From: Panjwani, Rishi
Sent: Tuesday, October 18, 2011 5:37 PM
To: Valo, Kalle
Cc: linux-wireless@vger.kernel.org; Panjwani, Rishi
Subject: [PATCH] ath6kl: Implement support for listen interval from userspace
In order to allow user space based control of listen interval, we use available debugfs infrastructure. Listen interval implies how frequently we want the WLAN chip to wake up and synchronize the beacons in case it is in sleep mode. The user has to write the listen interval (in msecs) to the listen_interval file in ath6kl debug directory. The minimum value is
15 and maximum is 5000.
Example:
echo "30" > listen_interval
This will make the listen interval approximately 30 msecs.
Signed-off-by: Rishi Panjwani <rpanjwan@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath6kl/debug.c | 50 +++++++++++++++++++++++++++++++
1 files changed, 50 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
index 3eaa291..41f36d2 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -1488,6 +1488,53 @@ static const struct file_operations fops_bgscan_int = {
.owner = THIS_MODULE,
.llseek = default_llseek,
};
+static ssize_t ath6kl_listen_int_write(struct file *file,
+ const char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct ath6kl *ar = file->private_data;
+ u16 listen_int;
+ char buf[32];
+ ssize_t len;
+
+ len = min(count, sizeof(buf) - 1);
+ if (copy_from_user(buf, user_buf, len))
+ return -EFAULT;
+
+ buf[len] = '\0';
+ if (kstrtou16(buf, 0, &listen_int))
+ return -EINVAL;
+
+ if ((listen_int >= 15) && (listen_int <= 5000)) {
+ ar->listen_intvl_t = listen_int;
+ ath6kl_wmi_listeninterval_cmd(ar->wmi, ar->listen_intvl_t, 0);
+ } else {
+ return -EINVAL;
+ }
+
+ return count;
+}
+
+static ssize_t ath6kl_listen_int_read(struct file *file,
+ char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct ath6kl *ar = file->private_data;
+ char buf[16];
+ int len;
+
+ len = snprintf(buf, sizeof(buf), "%u\n", ar->listen_intvl_t);
+
+ return simple_read_from_buffer(user_buf, count, ppos, buf, len); }
+
+static const struct file_operations fops_listen_int = {
+ .read = ath6kl_listen_int_read,
+ .write = ath6kl_listen_int_write,
+ .open = ath6kl_debugfs_open,
+ .owner = THIS_MODULE,
+ .llseek = default_llseek,
+};
int ath6kl_debug_init(struct ath6kl *ar) { @@ -1571,6 +1618,9 @@ int ath6kl_debug_init(struct ath6kl *ar)
debugfs_create_file("bgscan_interval", S_IWUSR,
ar->debugfs_phy, ar, &fops_bgscan_int);
+ debugfs_create_file("listen_interval", S_IWUSR, ar->debugfs_phy, ar,
+ &fops_listen_int);
+
return 0;
}
--
1.7.0.4
^ permalink raw reply related
* Re: iwlagn is getting very shaky
From: David Rientjes @ 2011-10-20 5:30 UTC (permalink / raw)
To: Norbert Preining
Cc: Guy, Wey-Yi W, linux-kernel@vger.kernel.org,
ipw3945-devel@lists.sourceforge.net, ilw@linux.intel.com,
linux-wireless@vger.kernel.org, Pekka Enberg
In-Reply-To: <20111020031421.GS11060@gamma.logic.tuwien.ac.at>
On Thu, 20 Oct 2011, Norbert Preining wrote:
> No attachment again ... something is filtering here???
>
> Please include it directly in the email
>
Not sure why you're not receiving the inlined patch, you can see it at
https://lkml.org/lkml/2011/10/19/505
^ permalink raw reply
* Re: iwlagn is getting very shaky
From: Norbert Preining @ 2011-10-20 4:59 UTC (permalink / raw)
To: Guy, Wey-Yi
Cc: David Rientjes, linux-kernel@vger.kernel.org,
ipw3945-devel@lists.sourceforge.net, ilw@linux.intel.com,
linux-wireless@vger.kernel.org, Pekka Enberg
In-Reply-To: <1319004836.31823.57.camel@wwguy-huron>
Hi Wey,
so I am now at the university, and it seems your last patch
did wonder. Here a log after waking up from suspend at university...
[17394.694774] wlan0: associate with 00:24:c4:ab:bd:ef (try 1)
[17394.892077] wlan0: associate with 00:24:c4:ab:bd:ef (try 2)
[17394.896190] wlan0: RX AssocResp from 00:24:c4:ab:bd:ef (capab=0x1 status=0 aid=2)
[17394.896199] wlan0: associated
[17394.974620] iwlagn 0000:06:00.0: Encounter TX_STATUS_FAIL_PASSIVE_NO_RX, am I on 5.2G band? (2)
[17394.976930] iwlagn 0000:06:00.0: Encounter TX_STATUS_FAIL_PASSIVE_NO_RX, am I on 5.2G band? (2)
[17409.608674] iwlagn 0000:06:00.0: Tx aggregation enabled on ra = 00:24:c4:ab:bd:ef tid = 0
[17409.616748] wlan0: direct probe to 00:24:c4:ab:bd:e0 (try 1/3)
[17409.816093] wlan0: direct probe to 00:24:c4:ab:bd:e0 (try 2/3)
[17410.016083] wlan0: direct probe to 00:24:c4:ab:bd:e0 (try 3/3)
[17410.216086] wlan0: direct probe to 00:24:c4:ab:bd:e0 timed out
[17419.285141] iwlagn 0000:06:00.0: Encounter TX_STATUS_FAIL_PASSIVE_NO_RX, am I on 5.2G band? (0)
[17419.285315] iwlagn 0000:06:00.0: Encounter TX_STATUS_FAIL_PASSIVE_NO_RX, am I on 5.2G band? (0)
[17419.286583] wlan0: deauthenticating from 00:24:c4:ab:bd:ef by local choice (reason=2)
[17419.300296] cfg80211: Calling CRDA for country: JP
[17419.309278] wlan0: authenticate with 00:24:c4:ab:bd:ef (try 1)
[17419.310105] wlan0: authenticated
[17419.317900] wlan0: associate with 00:24:c4:ab:bd:ef (try 1)
[17419.319837] wlan0: RX ReassocResp from 00:24:c4:ab:bd:ef (capab=0x1 status=0 aid=2)
[17419.319840] wlan0: associated
[17422.384922] iwlagn 0000:06:00.0: Tx aggregation enabled on ra = 00:24:c4:ab:bd:ef tid = 0
[17509.576705] wlan0: direct probe to 00:24:c4:ab:bd:e0 (try 1/3)
[17509.776098] wlan0: direct probe to 00:24:c4:ab:bd:e0 (try 2/3)
[17509.976086] wlan0: direct probe to 00:24:c4:ab:bd:e0 (try 3/3)
[17509.980861] wlan0: direct probe responded
[17510.016116] wlan0: authenticate with 00:24:c4:ab:bd:e0 (try 1)
[17510.018753] wlan0: authenticated
[17510.042702] wlan0: associate with 00:24:c4:ab:bd:e0 (try 1)
[17510.050541] wlan0: RX ReassocResp from 00:24:c4:ab:bd:e0 (capab=0x421 status=0 aid=1)
[17510.050551] wlan0: associated
[17589.724188] iwlagn 0000:06:00.0: Tx aggregation enabled on ra = 00:24:c4:ab:bd:e0 tid = 0
[17590.839852] iwlagn 0000:06:00.0: Tx aggregation enabled on ra = 00:24:c4:ab:bd:e0 tid = 0
but the connection is up and working.
On Di, 18 Okt 2011, Guy, Wey-Yi wrote:
> Could you please let me know the brand/model of the AP which having
> problem. Also the configuration of your NIC also help.
THe AP is a big Cisco one, more I cannot see, with 3 antenna.
For the NIC, what do you want to know:
wlan0 IEEE 802.11abgn ESSID:"XXXXXXXXXX"
Mode:Managed Frequency:2.412 GHz Access Point: 00:24:C4:AB:BD:E0
Bit Rate=72.2 Mb/s Tx-Power=15 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=51/70 Signal level=-59 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:685 Invalid misc:59 Missed beacon:0
The last line looks interesting, excessive retires: 685, INvalid misc: 59
Note that the "Tx excessive retries" increase steaadily and radically,
downloading updates with aptitude I see afterwards:
Tx excessive retries:17922
The "Invalid misc" also increase, but slowly.
On Mi, 19 Okt 2011, wwguy wrote:
> Are you connect on 5.2GHz? looks to me there were only one place can
> stop the queue which is for radar channel detection.
No, it is channel 1
$ iwlist wlan0 channel
wlan0 32 channels in total; available frequencies :
Channel 01 : 2.412 GHz
Channel 02 : 2.417 GHz
Channel 03 : 2.422 GHz
Channel 04 : 2.427 GHz
Channel 05 : 2.432 GHz
Channel 06 : 2.437 GHz
Channel 07 : 2.442 GHz
Channel 08 : 2.447 GHz
Channel 09 : 2.452 GHz
Channel 10 : 2.457 GHz
Channel 11 : 2.462 GHz
Channel 12 : 2.467 GHz
Channel 13 : 2.472 GHz
Channel 36 : 5.18 GHz
Channel 40 : 5.2 GHz
Channel 44 : 5.22 GHz
Channel 48 : 5.24 GHz
Channel 52 : 5.26 GHz
Channel 56 : 5.28 GHz
Channel 60 : 5.3 GHz
Channel 64 : 5.32 GHz
Channel 100 : 5.5 GHz
Channel 104 : 5.52 GHz
Channel 108 : 5.54 GHz
Channel 112 : 5.56 GHz
Channel 116 : 5.58 GHz
Channel 120 : 5.6 GHz
Channel 124 : 5.62 GHz
Channel 128 : 5.64 GHz
Channel 132 : 5.66 GHz
Channel 136 : 5.68 GHz
Channel 140 : 5.7 GHz
Current Frequency:2.412 GHz (Channel 1)
Well, for the time being the patch is nice and helps, thanks!
If you want me to test more please let me know, but I am leaving
today for some business trip and will be back on Wednesday at
work here.
Best wishes
Norbert
------------------------------------------------------------------------
Norbert Preining preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
GOLANT (adj.)
Blank, sly and faintly embarrassed. Pertaining to the expression seen
on the face of someone who has clearly forgotten your name.
--- Douglas Adams, The Meaning of Liff
^ permalink raw reply
* My unsupported Buffalo's WLI-UC-GNHP almost works with rt2800usb in 3.0.4.
From: Teika Kazura @ 2011-10-20 4:33 UTC (permalink / raw)
To: linux-wireless
[-- Attachment #1: Type: Text/Plain, Size: 1782 bytes --]
Hi, linux-wireless list.
My WiFi usb stick[1] is not registered in rt2800usb.c of kernel 3.0.4,
but I here report that it works fairly well. There's also problems
stated later.
I'm not sure if you welcome this kind of report. If not, sorry, and
I wonder if you could write so at linux-wireless website.
[1]
Vendor: Buffalo
Model: WLI-UC-GNHP
id: 0x0411, 0x0158
At least I can stably connect to an AP. When the module detects the
device, dmesg says:
phy1 -> rt2x00_set_chip: Info - Chipset detected - rt: 3070, rf: 0005, rev: 0201.
Both patching the source and using sysfs "new_id" file [2] work.
(OTOH with the linux 2.6.39.3, new_id doesn't work[3], while patching
makes the driver support it.)
[2] echo "411 158" > /sys/bus/usb/drivers/rt2800usb/new_id
[3] Once, the kernel hanged immediately after touching "new_id"
file. Another try resulted in stack trace, and modprobe -r rt2800usb
never terminated, although the kernel itself continued running.
Next let's see the problems:
1.
Sometimes, not always, the PC hangs, showing stack trace (thrown to
VT12) when you unplug the device. Sometimes only stack trace is shown
in dmesg, and kernel continues running.
I've attached a stack trace at the end of this message.
2.
It's not really a problem for me, but warnings flood dmesg, like this:
phy0 -> rt2800_txdone_entry_check: Warning - TX status report missed for queue 2 entry 5
The last number changes each time. It's only when the card is
connected to an AP.
If there's something I can do, please ask me. I'm subscribing this ML.
I've also tried compat-wireless-3.1-rc8-1, but it is quite unstable,
breaking at many stages. I'm not sure if I can keep up with changes in
RC based versions.
Thanks a lot for developing wireless drivers.
Teika (Teika kazura)
[-- Attachment #2: stack.txt --]
[-- Type: Text/Plain, Size: 2137 bytes --]
usb 1-1: USB disconnect, device number 3
BUG: unable to handle kernel paging request at ffff8800623c9428
IP: [<ffffffff8133486f>] usb_disconnect+0xcf/0x130
PGD 164c063 PUD 57fac067 PMD 0
Oops: 0002 [#1]
CPU 0
Modules linked in: radeon ttm drm_kms_helper cfbcopyarea cfbimgblt cfbfillrect [last unloaded: rt2x00lib]
Pid: 365, comm: khubd Not tainted 3.0.4 #1 Hewlett-Packard HP Compaq 6715s (RK219AV)/30C2
RIP: 0010:[<ffffffff8133486f>] [<ffffffff8133486f>] usb_disconnect+0xcf/0x130
RSP: 0018:ffff880057b6fd30 EFLAGS: 00010206
RAX: 0000000054c82000 RBX: ffff880054c83000 RCX: ffff880054c830a0
RDX: ffff880057a39000 RSI: ffffffff8123e490 RDI: ffff88005508f8d0
RBP: ffff880054c83088 R08: ffff8800578029c0 R09: ffffffff8123f3a9
R10: 0000000000000000 R11: 0000000000000000 R12: ffff88005508fc20
R13: ffff880057a39000 R14: ffff880054c830e8 R15: 000000000000001f
FS: 00007fd52b96c700(0000) GS:ffffffff8165b000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: ffff8800623c9428 CR3: 0000000055594000 CR4: 00000000000006b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process khubd (pid: 365, threadinfo ffff880057b6e000, task ffff88005796a6f0)
Stack:
0000000000000000 000000005508f800 0000000000000001 ffff88005506d400
0000000000000001 0000000000000100 0000000000000000 ffff88005508f800
0000000000000000 ffffffff813359f3 ffff88005796a728 ffff88005796a940
Call Trace:
[<ffffffff813359f3>] ? hub_thread+0x673/0x12e0
[<ffffffff81047680>] ? wake_up_bit+0x40/0x40
[<ffffffff81335380>] ? hub_probe+0x850/0x850
[<ffffffff810472a6>] ? kthread+0x96/0xa0
[<ffffffff814c4994>] ? kernel_thread_helper+0x4/0x10
[<ffffffff81047210>] ? kthreadd+0xd0/0xd0
[<ffffffff814c4990>] ? gs_change+0xb/0xb
Code: 48 89 df e8 c4 21 00 00 48 8d 7b 48 e8 9b be 00 00 4c 89 f7 e8 b3 df 18 00 48 89 ef e8 cb f2 fa ff 8b 03 85 c0 7e 0e 48 8b 53 40 <0f> b3 42 28 c7 03 ff ff ff ff fa 49 c7 04 24 00 00 00 00 fb 48
RIP [<ffffffff8133486f>] usb_disconnect+0xcf/0x130
RSP <ffff880057b6fd30>
CR2: ffff8800623c9428
---[ end trace 4d74f468484de6cd ]---
^ permalink raw reply
* Re: Alfa AWUS036NHR with RTL8188RU chipset
From: Larry Finger @ 2011-10-20 3:38 UTC (permalink / raw)
To: v4mp; +Cc: linux-wireless
In-Reply-To: <loom.20111019T162518-352@post.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 798 bytes --]
On 10/19/2011 09:37 AM, v4mp wrote:
>
>
> ok, i've done what you asked me with usbmon,
> but i'm not sure that is what you want
>
> i've redone dumping dmesg trying to grab the information you are lookin for
>
> i can't upload it on pastebin cause it's too large, i uploaded logs on megaupload
>
> http://www.megaupload.com/?d=3D0QS1MX
I got the data. Thanks. It will take a while to analyze the usbmon data, but
there is something I would like you to try. It will involve getting the kernel
source for some recent kernel, and applying the attached patch. With it,
xhci-hcd will dump the stack whenever the "short transfer on control ep" or "no
room on ep ring" errors occur. Send me those parts of the dmesg output, but
again do the dump early before the buffer wrap around happens.
Larry
[-- Attachment #2: xhci_debug --]
[-- Type: text/plain, Size: 1337 bytes --]
Index: wireless-testing-new/drivers/usb/host/xhci-ring.c
===================================================================
--- wireless-testing-new.orig/drivers/usb/host/xhci-ring.c
+++ wireless-testing-new/drivers/usb/host/xhci-ring.c
@@ -1616,6 +1616,7 @@ static int process_ctrl_td(struct xhci_h
int ep_index;
struct xhci_ep_ctx *ep_ctx;
u32 trb_comp_code;
+ static int count;
slot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->flags));
xdev = xhci->devs[slot_id];
@@ -1641,6 +1642,8 @@ static int process_ctrl_td(struct xhci_h
break;
case COMP_SHORT_TX:
xhci_warn(xhci, "WARN: short transfer on control ep\n");
+ if (count++ < 5)
+ dump_stack();
if (td->urb->transfer_flags & URB_SHORT_NOT_OK)
*status = -EREMOTEIO;
else
@@ -2429,6 +2432,7 @@ static void queue_trb(struct xhci_hcd *x
static int prepare_ring(struct xhci_hcd *xhci, struct xhci_ring *ep_ring,
u32 ep_state, unsigned int num_trbs, gfp_t mem_flags)
{
+ static int count;
/* Make sure the endpoint has been added to xHC schedule */
switch (ep_state) {
case EP_STATE_DISABLED:
@@ -2459,6 +2463,8 @@ static int prepare_ring(struct xhci_hcd
if (!room_on_ring(xhci, ep_ring, num_trbs)) {
/* FIXME allocate more room */
xhci_err(xhci, "ERROR no room on ep ring\n");
+ if (count++ < 5)
+ dump_stack();
return -ENOMEM;
}
^ permalink raw reply
* Re: iwlagn is getting very shaky
From: Norbert Preining @ 2011-10-20 3:14 UTC (permalink / raw)
To: Guy, Wey-Yi W
Cc: David Rientjes, linux-kernel@vger.kernel.org,
ipw3945-devel@lists.sourceforge.net, ilw@linux.intel.com,
linux-wireless@vger.kernel.org, Pekka Enberg
In-Reply-To: <E9954878DD1FB34FAE5187FB88C58A3501A0D0992E@orsmsx506.amr.corp.intel.com>
On Mi, 19 Okt 2011, Guy, Wey-Yi W wrote:
> Hmm, I am sure I have the attachment, but here I attach again.
>
> Also, the patch is simple. Only few lines
No attachment again ... something is filtering here???
Please include it directly in the email
Best wishes
Norbert
------------------------------------------------------------------------
Norbert Preining preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
`How do you feel?' he asked him.
bits of me keep
passing out.' ....
`We're safe,' he said.
`Oh good,' said Arthur.
in one of the
spaceships of the Vogon Constructor Fleet.'
this is obviously some strange usage of
the word "safe" that I wasn't previously aware of.'
--- Arthur after his first ever teleport ride.
--- Douglas Adams, The Hitchhikers Guide to the Galaxy
^ permalink raw reply
* RE: iwlagn is getting very shaky
From: Guy, Wey-Yi W @ 2011-10-20 2:55 UTC (permalink / raw)
To: Norbert Preining
Cc: David Rientjes, linux-kernel@vger.kernel.org,
ipw3945-devel@lists.sourceforge.net, ilw@linux.intel.com,
linux-wireless@vger.kernel.org, Pekka Enberg
In-Reply-To: <20111020025123.GR11060@gamma.logic.tuwien.ac.at>
[-- Attachment #1: Type: text/plain, Size: 2796 bytes --]
Hmm, I am sure I have the attachment, but here I attach again.
Also, the patch is simple. Only few lines
>From 78e955b90a8e259d180bfb962ef4558645d74a91 Mon Sep 17 00:00:00 2001
From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Date: Wed, 19 Oct 2011 18:27:41 -0700
Subject: [PATCH 1/1] iwlagn: stop queue testing
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index 3bee0f1..d543686 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -191,8 +191,14 @@ static void iwlagn_set_tx_status(struct iwl_priv *priv,
if (status == TX_STATUS_FAIL_PASSIVE_NO_RX &&
iwl_is_associated_ctx(ctx) && ctx->vif &&
ctx->vif->type == NL80211_IFTYPE_STATION) {
+#if 0
ctx->last_tx_rejected = true;
iwl_stop_queue(priv, &priv->txq[txq_id]);
+#endif
+IWL_ERR(priv,
+ "Encounter TX_STATUS_FAIL_PASSIVE_NO_RX, am I on 5.2G band? (%d)\n",
+ txq_id);
+
}
IWL_DEBUG_TX_REPLY(priv, "TXQ %d status %s (0x%08x) rate_n_flags "
--
1.7.0.4
Thanks
Wey
-----Original Message-----
From: Norbert Preining [mailto:preining@logic.at]
Sent: Wednesday, October 19, 2011 7:51 PM
To: Guy, Wey-Yi W
Cc: David Rientjes; linux-kernel@vger.kernel.org; ipw3945-devel@lists.sourceforge.net; ilw@linux.intel.com; linux-wireless@vger.kernel.org; Pekka Enberg
Subject: Re: iwlagn is getting very shaky
On Mi, 19 Okt 2011, Guy, Wey-Yi wrote:
> > Do you mean the patch you send with a strange date:
...
> > It does not apply at all, I cannot even find
> > rejected
> > in iwl-agn-tx.c.
> >
> > On which tree is that based, can you provide a patch against main
> > git branch of Linus.
> >
> > Thanks.
> >
> Let's try this and see if apply. btw, are you on 5GHz?
Which one??? Nothing attached, nothing received, and the patch you sent before does not apply .... not even with manual intervention ... at least I am not able.
5GHz: I don't know by now, not at university by now.
Best wishes
Norbert
------------------------------------------------------------------------
Norbert Preining preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
`Ford, you're turning into a penguin. Stop it.'
--- Arthur experiences the improbability drive at work.
--- Douglas Adams, The Hitchhikers Guide to the Galaxy
[-- Attachment #2: 0001-iwlagn-stop-queue-testing.patch --]
[-- Type: application/octet-stream, Size: 1140 bytes --]
From 78e955b90a8e259d180bfb962ef4558645d74a91 Mon Sep 17 00:00:00 2001
From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Date: Wed, 19 Oct 2011 18:27:41 -0700
Subject: [PATCH 1/1] iwlagn: stop queue testing
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index 3bee0f1..d543686 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -191,8 +191,14 @@ static void iwlagn_set_tx_status(struct iwl_priv *priv,
if (status == TX_STATUS_FAIL_PASSIVE_NO_RX &&
iwl_is_associated_ctx(ctx) && ctx->vif &&
ctx->vif->type == NL80211_IFTYPE_STATION) {
+#if 0
ctx->last_tx_rejected = true;
iwl_stop_queue(priv, &priv->txq[txq_id]);
+#endif
+IWL_ERR(priv,
+ "Encounter TX_STATUS_FAIL_PASSIVE_NO_RX, am I on 5.2G band? (%d)\n",
+ txq_id);
+
}
IWL_DEBUG_TX_REPLY(priv, "TXQ %d status %s (0x%08x) rate_n_flags "
--
1.7.0.4
^ permalink raw reply related
* Re: iwlagn is getting very shaky
From: Norbert Preining @ 2011-10-20 2:51 UTC (permalink / raw)
To: Guy, Wey-Yi
Cc: David Rientjes, linux-kernel@vger.kernel.org,
ipw3945-devel@lists.sourceforge.net, ilw@linux.intel.com,
linux-wireless@vger.kernel.org, Pekka Enberg
In-Reply-To: <1319074339.31823.68.camel@wwguy-huron>
On Mi, 19 Okt 2011, Guy, Wey-Yi wrote:
> > Do you mean the patch you send with a strange date:
...
> > It does not apply at all, I cannot even find
> > rejected
> > in iwl-agn-tx.c.
> >
> > On which tree is that based, can you provide a patch against main
> > git branch of Linus.
> >
> > Thanks.
> >
> Let's try this and see if apply. btw, are you on 5GHz?
Which one??? Nothing attached, nothing received, and the patch
you sent before does not apply .... not even with manual
intervention ... at least I am not able.
5GHz: I don't know by now, not at university by now.
Best wishes
Norbert
------------------------------------------------------------------------
Norbert Preining preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
`Ford, you're turning into a penguin. Stop it.'
--- Arthur experiences the improbability drive at work.
--- Douglas Adams, The Hitchhikers Guide to the Galaxy
^ permalink raw reply
* Re: iwlagn is getting very shaky
From: Guy, Wey-Yi @ 2011-10-20 1:32 UTC (permalink / raw)
To: Norbert Preining
Cc: David Rientjes, linux-kernel@vger.kernel.org,
ipw3945-devel@lists.sourceforge.net, ilw@linux.intel.com,
linux-wireless@vger.kernel.org, Pekka Enberg
In-Reply-To: <20111020020225.GO11060@gamma.logic.tuwien.ac.at>
[-- Attachment #1: Type: text/plain, Size: 1791 bytes --]
On Wed, 2011-10-19 at 19:02 -0700, Norbert Preining wrote:
> On Mi, 19 Okt 2011, wwguy wrote:
> > instead of having you to revert the patch I ask you to do, could you
> > please just apply the patch I attach here and see if it make any
> > differences? it is also for debugging purpose, so please check the dmesg
> > log.
>
> Do you mean the patch you send with a strange date:
> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
> ---
> drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
> b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
> index 863c43f..5a87071 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
> @@ -812,8 +812,13 @@ int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct
> iwl_rx_mem_buffer *rxb,
> if (status == TX_STATUS_FAIL_PASSIVE_NO_RX &&
> iwl_is_associated_ctx(ctx) && ctx->vif &&
> ctx->vif->type == NL80211_IFTYPE_STATION) {
> +#if 0
> ctx->last_tx_rejected = true;
> iwl_trans_stop_queue(trans(priv), txq_id);
> +#endif
> +IWL_ERR(priv,
> + "Encounter TX_STATUS_FAIL_PASSIVE_NO_RX, am I on 5.2G band? (%d)\n",
> + txq_id);
>
> IWL_DEBUG_TX_REPLY(priv,
> "TXQ %d status %s (0x%08x) "
> --
> 1.7.0.4
>
> It does not apply at all, I cannot even find
> rejected
> in iwl-agn-tx.c.
>
> On which tree is that based, can you provide a patch against main
> git branch of Linus.
>
> Thanks.
>
Let's try this and see if apply. btw, are you on 5GHz?
Thanks
Wey
[-- Attachment #2: 0001-iwlagn-stop-queue-testing.patch --]
[-- Type: text/x-patch, Size: 1109 bytes --]
>From 78e955b90a8e259d180bfb962ef4558645d74a91 Mon Sep 17 00:00:00 2001
From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Date: Wed, 19 Oct 2011 18:27:41 -0700
Subject: [PATCH 1/1] iwlagn: stop queue testing
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index 3bee0f1..d543686 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -191,8 +191,14 @@ static void iwlagn_set_tx_status(struct iwl_priv *priv,
if (status == TX_STATUS_FAIL_PASSIVE_NO_RX &&
iwl_is_associated_ctx(ctx) && ctx->vif &&
ctx->vif->type == NL80211_IFTYPE_STATION) {
+#if 0
ctx->last_tx_rejected = true;
iwl_stop_queue(priv, &priv->txq[txq_id]);
+#endif
+IWL_ERR(priv,
+ "Encounter TX_STATUS_FAIL_PASSIVE_NO_RX, am I on 5.2G band? (%d)\n",
+ txq_id);
+
}
IWL_DEBUG_TX_REPLY(priv, "TXQ %d status %s (0x%08x) rate_n_flags "
--
1.7.0.4
^ permalink raw reply related
* Re: iwlagn is getting very shaky
From: Norbert Preining @ 2011-10-20 2:02 UTC (permalink / raw)
To: wwguy
Cc: David Rientjes, linux-kernel@vger.kernel.org,
ipw3945-devel@lists.sourceforge.net, ilw@linux.intel.com,
linux-wireless@vger.kernel.org, Pekka Enberg
In-Reply-To: <1319038282.25023.21.camel@wwguy-ubuntu>
On Mi, 19 Okt 2011, wwguy wrote:
> instead of having you to revert the patch I ask you to do, could you
> please just apply the patch I attach here and see if it make any
> differences? it is also for debugging purpose, so please check the dmesg
> log.
Do you mean the patch you send with a strange date:
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index 863c43f..5a87071 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -812,8 +812,13 @@ int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct
iwl_rx_mem_buffer *rxb,
if (status == TX_STATUS_FAIL_PASSIVE_NO_RX &&
iwl_is_associated_ctx(ctx) && ctx->vif &&
ctx->vif->type == NL80211_IFTYPE_STATION) {
+#if 0
ctx->last_tx_rejected = true;
iwl_trans_stop_queue(trans(priv), txq_id);
+#endif
+IWL_ERR(priv,
+ "Encounter TX_STATUS_FAIL_PASSIVE_NO_RX, am I on 5.2G band? (%d)\n",
+ txq_id);
IWL_DEBUG_TX_REPLY(priv,
"TXQ %d status %s (0x%08x) "
--
1.7.0.4
It does not apply at all, I cannot even find
rejected
in iwl-agn-tx.c.
On which tree is that based, can you provide a patch against main
git branch of Linus.
Thanks.
Best wishes
Norbert
------------------------------------------------------------------------
Norbert Preining preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
BROMPTON
A bromton is that which is said to have been committed when you are
convinced you are about to blow off with a resounding trumpeting noise
in a public place and all that actually slips out is a tiny 'pfpt'.
--- Douglas Adams, The Meaning of Liff
^ permalink raw reply related
* [PATCH 6/6] mac80211: check mesh peer's WMM parameters
From: Thomas Pedersen @ 2011-10-20 1:03 UTC (permalink / raw)
To: linux-wireless; +Cc: anagar6, devel, Thomas Pedersen, johannes, linville
In-Reply-To: <1319072606-28291-1-git-send-email-thomas@cozybit.com>
For now, disallow peering if our WMM parameters don't match our peer's.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
---
net/mac80211/mesh.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index b3a125f..dd83c8f7 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -103,6 +103,13 @@ bool mesh_matches_local(struct ieee802_11_elems *ie, struct ieee80211_sub_if_dat
ieee80211_ht_info_to_channel_type(ie->ht_info_elem)))
goto mismatch;
+ if (ie->wmm_param) {
+ u8 wmm_local[sizeof(struct ieee80211_wmm_param_ie)];
+ ieee80211_build_wmm_ie(&sdata->vif, wmm_local);
+ if (memcmp(ie->wmm_param, wmm_local, sizeof(wmm_local)))
+ goto mismatch;
+ }
+
return true;
mismatch:
return false;
--
1.7.5.4
^ permalink raw reply related
* [PATCH 5/6] mac80211: add WMM IE to mesh frames
From: Thomas Pedersen @ 2011-10-20 1:03 UTC (permalink / raw)
To: linux-wireless; +Cc: anagar6, devel, Thomas Pedersen, johannes, linville
In-Reply-To: <1319072606-28291-1-git-send-email-thomas@cozybit.com>
Include the WMM IE in mesh peering and beacon frames. This is needed
tell any potential peers what our WMM / EDCA parameters are.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
---
include/linux/ieee80211.h | 26 +++++++++++++
include/net/mac80211.h | 4 ++
net/mac80211/mesh_plink.c | 4 +-
net/mac80211/tx.c | 2 +
net/mac80211/util.c | 92 +++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 127 insertions(+), 1 deletions(-)
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 48363c3..ec6f396 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -152,6 +152,11 @@
#define IEEE80211_WMM_IE_STA_QOSINFO_SP_MASK 0x03
#define IEEE80211_WMM_IE_STA_QOSINFO_SP_SHIFT 5
+#define IEEE80211_WMM_IE_ECWMIN_MASK 0x0f
+#define IEEE80211_WMM_IE_ECWMIN_SHIFT 0
+#define IEEE80211_WMM_IE_ECWMAX_MASK 0xf0
+#define IEEE80211_WMM_IE_ECWMAX_SHIFT 4
+
#define IEEE80211_HT_CTL_LEN 4
struct ieee80211_hdr {
@@ -605,6 +610,27 @@ struct ieee80211_tim_ie {
u8 virtual_map[1];
} __attribute__ ((packed));
+struct ieee80211_wmm_ac_param {
+ u8 ac_aci_acm_aifsn;
+ u8 ac_ecwmin_ecwmax;
+ __le16 ac_txop_limit;
+} __attribute__ ((packed));
+
+/**
+ * struct ieee80211_wmm_param
+ *
+ * This structure refers to "WMM parameter information element"
+ */
+struct ieee80211_wmm_param_ie {
+ u8 oui[3];
+ u8 oui_type;
+ u8 oui_subtype;
+ u8 version;
+ u8 qos_info;
+ u8 reserved;
+ struct ieee80211_wmm_ac_param ac[4];
+} __attribute__ ((packed));
+
/**
* struct ieee80211_meshconf_ie
*
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index dc1123a..fd28b2b 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -3649,4 +3649,8 @@ int ieee80211_add_srates_ie(struct ieee80211_vif *vif, struct sk_buff *skb);
int ieee80211_add_ext_srates_ie(struct ieee80211_vif *vif,
struct sk_buff *skb);
+int ieee80211_build_wmm_ie(struct ieee80211_vif *vif,
+ u8 *ie_data);
+int ieee80211_add_wmm_ie(struct ieee80211_vif *vif,
+ struct sk_buff *skb);
#endif /* MAC80211_H */
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index f0705e6..069e5dc 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -177,6 +177,7 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
2 + sizeof(struct ieee80211_meshconf_ie) +
2 + sizeof(struct ieee80211_ht_cap) +
2 + sizeof(struct ieee80211_ht_info) +
+ 2 + sizeof(struct ieee80211_wmm_param_ie) +
2 + 8 + /* peering IE */
sdata->u.mesh.ie_len);
if (!skb)
@@ -256,7 +257,8 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
if (action != WLAN_SP_MESH_PEERING_CLOSE) {
if (mesh_add_ht_cap_ie(skb, sdata) ||
- mesh_add_ht_info_ie(skb, sdata))
+ mesh_add_ht_info_ie(skb, sdata) ||
+ ieee80211_add_wmm_ie(&sdata->vif, skb))
return -1;
}
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index faca189..dfb6bb9 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2294,6 +2294,7 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
2 + sizeof(struct ieee80211_ht_info) +
2 + sdata->u.mesh.mesh_id_len +
2 + sizeof(struct ieee80211_meshconf_ie) +
+ 2 + sizeof(struct ieee80211_wmm_param_ie) +
sdata->u.mesh.ie_len);
if (!skb)
goto out;
@@ -2324,6 +2325,7 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
mesh_add_ht_info_ie(skb, sdata) ||
mesh_add_meshid_ie(skb, sdata) ||
mesh_add_meshconf_ie(skb, sdata) ||
+ ieee80211_add_wmm_ie(&sdata->vif, skb) ||
mesh_add_vendor_ies(skb, sdata)) {
pr_err("o11s: couldn't add ies!\n");
goto out;
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 72b3a2e..071b425 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1419,6 +1419,98 @@ u8 *ieee80211_ie_build_ht_info(u8 *pos,
return pos + sizeof(struct ieee80211_ht_info);
}
+static inline u8 ieee80211_wmm_ecw(struct ieee80211_tx_queue_params *txq)
+{
+ u8 cw_min, cw_max, n = 0;
+
+ /* cw_min and cw_max are transmitted as n in 2^n - 1 */
+ while ((txq->cw_min >> n) & 0x01)
+ n++;
+ cw_min = n;
+
+ n = 0;
+ while ((txq->cw_max >> n) & 0x01)
+ n++;
+ cw_max = n;
+
+ return ((cw_min << IEEE80211_WMM_IE_ECWMIN_SHIFT) &
+ IEEE80211_WMM_IE_ECWMIN_MASK) |
+ ((cw_max << IEEE80211_WMM_IE_ECWMAX_SHIFT) &
+ IEEE80211_WMM_IE_ECWMAX_MASK);
+}
+
+static inline u8 ieee80211_aci_to_q(u8 aci)
+{
+ u8 q;
+
+ switch (aci) {
+ case 1: /* BK */
+ q = 3;
+ break;
+ default:
+ case 0: /* BE */
+ q = 2;
+ break;
+ case 2: /* VI */
+ q = 1;
+ break;
+ case 3: /* VO */
+ q = 0;
+ break;
+ }
+
+ return q;
+}
+
+int ieee80211_build_wmm_ie(struct ieee80211_vif *vif, u8 *data)
+{
+ struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+ struct ieee80211_wmm_param_ie *wmm;
+ struct ieee80211_wmm_ac_param *ac;
+ struct ieee80211_tx_queue_params *txconf;
+ u8 aci;
+
+ wmm = (struct ieee80211_wmm_param_ie *) data;
+ wmm->oui[0] = 0x00;
+ wmm->oui[1] = 0x50;
+ wmm->oui[2] = 0xf2;
+ wmm->oui_type = 2; /* WMM */
+ wmm->oui_subtype = 1; /* WMM param */
+ wmm->version = 1;
+ wmm->qos_info = 0;
+ wmm->reserved = 0;
+
+ for (aci = 0; aci < 4; aci++) {
+ ac = &wmm->ac[aci];
+ txconf = &sdata->tx_conf[ieee80211_aci_to_q(aci)];
+
+ ac->ac_aci_acm_aifsn = (aci << 5) | txconf->aifs;
+ ac->ac_ecwmin_ecwmax = ieee80211_wmm_ecw(txconf);
+ ac->ac_txop_limit = cpu_to_le16(txconf->txop);
+ }
+
+ return 0;
+}
+
+int ieee80211_add_wmm_ie(struct ieee80211_vif *vif,
+ struct sk_buff *skb)
+{
+ struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+ u8 *pos;
+
+ if (sdata->local->hw.queues < 4)
+ return 0;
+
+ if (skb_tailroom(skb) < 2 + sizeof(struct ieee80211_wmm_param_ie))
+ return -ENOMEM;
+
+ pos = skb_put(skb, 2 + sizeof(struct ieee80211_wmm_param_ie));
+ *pos++ = WLAN_EID_VENDOR_SPECIFIC;
+ *pos++ = sizeof(struct ieee80211_wmm_param_ie);
+
+ return ieee80211_build_wmm_ie(vif, pos);
+}
+
enum nl80211_channel_type
ieee80211_ht_info_to_channel_type(struct ieee80211_ht_info *ht_info)
{
--
1.7.5.4
^ permalink raw reply related
* [PATCH 4/6] mac80211: allow frame aggregation for mesh
From: Thomas Pedersen @ 2011-10-20 1:03 UTC (permalink / raw)
To: linux-wireless; +Cc: anagar6, devel, Thomas Pedersen, johannes, linville
In-Reply-To: <1319072606-28291-1-git-send-email-thomas@cozybit.com>
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Ashok Nagarajan <anagar6@uic.edu>
---
net/mac80211/agg-rx.c | 3 ++-
net/mac80211/agg-tx.c | 4 +++-
net/mac80211/ht.c | 3 ++-
net/mac80211/rx.c | 1 +
4 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
index 0cde8df..e8af4b0 100644
--- a/net/mac80211/agg-rx.c
+++ b/net/mac80211/agg-rx.c
@@ -176,7 +176,8 @@ static void ieee80211_send_addba_resp(struct ieee80211_sub_if_data *sdata, u8 *d
memcpy(mgmt->da, da, ETH_ALEN);
memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
if (sdata->vif.type == NL80211_IFTYPE_AP ||
- sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
+ sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
+ sdata->vif.type == NL80211_IFTYPE_MESH_POINT)
memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
else if (sdata->vif.type == NL80211_IFTYPE_STATION)
memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN);
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index 2ac0339..36c2836 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -77,7 +77,8 @@ static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata,
memcpy(mgmt->da, da, ETH_ALEN);
memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
if (sdata->vif.type == NL80211_IFTYPE_AP ||
- sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
+ sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
+ sdata->vif.type == NL80211_IFTYPE_MESH_POINT)
memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
else if (sdata->vif.type == NL80211_IFTYPE_STATION)
memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN);
@@ -378,6 +379,7 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
* by drivers or the standard.
*/
if (sdata->vif.type != NL80211_IFTYPE_STATION &&
+ sdata->vif.type != NL80211_IFTYPE_MESH_POINT &&
sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
sdata->vif.type != NL80211_IFTYPE_AP)
return -EINVAL;
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index f80a35c..988c7ec 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -195,7 +195,8 @@ void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
memcpy(mgmt->da, da, ETH_ALEN);
memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
if (sdata->vif.type == NL80211_IFTYPE_AP ||
- sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
+ sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
+ sdata->vif.type == NL80211_IFTYPE_MESH_POINT)
memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
else if (sdata->vif.type == NL80211_IFTYPE_STATION)
memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN);
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 8c03d6e..554b5b7 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2215,6 +2215,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
* by drivers or the standard.
*/
if (sdata->vif.type != NL80211_IFTYPE_STATION &&
+ sdata->vif.type != NL80211_IFTYPE_MESH_POINT &&
sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
sdata->vif.type != NL80211_IFTYPE_AP)
break;
--
1.7.5.4
^ permalink raw reply related
* [PATCH 3/6] mac80211: set HT capabilities for mesh peer
From: Thomas Pedersen @ 2011-10-20 1:03 UTC (permalink / raw)
To: linux-wireless; +Cc: anagar6, devel, Thomas Pedersen, johannes, linville
In-Reply-To: <1319072606-28291-1-git-send-email-thomas@cozybit.com>
Set peer's HT capabilities, and disallow peering if we're on a different
channel type.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Ashok Nagarajan <anagar6@uic.edu>
---
net/mac80211/mesh.c | 25 +++++++++++++++++--------
net/mac80211/mesh_plink.c | 13 ++++++++++---
2 files changed, 27 insertions(+), 11 deletions(-)
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 2dc76a9..b3a125f 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -76,6 +76,7 @@ static void ieee80211_mesh_housekeeping_timer(unsigned long data)
bool mesh_matches_local(struct ieee802_11_elems *ie, struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ struct ieee80211_local *local = sdata->local;
/*
* As support for each feature is added, check for matching
@@ -87,15 +88,23 @@ bool mesh_matches_local(struct ieee802_11_elems *ie, struct ieee80211_sub_if_dat
* - MDA enabled
* - Power management control on fc
*/
- if (ifmsh->mesh_id_len == ie->mesh_id_len &&
- memcmp(ifmsh->mesh_id, ie->mesh_id, ie->mesh_id_len) == 0 &&
- (ifmsh->mesh_pp_id == ie->mesh_config->meshconf_psel) &&
- (ifmsh->mesh_pm_id == ie->mesh_config->meshconf_pmetric) &&
- (ifmsh->mesh_cc_id == ie->mesh_config->meshconf_congest) &&
- (ifmsh->mesh_sp_id == ie->mesh_config->meshconf_synch) &&
- (ifmsh->mesh_auth_id == ie->mesh_config->meshconf_auth))
- return true;
-
+ if (!(ifmsh->mesh_id_len == ie->mesh_id_len &&
+ memcmp(ifmsh->mesh_id, ie->mesh_id, ie->mesh_id_len) == 0 &&
+ (ifmsh->mesh_pp_id == ie->mesh_config->meshconf_psel) &&
+ (ifmsh->mesh_pm_id == ie->mesh_config->meshconf_pmetric) &&
+ (ifmsh->mesh_cc_id == ie->mesh_config->meshconf_congest) &&
+ (ifmsh->mesh_sp_id == ie->mesh_config->meshconf_synch) &&
+ (ifmsh->mesh_auth_id == ie->mesh_config->meshconf_auth)))
+ goto mismatch;
+
+ /* disallow peering with mismatched channel types for now */
+ if (ie->ht_info_elem &&
+ (local->_oper_channel_type !=
+ ieee80211_ht_info_to_channel_type(ie->ht_info_elem)))
+ goto mismatch;
+
+ return true;
+mismatch:
return false;
}
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index bbfbd45..f0705e6 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -80,11 +80,15 @@ static inline void mesh_plink_fsm_restart(struct sta_info *sta)
* on it in the lifecycle management section!
*/
static struct sta_info *mesh_plink_alloc(struct ieee80211_sub_if_data *sdata,
- u8 *hw_addr, u32 rates)
+ u8 *hw_addr, u32 rates,
+ struct ieee802_11_elems *elems)
{
struct ieee80211_local *local = sdata->local;
+ struct ieee80211_supported_band *sband;
struct sta_info *sta;
+ sband = local->hw.wiphy->bands[local->oper_channel->band];
+
if (local->num_sta >= MESH_MAX_PLINKS)
return NULL;
@@ -96,6 +100,9 @@ static struct sta_info *mesh_plink_alloc(struct ieee80211_sub_if_data *sdata,
set_sta_flag(sta, WLAN_STA_AUTHORIZED);
set_sta_flag(sta, WLAN_STA_WME);
sta->sta.supp_rates[local->hw.conf.channel->band] = rates;
+ if (elems->ht_cap_elem)
+ ieee80211_ht_cap_ie_to_sta_ht_cap(sband, elems->ht_cap_elem,
+ &sta->sta.ht_cap);
rate_control_rate_init(sta);
return sta;
@@ -279,7 +286,7 @@ void mesh_neighbour_update(u8 *hw_addr, u32 rates,
elems->ie_start, elems->total_len,
GFP_KERNEL);
else
- sta = mesh_plink_alloc(sdata, hw_addr, rates);
+ sta = mesh_plink_alloc(sdata, hw_addr, rates, elems);
if (!sta)
return;
if (sta_info_insert_rcu(sta)) {
@@ -570,7 +577,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
}
rates = ieee80211_sta_get_rates(local, &elems, rx_status->band);
- sta = mesh_plink_alloc(sdata, mgmt->sa, rates);
+ sta = mesh_plink_alloc(sdata, mgmt->sa, rates, &elems);
if (!sta) {
mpl_dbg("Mesh plink error: plink table full\n");
return;
--
1.7.5.4
^ permalink raw reply related
* [PATCH 2/6] mac80211: add HT IEs to mesh frames
From: Thomas Pedersen @ 2011-10-20 1:03 UTC (permalink / raw)
To: linux-wireless; +Cc: anagar6, devel, Thomas Pedersen, johannes, linville
In-Reply-To: <1319072606-28291-1-git-send-email-thomas@cozybit.com>
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Ashok Nagarajan <anagar6@uic.edu>
---
net/mac80211/mesh.c | 43 +++++++++++++++++++++++++++++++++++++++++++
net/mac80211/mesh.h | 4 ++++
net/mac80211/mesh_plink.c | 9 +++++++++
net/mac80211/tx.c | 4 ++++
4 files changed, 60 insertions(+), 0 deletions(-)
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index a7078fd..2dc76a9 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -341,6 +341,49 @@ int mesh_add_ds_params_ie(struct sk_buff *skb,
return 0;
}
+int mesh_add_ht_cap_ie(struct sk_buff *skb,
+ struct ieee80211_sub_if_data *sdata)
+{
+ struct ieee80211_local *local = sdata->local;
+ struct ieee80211_supported_band *sband;
+ u8 *pos;
+
+ sband = local->hw.wiphy->bands[local->oper_channel->band];
+ if (!sband->ht_cap.ht_supported ||
+ local->_oper_channel_type == NL80211_CHAN_NO_HT)
+ return 0;
+
+ if (skb_tailroom(skb) < 2 + sizeof(struct ieee80211_ht_cap))
+ return -ENOMEM;
+
+ pos = skb_put(skb, 2 + sizeof(struct ieee80211_ht_cap));
+ ieee80211_ie_build_ht_cap(pos, sband, sband->ht_cap.cap);
+
+ return 0;
+}
+
+int mesh_add_ht_info_ie(struct sk_buff *skb,
+ struct ieee80211_sub_if_data *sdata)
+{
+ struct ieee80211_local *local = sdata->local;
+ struct ieee80211_channel *channel = local->oper_channel;
+ enum nl80211_channel_type channel_type = local->_oper_channel_type;
+ struct ieee80211_supported_band *sband =
+ local->hw.wiphy->bands[channel->band];
+ struct ieee80211_sta_ht_cap *ht_cap = &sband->ht_cap;
+ u8 *pos;
+
+ if (!ht_cap->ht_supported || channel_type == NL80211_CHAN_NO_HT)
+ return 0;
+
+ if (skb_tailroom(skb) < 2 + sizeof(struct ieee80211_ht_info))
+ return -ENOMEM;
+
+ pos = skb_put(skb, 2 + sizeof(struct ieee80211_ht_info));
+ ieee80211_ie_build_ht_info(pos, ht_cap, channel, channel_type);
+
+ return 0;
+}
static void ieee80211_mesh_path_timer(unsigned long data)
{
struct ieee80211_sub_if_data *sdata =
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
index 8c00e2d..0f2c4e6 100644
--- a/net/mac80211/mesh.h
+++ b/net/mac80211/mesh.h
@@ -212,6 +212,10 @@ int mesh_add_vendor_ies(struct sk_buff *skb,
struct ieee80211_sub_if_data *sdata);
int mesh_add_ds_params_ie(struct sk_buff *skb,
struct ieee80211_sub_if_data *sdata);
+int mesh_add_ht_cap_ie(struct sk_buff *skb,
+ struct ieee80211_sub_if_data *sdata);
+int mesh_add_ht_info_ie(struct sk_buff *skb,
+ struct ieee80211_sub_if_data *sdata);
void mesh_rmc_free(struct ieee80211_sub_if_data *sdata);
int mesh_rmc_init(struct ieee80211_sub_if_data *sdata);
void ieee80211s_init(void);
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index 42a0544..bbfbd45 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -168,6 +168,8 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
2 + (IEEE80211_MAX_SUPP_RATES - 8) +
2 + sdata->u.mesh.mesh_id_len +
2 + sizeof(struct ieee80211_meshconf_ie) +
+ 2 + sizeof(struct ieee80211_ht_cap) +
+ 2 + sizeof(struct ieee80211_ht_info) +
2 + 8 + /* peering IE */
sdata->u.mesh.ie_len);
if (!skb)
@@ -244,6 +246,13 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
memcpy(pos, &reason, 2);
pos += 2;
}
+
+ if (action != WLAN_SP_MESH_PEERING_CLOSE) {
+ if (mesh_add_ht_cap_ie(skb, sdata) ||
+ mesh_add_ht_info_ie(skb, sdata))
+ return -1;
+ }
+
if (mesh_add_vendor_ies(skb, sdata))
return -1;
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index f28a920..faca189 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2290,6 +2290,8 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
2 + 8 + /* supported rates */
2 + 3 + /* DS params */
2 + (IEEE80211_MAX_SUPP_RATES - 8) +
+ 2 + sizeof(struct ieee80211_ht_cap) +
+ 2 + sizeof(struct ieee80211_ht_info) +
2 + sdata->u.mesh.mesh_id_len +
2 + sizeof(struct ieee80211_meshconf_ie) +
sdata->u.mesh.ie_len);
@@ -2318,6 +2320,8 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
mesh_add_ds_params_ie(skb, sdata) ||
ieee80211_add_ext_srates_ie(&sdata->vif, skb) ||
mesh_add_rsn_ie(skb, sdata) ||
+ mesh_add_ht_cap_ie(skb, sdata) ||
+ mesh_add_ht_info_ie(skb, sdata) ||
mesh_add_meshid_ie(skb, sdata) ||
mesh_add_meshconf_ie(skb, sdata) ||
mesh_add_vendor_ies(skb, sdata)) {
--
1.7.5.4
^ permalink raw reply related
* [PATCH 1/6] mac80211: Add HT helper functions
From: Thomas Pedersen @ 2011-10-20 1:03 UTC (permalink / raw)
To: linux-wireless; +Cc: anagar6, devel, Alexander Simon, johannes, linville
In-Reply-To: <1319072606-28291-1-git-send-email-thomas@cozybit.com>
From: Alexander Simon <an.alexsimon@googlemail.com>
Some refactoring for IBSS HT.
Move HT info and capability IEs building code into separate functions.
Add function to get the channel type from an HT info IE.
Signed-off-by: Alexander Simon <an.alexsimon@googlemail.com>
---
net/mac80211/ieee80211_i.h | 8 +++
net/mac80211/util.c | 116 +++++++++++++++++++++++++++++++++++++------
net/mac80211/work.c | 29 +-----------
3 files changed, 108 insertions(+), 45 deletions(-)
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 4c3d1f5..30fc9e7 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1333,6 +1333,12 @@ void ieee80211_recalc_smps(struct ieee80211_local *local);
size_t ieee80211_ie_split(const u8 *ies, size_t ielen,
const u8 *ids, int n_ids, size_t offset);
size_t ieee80211_ie_split_vendor(const u8 *ies, size_t ielen, size_t offset);
+u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_supported_band *sband,
+ u16 cap);
+u8 *ieee80211_ie_build_ht_info(u8 *pos,
+ struct ieee80211_sta_ht_cap *ht_cap,
+ struct ieee80211_channel *channel,
+ enum nl80211_channel_type channel_type);
/* internal work items */
void ieee80211_work_init(struct ieee80211_local *local);
@@ -1361,6 +1367,8 @@ ieee80211_get_channel_mode(struct ieee80211_local *local,
bool ieee80211_set_channel_type(struct ieee80211_local *local,
struct ieee80211_sub_if_data *sdata,
enum nl80211_channel_type chantype);
+enum nl80211_channel_type
+ieee80211_ht_info_to_channel_type(struct ieee80211_ht_info *ht_info);
#ifdef CONFIG_MAC80211_NOINLINE
#define debug_noinline noinline
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 7439d26..72b3a2e 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -811,23 +811,8 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
offset = noffset;
}
- if (sband->ht_cap.ht_supported) {
- u16 cap = sband->ht_cap.cap;
- __le16 tmp;
-
- *pos++ = WLAN_EID_HT_CAPABILITY;
- *pos++ = sizeof(struct ieee80211_ht_cap);
- memset(pos, 0, sizeof(struct ieee80211_ht_cap));
- tmp = cpu_to_le16(cap);
- memcpy(pos, &tmp, sizeof(u16));
- pos += sizeof(u16);
- *pos++ = sband->ht_cap.ampdu_factor |
- (sband->ht_cap.ampdu_density <<
- IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT);
- memcpy(pos, &sband->ht_cap.mcs, sizeof(sband->ht_cap.mcs));
- pos += sizeof(sband->ht_cap.mcs);
- pos += 2 + 4 + 1; /* ext info, BF cap, antsel */
- }
+ if (sband->ht_cap.ht_supported)
+ pos = ieee80211_ie_build_ht_cap(pos, sband, sband->ht_cap.cap);
/*
* If adding more here, adjust code in main.c
@@ -1362,6 +1347,103 @@ void ieee80211_disable_rssi_reports(struct ieee80211_vif *vif)
}
EXPORT_SYMBOL(ieee80211_disable_rssi_reports);
+u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_supported_band *sband,
+ u16 cap)
+{
+ __le16 tmp;
+
+ *pos++ = WLAN_EID_HT_CAPABILITY;
+ *pos++ = sizeof(struct ieee80211_ht_cap);
+ memset(pos, 0, sizeof(struct ieee80211_ht_cap));
+
+ /* capability flags */
+ tmp = cpu_to_le16(cap);
+ memcpy(pos, &tmp, sizeof(u16));
+ pos += sizeof(u16);
+
+ /* AMPDU parameters */
+ *pos++ = sband->ht_cap.ampdu_factor |
+ (sband->ht_cap.ampdu_density <<
+ IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT);
+
+ /* MCS set */
+ memcpy(pos, &sband->ht_cap.mcs, sizeof(sband->ht_cap.mcs));
+ pos += sizeof(sband->ht_cap.mcs);
+
+ /* extended capabilities */
+ pos += sizeof(__le16);
+
+ /* BF capabilities */
+ pos += sizeof(__le32);
+
+ /* antenna selection */
+ pos += sizeof(u8);
+
+ return pos;
+}
+
+u8 *ieee80211_ie_build_ht_info(u8 *pos,
+ struct ieee80211_sta_ht_cap *ht_cap,
+ struct ieee80211_channel *channel,
+ enum nl80211_channel_type channel_type)
+{
+ struct ieee80211_ht_info *ht_info;
+ /* Build HT Information */
+ *pos++ = WLAN_EID_HT_INFORMATION;
+ *pos++ = sizeof(struct ieee80211_ht_info);
+ ht_info = (struct ieee80211_ht_info *)pos;
+ ht_info->control_chan =
+ ieee80211_frequency_to_channel(channel->center_freq);
+ switch (channel_type) {
+ case NL80211_CHAN_HT40MINUS:
+ ht_info->ht_param = IEEE80211_HT_PARAM_CHA_SEC_BELOW;
+ break;
+ case NL80211_CHAN_HT40PLUS:
+ ht_info->ht_param = IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
+ break;
+ case NL80211_CHAN_HT20:
+ default:
+ ht_info->ht_param = IEEE80211_HT_PARAM_CHA_SEC_NONE;
+ break;
+ }
+ if (ht_cap->cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40)
+ ht_info->ht_param |= IEEE80211_HT_PARAM_CHAN_WIDTH_ANY;
+ ht_info->operation_mode = 0x0000;
+ ht_info->stbc_param = 0x0000;
+
+ /* It seems that Basic MCS set and Supported MCS set
+ are identical for the first 10 bytes */
+ memset(&ht_info->basic_set, 0, 16);
+ memcpy(&ht_info->basic_set, &ht_cap->mcs, 10);
+
+ return pos + sizeof(struct ieee80211_ht_info);
+}
+
+enum nl80211_channel_type
+ieee80211_ht_info_to_channel_type(struct ieee80211_ht_info *ht_info)
+{
+ enum nl80211_channel_type channel_type;
+
+ if (!ht_info)
+ return NL80211_CHAN_NO_HT;
+
+ switch (ht_info->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
+ case IEEE80211_HT_PARAM_CHA_SEC_NONE:
+ channel_type = NL80211_CHAN_HT20;
+ break;
+ case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
+ channel_type = NL80211_CHAN_HT40PLUS;
+ break;
+ case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
+ channel_type = NL80211_CHAN_HT40MINUS;
+ break;
+ default:
+ channel_type = NL80211_CHAN_NO_HT;
+ }
+
+ return channel_type;
+}
+
int ieee80211_add_srates_ie(struct ieee80211_vif *vif, struct sk_buff *skb)
{
struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index 94472eb..fab5092 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -103,7 +103,6 @@ static void ieee80211_add_ht_ie(struct sk_buff *skb, const u8 *ht_info_ie,
u8 *pos;
u32 flags = channel->flags;
u16 cap = sband->ht_cap.cap;
- __le16 tmp;
if (!sband->ht_cap.ht_supported)
return;
@@ -154,34 +153,8 @@ static void ieee80211_add_ht_ie(struct sk_buff *skb, const u8 *ht_info_ie,
}
/* reserve and fill IE */
-
pos = skb_put(skb, sizeof(struct ieee80211_ht_cap) + 2);
- *pos++ = WLAN_EID_HT_CAPABILITY;
- *pos++ = sizeof(struct ieee80211_ht_cap);
- memset(pos, 0, sizeof(struct ieee80211_ht_cap));
-
- /* capability flags */
- tmp = cpu_to_le16(cap);
- memcpy(pos, &tmp, sizeof(u16));
- pos += sizeof(u16);
-
- /* AMPDU parameters */
- *pos++ = sband->ht_cap.ampdu_factor |
- (sband->ht_cap.ampdu_density <<
- IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT);
-
- /* MCS set */
- memcpy(pos, &sband->ht_cap.mcs, sizeof(sband->ht_cap.mcs));
- pos += sizeof(sband->ht_cap.mcs);
-
- /* extended capabilities */
- pos += sizeof(__le16);
-
- /* BF capabilities */
- pos += sizeof(__le32);
-
- /* antenna selection */
- pos += sizeof(u8);
+ ieee80211_ie_build_ht_cap(pos, sband, cap);
}
static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
--
1.7.5.4
^ permalink raw reply related
* [PATCH 0/6] HT support for mesh
From: Thomas Pedersen @ 2011-10-20 1:03 UTC (permalink / raw)
To: linux-wireless; +Cc: anagar6, devel, Thomas Pedersen, johannes, linville
This patchset adds basic HT support for mesh nodes. We avoid the question of
how to negotiate channel types, by simply disallowing peering with mismatched
HT modes. Needs the mesh fixes posted earlier today for patch context.
Many thanks to Luis Rodriguez for his assistance, and Ashok Nagarajan for
co-authoring this patchset.
Alexander Simon (1):
mac80211: Add HT helper functions
Thomas Pedersen (5):
mac80211: add HT IEs to mesh frames
mac80211: set HT capabilities for mesh peer
mac80211: allow frame aggregation for mesh
mac80211: add WMM IE to mesh frames
mac80211: check mesh peer's WMM parameters
include/linux/ieee80211.h | 26 ++++++
include/net/mac80211.h | 4 +
net/mac80211/agg-rx.c | 3 +-
net/mac80211/agg-tx.c | 4 +-
net/mac80211/ht.c | 3 +-
net/mac80211/ieee80211_i.h | 8 ++
net/mac80211/mesh.c | 75 ++++++++++++++--
net/mac80211/mesh.h | 4 +
net/mac80211/mesh_plink.c | 24 +++++-
net/mac80211/rx.c | 1 +
net/mac80211/tx.c | 6 ++
net/mac80211/util.c | 208 ++++++++++++++++++++++++++++++++++++++++----
net/mac80211/work.c | 29 +------
13 files changed, 336 insertions(+), 59 deletions(-)
--
1.7.5.4
^ permalink raw reply
* [PATCH 3/3] mac80211: select queue for fwded mesh frames
From: Thomas Pedersen @ 2011-10-20 0:23 UTC (permalink / raw)
To: linux-wireless; +Cc: Thomas Pedersen, johannes, linville
In-Reply-To: <1319070203-22097-1-git-send-email-thomas@cozybit.com>
Set proper queue mapping and timestamp for forwarded mesh frames.
Thanks to Luis Rodriguez for investigating and fixing this.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
---
net/mac80211/rx.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index b867bd5..8c03d6e 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1952,6 +1952,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
info = IEEE80211_SKB_CB(fwd_skb);
memset(info, 0, sizeof(*info));
info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING;
+ info->control.jiffies = jiffies;
info->control.vif = &rx->sdata->vif;
if (is_multicast_ether_addr(fwd_hdr->addr1)) {
IEEE80211_IFSTA_MESH_CTR_INC(&sdata->u.mesh,
@@ -1974,6 +1975,10 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
if (err)
return RX_DROP_MONITOR;
+ skb_set_queue_mapping(fwd_skb,
+ ieee80211_select_queue(sdata, fwd_skb));
+ ieee80211_set_qos_hdr(sdata, fwd_skb);
+
IEEE80211_IFSTA_MESH_CTR_INC(&sdata->u.mesh,
fwded_unicast);
}
--
1.7.5.4
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox