diff options
Diffstat (limited to 'patches/0069-iwlwifi-pd-string-fix.patch')
-rw-r--r-- | patches/0069-iwlwifi-pd-string-fix.patch | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/patches/0069-iwlwifi-pd-string-fix.patch b/patches/0069-iwlwifi-pd-string-fix.patch new file mode 100644 index 00000000..e1fe84bb --- /dev/null +++ b/patches/0069-iwlwifi-pd-string-fix.patch @@ -0,0 +1,87 @@ +--- a/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c ++++ b/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c +@@ -2422,12 +2422,23 @@ int iwl_dbgfs_register(struct iwl_priv *priv, struct dentry *dbgfs_dir) + */ + if (priv->mac80211_registered) { + char buf[100]; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0) + struct dentry *mac80211_dir, *dev_dir; + + dev_dir = dbgfs_dir->d_parent; + mac80211_dir = priv->hw->wiphy->debugfsdir; + + snprintf(buf, 100, "../../%pd2", dev_dir); ++#else ++ struct dentry *mac80211_dir, *dev_dir, *root_dir; ++ ++ dev_dir = dbgfs_dir->d_parent; ++ root_dir = dev_dir->d_parent; ++ mac80211_dir = priv->hw->wiphy->debugfsdir; ++ ++ snprintf(buf, 100, "../../%s/%s", root_dir->d_name.name, ++ dev_dir->d_name.name); ++#endif + + if (!debugfs_create_symlink("iwlwifi", mac80211_dir, buf)) + goto err; +--- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c ++++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c +@@ -1731,8 +1731,13 @@ void iwl_mvm_vif_dbgfs_register(struct iwl_mvm *mvm, struct ieee80211_vif *vif) + mvmvif->dbgfs_dir = debugfs_create_dir("iwlmvm", dbgfs_dir); + + if (!mvmvif->dbgfs_dir) { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0) + IWL_ERR(mvm, "Failed to create debugfs directory under %pd\n", + dbgfs_dir); ++#else ++ IWL_ERR(mvm, "Failed to create debugfs directory under %s\n", ++ dbgfs_dir->d_name.name); ++#endif + return; + } + +@@ -1800,15 +1805,28 @@ void iwl_mvm_vif_dbgfs_register(struct iwl_mvm *mvm, struct ieee80211_vif *vif) + * find + * netdev:wlan0 -> ../../../ieee80211/phy0/netdev:wlan0/iwlmvm/ + */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0) + snprintf(buf, 100, "../../../%pd3/%pd", + dbgfs_dir, + mvmvif->dbgfs_dir); ++#else ++ snprintf(buf, 100, "../../../%s/%s/%s/%s", ++ dbgfs_dir->d_parent->d_parent->d_name.name, ++ dbgfs_dir->d_parent->d_name.name, ++ dbgfs_dir->d_name.name, ++ mvmvif->dbgfs_dir->d_name.name); ++#endif + + mvmvif->dbgfs_slink = debugfs_create_symlink(dbgfs_dir->d_name.name, + mvm->debugfs_dir, buf); + if (!mvmvif->dbgfs_slink) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0) + IWL_ERR(mvm, "Can't create debugfs symbolic link under %pd\n", + dbgfs_dir); ++#else ++ IWL_ERR(mvm, "Can't create debugfs symbolic link under %s\n", ++ dbgfs_dir->d_name.name); ++#endif + return; + err: + IWL_ERR(mvm, "Can't create debugfs entity\n"); +--- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c ++++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c +@@ -1942,7 +1942,13 @@ int iwl_mvm_dbgfs_register(struct iwl_mvm *mvm, struct dentry *dbgfs_dir) + * Create a symlink with mac80211. It will be removed when mac80211 + * exists (before the opmode exists which removes the target.) + */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0) + snprintf(buf, 100, "../../%pd2", dbgfs_dir->d_parent); ++#else ++ snprintf(buf, 100, "../../%s/%s", ++ dbgfs_dir->d_parent->d_parent->d_name.name, ++ dbgfs_dir->d_parent->d_name.name); ++#endif + if (!debugfs_create_symlink("iwlwifi", mvm->hw->wiphy->debugfsdir, buf)) + goto err; + |