BigW Consortium Gitlab

Commit 9297fb0f by David Frey Committed by David Clark

mt7697: indent kernel code with tabs

parent 831a8bec
......@@ -290,7 +290,8 @@ int mt7697io_rd(struct mt7697q_info *qinfo, u32 addr, u32 *data, size_t num)
}
for (i = 0; i < num; i++) {
ret = mt7697io_write16(qinfo, MT7697_IO_SLAVE_REG_COMMAND, (
ret = mt7697io_write16(
qinfo, MT7697_IO_SLAVE_REG_COMMAND, (
BF_DEFINE(MT7697_IO_COMMAND_REG_BUS_SIZE_VAL_WORD,
MT7697_IO_COMMAND_REG_BUS_SIZE_OFFSET,
MT7697_IO_COMMAND_REG_BUS_SIZE_WIDTH) |
......@@ -329,7 +330,8 @@ cleanup:
int mt7697io_trigger_intr(struct mt7697q_info *qinfo)
{
int ret = mt7697io_write16(qinfo, MT7697_IO_SLAVE_REG_IRQ,
int ret = mt7697io_write16(
qinfo, MT7697_IO_SLAVE_REG_IRQ,
BF_DEFINE(MT7697_IO_IRQ_REG_IRQ_STATUS_VAL_ACTIVE,
MT7697_IO_IRQ_REG_IRQ_STATUS_OFFSET,
MT7697_IO_IRQ_REG_IRQ_STATUS_WIDTH));
......
......@@ -224,10 +224,11 @@ static int mt7697q_read_state(u8 ch, struct mt7697q_spec *qs)
mutex_lock(&qs->qinfo->mutex);
ret = mt7697io_rd(qs->qinfo,
MT7697_IO_SLAVE_BUFFER_ADDRESS + ch * sizeof(struct mt7697q_data),
(u32*)&qs->data,
LEN_TO_WORD(sizeof(struct mt7697q_data)));
ret = mt7697io_rd(
qs->qinfo,
MT7697_IO_SLAVE_BUFFER_ADDRESS +
ch * sizeof(struct mt7697q_data),
(u32*)&qs->data, LEN_TO_WORD(sizeof(struct mt7697q_data)));
if (ret < 0) {
dev_err(qs->qinfo->dev, "%s(): mt7697io_rd() failed(%d)\n",
__func__, ret);
......
......@@ -38,7 +38,7 @@ struct mt7697_uart_info {
struct platform_device *pdev;
struct device *dev;
char* dev_file;
char *dev_file;
struct file *fd_hndl;
struct mutex mutex;
......
......@@ -1533,9 +1533,9 @@ int mt7697_cfg80211_init(struct mt7697_cfg80211_info *cfg)
wiphy->max_remain_on_channel_duration = 5000;
set_wiphy_dev(wiphy, cfg->dev);
wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
wiphy->interface_modes = (BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_ADHOC) |
BIT(NL80211_IFTYPE_AP);
BIT(NL80211_IFTYPE_AP));
wiphy->max_scan_ssids = MT7697_SCAN_MAX_ITEMS;
wiphy->max_scan_ie_len = IEEE80211_MAX_SSID_LEN;
......
......@@ -412,8 +412,7 @@ static int mt7697_wext_siwessid(struct net_device *ndev,
__func__, ret);
goto cleanup;
}
}
else if ((cfg->wifi_cfg.opmode == MT7697_WIFI_MODE_STA_ONLY) &&
} else if ((cfg->wifi_cfg.opmode == MT7697_WIFI_MODE_STA_ONLY) &&
test_bit(CONNECTED, &vif->flags)) {
ret = mt7697_wr_disconnect_req(vif->cfg, NULL);
if (ret < 0) {
......
......@@ -35,33 +35,38 @@
/**@brief Specifies 20MHz | 40MHz bandwidth in the 2.4GHz band.
*/
#define MT7697_WIFI_IOT_COMMAND_CONFIG_BANDWIDTH_2040MHZ (MT7697_WIFI_IOT_COMMAND_CONFIG_BANDWIDTH_20MHZ | \
#define MT7697_WIFI_IOT_COMMAND_CONFIG_BANDWIDTH_2040MHZ \
(MT7697_WIFI_IOT_COMMAND_CONFIG_BANDWIDTH_20MHZ | \
MT7697_WIFI_IOT_COMMAND_CONFIG_BANDWIDTH_40MHZ)
/**
* @brief Station operation mode. In this mode the device works as a Wi-Fi client.
*/
* @brief Station operation mode. In this mode the device works as a Wi-Fi
* client.
*/
#define MT7697_WIFI_MODE_STA_ONLY (1)
/**
* @brief SoftAP operation mode. In AP mode, other client devices can connect to the Wi-Fi AP.
*/
* @brief SoftAP operation mode. In AP mode, other client devices can connect to
* the Wi-Fi AP.
*/
#define MT7697_WIFI_MODE_AP_ONLY (2)
/**
* @brief Repeater mode. There are two virtual ports in repeater mode, one is #WIFI_PORT_AP, and the other is #WIFI_PORT_APCLI.
* Both ports should be configured to operate on the same channel with the same bandwidth, while their other settings can be different.
* For example, both ports can have different MAC addresses and security modes.
*/
* @brief Repeater mode. There are two virtual ports in repeater mode, one is
* #WIFI_PORT_AP, and the other is #WIFI_PORT_APCLI. Both ports should be
* configured to operate on the same channel with the same bandwidth, while
* their other settings can be different. For example, both ports can have
* different MAC addresses and security modes.
*/
#define MT7697_WIFI_MODE_REPEATER (3)
/**
* @brief This macro defines the monitoring mode. In this mode it can sniffer
* the Wi-Fi packet in the air given the specific channel and bandwidth.
* It is used to enter a hybrid mode and handle a raw packet.
* Call #wifi_config_register_rx_handler() to register a raw packet handler
* once this mode is set.
*/
* @brief This macro defines the monitoring mode. In this mode it can sniffer
* the Wi-Fi packet in the air given the specific channel and bandwidth. It is
* used to enter a hybrid mode and handle a raw packet. Call
* #wifi_config_register_rx_handler() to register a raw packet handler once this
* mode is set.
*/
#define MT7697_WIFI_MODE_MONITOR (4)
enum mt7697_port_type {
......@@ -81,8 +86,10 @@ enum mt7697_scan_option {
MT7697_WIFI_SCAN_OPTION_FORCE_ACTIVE,
};
/** @brief This enumeration defines the wireless authentication mode to indicate the Wi-Fi device’s authentication attribute.
*/
/**
* @brief This enumeration defines the wireless authentication mode to indicate
* the Wi-Fi device’s authentication attribute.
*/
enum mt7697_wifi_auth_mode_t {
MT7697_WIFI_AUTH_MODE_OPEN = 0, /**< Open mode. */
MT7697_WIFI_AUTH_MODE_SHARED, /**< Not supported. */
......@@ -96,8 +103,10 @@ enum mt7697_wifi_auth_mode_t {
MT7697_WIFI_AUTH_MODE_WPA_PSK_WPA2_PSK, /**< Mixture mode. */
};
/** @brief This enumeration defines the wireless encryption type to indicate the Wi-Fi device’s encryption attribute.
*/
/**
* @brief This enumeration defines the wireless encryption type to indicate the
* Wi-Fi device’s encryption attribute.
*/
enum mt7697_wifi_encrypt_type_t {
MT7697_WIFI_ENCRYPT_TYPE_WEP_ENABLED = 0, /**< WEP encryption type. */
MT7697_WIFI_ENCRYPT_TYPE_ENCRYPT1_ENABLED = MT7697_WIFI_ENCRYPT_TYPE_WEP_ENABLED, /**< WEP encryption type. */
......@@ -106,7 +115,7 @@ enum mt7697_wifi_encrypt_type_t {
MT7697_WIFI_ENCRYPT_TYPE_WEP_KEY_ABSENT = 2, /**< Not supported. */
MT7697_WIFI_ENCRYPT_TYPE_ENCRYPT_KEY_ABSENT = MT7697_WIFI_ENCRYPT_TYPE_WEP_KEY_ABSENT, /**< Not supported. */
MT7697_WIFI_ENCRYPT_TYPE_WEP_NOT_SUPPORTED = 3, /**< Not supported. */
MT7697_WIFI_ENCRYPT_TYPE_ENCRYPT_NOT_SUPPORTED = MT7697_WIFI_ENCRYPT_TYPE_WEP_NOT_SUPPORTED,/**< Not supported. */
MT7697_WIFI_ENCRYPT_TYPE_ENCRYPT_NOT_SUPPORTED = MT7697_WIFI_ENCRYPT_TYPE_WEP_NOT_SUPPORTED, /**< Not supported. */
MT7697_WIFI_ENCRYPT_TYPE_TKIP_ENABLED = 4, /**< TKIP encryption. */
MT7697_WIFI_ENCRYPT_TYPE_ENCRYPT2_ENABLED = MT7697_WIFI_ENCRYPT_TYPE_TKIP_ENABLED, /**< TKIP encryption. */
MT7697_WIFI_ENCRYPT_TYPE_AES_ENABLED = 6, /**< AES encryption. */
......@@ -139,8 +148,10 @@ enum mt7697_wifi_phy_mode_t {
MT7697_WIFI_PHY_11N_5G, /**< 11, 11n-only with 5GHz band. */
};
/** @brief This enumeration defines the RX filter register's bitmap. Each bit indicates a specific drop frame.
*/
/**
* @brief This enumeration defines the RX filter register's bitmap. Each bit
* indicates a specific drop frame.
*/
enum mt7697_wifi_rx_filter_t {
MT7697_WIFI_RX_FILTER_DROP_STBC_BCN_BC_MC, /**< bit 0 Drops the STBC beacon/BC/MC frames. */
MT7697_WIFI_RX_FILTER_DROP_FCS_ERR, /**< bit 1 Drops the FCS error frames. */
......@@ -160,8 +171,10 @@ enum mt7697_wifi_rx_filter_t {
MT7697_WIFI_RX_FILTER_DROP_NDPA /**< bit 20 Drops the NDPA or not. */
};
/** @brief This structure is the Wi-Fi configuration for initialization in STA mode.
*/
/**
* @brief This structure is the Wi-Fi configuration for initialization in STA
* mode.
*/
struct mt7697_wifi_sta_config_t {
u8 ssid[IEEE80211_MAX_SSID_LEN]; /**< The SSID of the target AP. */
u8 ssid_len; /**< The length of the SSID. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment