Skip to content

Commit

Permalink
iwlegacy: move iwl-4965-{,hw,debugfs,calib}.h to 4965.h
Browse files Browse the repository at this point in the history
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
  • Loading branch information
Stanislaw Gruszka committed Nov 15, 2011
1 parent 8f29b45 commit af038f4
Show file tree
Hide file tree
Showing 14 changed files with 277 additions and 477 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwlegacy/4965-calib.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

#include "iwl-dev.h"
#include "iwl-core.h"
#include "iwl-4965-calib.h"
#include "4965.h"

/*****************************************************************************
* INIT calibrations framework
Expand Down
5 changes: 3 additions & 2 deletions drivers/net/wireless/iwlegacy/4965-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
* Intel Linux Wireless <ilw@linux.intel.com>
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*****************************************************************************/
#include "iwl-4965.h"
#include "iwl-4965-debugfs.h"
#include "iwl-dev.h"
#include "iwl-core.h"
#include "4965.h"

static const char *fmt_value = " %-30s %10u\n";
static const char *fmt_table = " %-30s %10u %10u %10u %10u\n";
Expand Down
10 changes: 7 additions & 3 deletions drivers/net/wireless/iwlegacy/4965-mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@
#include "iwl-io.h"
#include "iwl-helpers.h"
#include "iwl-sta.h"
#include "iwl-4965-calib.h"
#include "iwl-4965.h"
#include "4965.h"


/******************************************************************************
Expand Down Expand Up @@ -820,6 +819,11 @@ static int il4965_get_channels_for_scan(struct il_priv *il,
return added;
}

static inline u32 il4965_ant_idx_to_flags(u8 ant_idx)
{
return BIT(ant_idx) << RATE_MCS_ANT_POS;
}

int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
{
struct il_host_cmd cmd = {
Expand Down Expand Up @@ -1434,7 +1438,7 @@ void il4965_reply_stats(struct il_priv *il,
* mapping. This is implemented here.
*
* Due to the way hw queues are set up (by the hw specific modules like
* iwl-4965.c), the AC->hw queue mapping is the identity
* 4965.c), the AC->hw queue mapping is the identity
* mapping.
*/

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwlegacy/4965-rs.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "iwl-dev.h"
#include "iwl-sta.h"
#include "iwl-core.h"
#include "iwl-4965.h"
#include "4965.h"

#define IL4965_RS_NAME "iwl-4965-rs"

Expand Down
26 changes: 23 additions & 3 deletions drivers/net/wireless/iwlegacy/4965.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@
#include "iwl-core.h"
#include "iwl-io.h"
#include "iwl-helpers.h"
#include "iwl-4965-calib.h"
#include "iwl-sta.h"
#include "iwl-4965.h"
#include "iwl-4965-debugfs.h"
#include "4965.h"

#define IL_AC_UNSET -1

Expand Down Expand Up @@ -1829,6 +1827,28 @@ static inline u32 il4965_get_scd_ssn(struct il4965_tx_resp *tx_resp)
return le32_to_cpup(&tx_resp->u.status + tx_resp->frame_count) & MAX_SN;
}

static inline u32 il4965_tx_status_to_mac80211(u32 status)
{
status &= TX_STATUS_MSK;

switch (status) {
case TX_STATUS_SUCCESS:
case TX_STATUS_DIRECT_DONE:
return IEEE80211_TX_STAT_ACK;
case TX_STATUS_FAIL_DEST_PS:
return IEEE80211_TX_STAT_TX_FILTERED;
default:
return 0;
}
}

static inline bool il4965_is_tx_success(u32 status)
{
status &= TX_STATUS_MSK;
return (status == TX_STATUS_SUCCESS ||
status == TX_STATUS_DIRECT_DONE);
}

/**
* il4965_tx_status_reply_tx - Handle Tx response for frames in aggregation queue
*/
Expand Down
Loading

0 comments on commit af038f4

Please sign in to comment.